A question and answer relevance optimization method and system based on multi-dimensional label recognition
By constructing a multi-dimensional tagging system and metadata matching, and optimizing the knowledge base question-and-answer system, the problems of false detection and missed detection caused by vector similarity retrieval were solved, and the accuracy and professionalism of question-and-answer in the power industry were improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID JIANGXI ELECTRIC POWER CO LTD
- Filing Date
- 2026-06-02
- Publication Date
- 2026-07-31
AI Technical Summary
Existing knowledge base question answering systems in the power industry rely on vector similarity retrieval, which leads to false positives (recalling semantically similar but business-irrelevant content) and false negatives (missing content with different expressions but truly relevant to the business), affecting the accuracy and professionalism of question answering.
We construct a phased, multi-dimensional business tag system that includes industry attributes, professional fields, process fields, and management fields. Through metadata tag matching and fusion sorting, combined with vector similarity, we optimize the selection of knowledge fragments to ensure that the content of the input large model matches the user's intent in both semantics and business.
Effectively reduce false positives and false negatives, improve the quality and usability of the question-and-answer system in the power industry, and ensure that the generated answers are consistent with the user's intent in terms of both semantics and business logic.
Smart Images

Figure CN122489720A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence and natural language processing technology, specifically relating to a question-answer relevance optimization method and system based on multi-dimensional label recognition. Background Technology
[0002] In knowledge-based question-answering systems, Retrieval Enhanced Generation (RAG) is a commonly used architecture. The system first retrieves relevant knowledge from an external knowledge base, then inputs the retrieval results and the user's question into a large language model, which generates a response based on the external knowledge. This architecture has wide applications in scenarios such as knowledge-based question answering in the power industry, intelligent retrieval, engineering consulting, standards and specifications question answering, and design review assistance.
[0003] Currently, existing knowledge base question answering systems typically employ vector retrieval-enhanced generation. The system first segments the knowledge base document into several knowledge fragments and generates a vector representation for each fragment, storing it in a vector database. When a user inputs a question, the question is then vectorized, and the top K candidate knowledge fragments are retrieved based on vector similarity. The core basis of existing solutions is textual semantic similarity; that is, they primarily judge whether the user's question and the knowledge fragment are semantically similar, rather than whether the knowledge fragment truly matches the user's intent in business dimensions such as industry, profession, process, and management goals.
[0004] While some systems may prompt the large model to prioritize answers based on relevant content or further determine whether candidate content is relevant to the question, such judgments occur after the retrieval process. If truly relevant content has already been filtered out in the top K candidate stage, the large model cannot generate an accurate answer based on the missing knowledge.
[0005] The main shortcoming of traditional vector similarity retrieval is that its optimization objective is semantic similarity, rather than business relevance. In the power industry question-and-answer scenario, a question typically encompasses industry attributes, professional directions, business processes, and management objectives simultaneously. For example, a user asking "What are the safety requirements when constructing a power transmission line crossing?" involves multiple dimensions such as the power industry, power transmission, construction, and safety. If relying solely on vector similarity, the system often only captures surface-level semantics such as "construction," "requirements," and "safety," making it difficult to accurately identify the specific business context.
[0006] The existing solutions mainly suffer from two types of problems: false detection and false negative detection.
[0007] Misident detection refers to recalling semantically similar but business-irrelevant content. For example, when a user inquires about the safety requirements for the construction of power transmission line crossings, vector retrieval might recall substation civil construction quality requirements or equipment installation and acceptance requirements. Although such content contains similar expressions such as "construction" and "requirements," it does not match the user's question in terms of professional, process, or management dimensions. Once it enters the context of the larger model, it may cause the answer to deviate from the true intent.
[0008] Omissions refer to overlooking content that is expressed differently but is truly relevant to the business. In power industry documents, the same business issue often has multiple professional expressions. For example, a piece of real knowledge related to the safety requirements for the erection of crossing structures might be written as "risk control for crossing operations," "protection requirements for proximity to live conductors," or "safety management requirements for overhead line construction." These expressions are not very close to the user's question in wording and are easily filtered out when the number of candidates is limited.
[0009] The aforementioned problem essentially stems from a discrepancy between similarity and relevance. Expanding the candidate pool to improve recall may introduce more semantically similar but business-incompatible content; conversely, narrowing the candidate pool to reduce noise may miss content with different wording but high business relevance. Due to the limited context window of large models, false positives and false negatives during the retrieval phase further impact the quality of the final answer.
[0010] Therefore, how to introduce a business-dimensional judgment mechanism while preserving the semantic recall capability of vector retrieval, so that the knowledge fragments entering the context of the large model are both semantically similar and business-related, is a technical problem that current knowledge base question answering systems urgently need to solve. Summary of the Invention
[0011] This invention aims to address the problems of false positives (recalling semantically similar but business-irrelevant content) and false negatives (omitting content with different expressions but truly relevant business content) caused by relying solely on vector similarity for knowledge retrieval in existing Retrieval Augmentation (RAG) systems. Specifically, existing technologies only focus on semantic similarity at the textual level, ignoring the multi-dimensional business intent implicit in user questions, such as industry attributes, professional fields, business processes, and management goals. This leads to a discrepancy between the knowledge fragments entering the large model context and the user's actual business needs, thereby reducing the accuracy and professionalism of question answering.
[0012] This invention provides a question-answering relevance optimization method and system based on multi-dimensional tag recognition. By using a phased multi-dimensional business tag recognition and metadata tag matching mechanism, while retaining the semantic recall capability of vector retrieval, it introduces business dimension judgment and correction, so that the knowledge fragments input into the final large model are both semantically similar and business-related, thereby improving the answer quality and usability of the knowledge base question-answering system in professional fields such as power.
[0013] This invention is achieved through the following technical solution: A question-answering relevance optimization method based on multi-dimensional label recognition, comprising the following steps: S1: Construct a phased, multi-dimensional business tag system that includes at least industry attribute tags, professional field tags, process field tags, and management field tags; S2: Pre-configure metadata tags for knowledge fragments in the knowledge base that are consistent with the phased multidimensional business tag system; S3: Receive user questions and extract business intent tags from user questions according to the phased multi-dimensional business tag system; first, determine whether the user question belongs to the target industry, and after confirming that it belongs to the target industry, identify its business intent tags in the professional field, process field and management field respectively. S4: Match the business intent tags with the metadata tags in step S2, and calculate the tag relevance score for each knowledge fragment; S5: Combine the vector similarity score with the label relevance score obtained in step S4 to rearrange the candidate knowledge fragments and generate a rearranged list of knowledge fragments; S6: Input the rearranged top K knowledge fragments and the user's question into the large model to generate the final response.
[0014] Preferably, in step S1, the professional field label includes substation, transmission, distribution, or technical management; the process field label includes design, surveying, construction, acceptance, or operation and maintenance; and the management field label includes quality, safety, schedule, cost, or compliance.
[0015] As a preferred option, in step S3, when a user's question is determined to be outside the target industry, its recall weight in the target industry knowledge base is reduced or it is transferred to the general question-and-answer process.
[0016] As a preferred option, in step S4, for knowledge fragments with incomplete metadata tags, partial matching is performed based on their existing tag dimensions. Unlabeled dimensions do not trigger conflict penalties, but their business relevance score is lower than that of knowledge fragments with complete tag matching.
[0017] Preferably, in step S5, the candidate knowledge fragments are rearranged using a fusion ranking score, whereby the fusion ranking score is expressed as: ; in, To merge sorted scores, For vector similarity scores, The label relevance score. For tag conflict penalty items, , , These are the vector similarity score, label relevance score, and weight coefficient of the label conflict penalty term, respectively. This indicates normalization processing. This indicates a user issue. Indicates the first in the knowledge base A knowledge fragment.
[0018] As a preferred option, in step S3, the Qwen3-4B model is used as the user intent recognition module to extract multi-dimensional business intent tags from user questions.
[0019] The label relevance score is defined as follows: ; in, The label relevance score. This indicates a user issue. Indicates the first in the knowledge base A knowledge fragment; This represents the function for determining industry attributes. , , These represent the weights for the professional field, the process field, and the management field, respectively. , , These represent effectiveness indicators in the professional, process, and management domains, respectively. , , These represent the degree of matching in the professional field, process field, and management field, respectively.
[0020] This invention also provides a question-answer relevance optimization system based on multi-dimensional label recognition, used to execute the aforementioned question-answer relevance optimization method based on multi-dimensional label recognition, comprising: The tag system construction module is used to build a phased, multi-dimensional business tag system; The knowledge base annotation module is used to pre-configure metadata tags for knowledge fragments in the knowledge base that are consistent with the phased multidimensional business tagging system. The user intent recognition module is used to receive user questions and extract business intent tags; The tag matching module is used to match business intent tags with metadata tags of knowledge fragments and calculate tag relevance scores; The fusion ranking module is used to rearrange candidate knowledge fragments by combining vector similarity scores and label relevance scores; The generation module is used to input the rearranged top K knowledge fragments along with the user's question into the large model to generate the final response.
[0021] The present invention also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement the question-answer relevance optimization method based on multi-dimensional label recognition.
[0022] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the question-answer relevance optimization method based on multi-dimensional label recognition.
[0023] Compared with the prior art, the present invention achieves the following practical technical effects through the above technical solution: This invention constructs a phased, multi-dimensional business tag system comprising industry attribute tags, professional domain tags, process domain tags, and management domain tags. During the question-and-answer phase, it first determines whether the user's question belongs to the target industry, then identifies the user's business intent tags in the professional, process, and management domains respectively. Combined with metadata tag matching and fusion ranking, this expands the selection criteria for candidate knowledge fragments from simple semantic similarity to a combination of semantic similarity and business relevance. Therefore, for knowledge fragments that are semantically similar but do not match in business dimensions, the system can reduce their ranking weight or filter them directly through tag matching, effectively reducing false positives. For knowledge fragments with different expressions but consistent business dimensions, the system can retain and enhance their weight due to tag matching, effectively reducing false negatives.
[0024] In the tag matching process, this invention performs partial matching based on existing tag dimensions for knowledge fragments with incomplete metadata tags, without triggering conflict penalties for unlabeled dimensions. This design ensures that even if a knowledge fragment's metadata tags are missing in certain dimensions, it can still enter the candidate set as long as the labeled dimensions match the user's business intent tags. This avoids over-filtering of valuable content due to missing tags and improves the system's adaptability to incompletely labeled knowledge bases.
[0025] This invention employs a fusion ranking score to reorder candidate knowledge fragments, integrating vector similarity scores, label relevance scores, and label conflict penalty terms. The label conflict penalty term reduces the weight of knowledge fragments from professional, process, or managerial domains that clearly conflict with user intent, thus prioritizing truly business-relevant knowledge fragments in the candidate sequence. Consequently, the proportion of highly relevant knowledge fragments entering the input context of the large model is increased, effectively reducing the interference of irrelevant information on the generation process. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating the question-answer relevance optimization method based on multi-dimensional label recognition described in this invention.
[0027] Figure 2This is a schematic diagram of the question-answering relevance optimization system based on multi-dimensional label recognition as described in this invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described in further detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are for illustrative purposes only and are not intended to limit the scope of the invention.
[0029] Example 1
[0030] like Figure 1 As shown, a question-answering relevance optimization method based on multi-dimensional label recognition includes the following steps: S1: Construct a phased, multi-dimensional business tag system that includes at least industry attribute tags, professional field tags, process field tags, and management field tags; S2: Pre-configure metadata tags for knowledge fragments in the knowledge base that are consistent with the phased multidimensional business tag system; S3: Receive user questions and extract business intent tags from user questions according to the phased multi-dimensional business tag system; first, determine whether the user question belongs to the target industry, and after confirming that it belongs to the target industry, identify its business intent tags in the professional field, process field and management field respectively. S4: Match the business intent tags with the metadata tags in step S2, and calculate the tag relevance score for each knowledge fragment; S5: Combine the vector similarity score with the label relevance score obtained in step S4 to rearrange the candidate knowledge fragments and generate a rearranged list of knowledge fragments; S6: Input the rearranged top K knowledge fragments and the user's question into the large model to generate the final response.
[0031] In step S1, taking the power industry application as an example, in the first stage, the industry attribute tags are used to determine whether the user's question belongs to the power industry, serving as the entry condition for the entire identification process. If the question does not belong to the power industry, it will not enter the power knowledge base retrieval process to avoid irrelevant questions being mistakenly entered into the database. In the second stage, after confirming that the question belongs to the power industry, professional domain tags, process domain tags, and management domain tags are identified respectively. Professional domain tags may include substation, transmission, distribution, technical and economic aspects, etc.; process domain tags may include design, surveying, construction, acceptance, operation and maintenance, etc.; and management domain tags may include quality, safety, schedule, cost, compliance, etc. The phased multi-dimensional business tag system is not a simple flat multi-tag classification, but rather completes the industry attribute judgment first, and then carries out business dimension identification. The phased multi-dimensional business tag system can reduce the risk of non-power issues being mistakenly entered into the database, cross-professional issues being mismatched, and cross-management target issues being mistakenly recalled.
[0032] In step S2, during the knowledge base entry phase, metadata tags are pre-configured for knowledge fragments. These metadata tags are consistent with the phased, multi-dimensional business tag system established in S1, including at least industry attribute tags, professional domain tags, process domain tags, and management domain tags. For example, a knowledge fragment from the "Safety Management Regulations for Transmission Line Construction" can be configured as "Power Industry - Transmission - Construction - Safety"; a knowledge fragment from the "Quality Acceptance Documents for Substation Equipment Foundations" can be configured as "Power Industry - Substation - Acceptance - Quality". In this way, each knowledge fragment in the knowledge base carries structured tags that can be used for business relevance judgment, in addition to its text vector. In the actual knowledge base, not all knowledge fragments possess complete professional domain tags, process domain tags, and management domain tags. For content with only partial dimension tags, it is allowed to participate in partial matching using existing tags. Unlabeled dimensions are not considered business conflicts, nor are they used as direct filtering criteria; as long as the labeled tags match the user's business intent and there is no explicit conflict, the knowledge fragment can still enter the candidate related knowledge fragment set.
[0033] No. The metadata tags for each knowledge fragment are: ; in, Indicates industry metadata tags, Metadata tags representing professional fields, Represents process domain metadata tags, Represents metadata tags for the management domain; It can be empty or a default value, indicating that the corresponding dimension is not labeled.
[0034] In step S3, after receiving the user's question, the first stage of industry attribute identification is performed to determine whether it belongs to the power industry. If it is determined to be non-power industry, the recall weight of the power knowledge base is reduced or the question is transferred to the general question-and-answer process; if it is determined to be power industry content, the second stage of business tag identification is performed. In the second stage, professional domain tags, process domain tags, and management domain tags are identified respectively. The three dimensions can be identified in parallel or prioritized according to business needs, but their outputs together constitute the business intent tag group of the user's question. For example, for the question "What are the safety requirements when constructing a transmission line crossing and erection?", the system can output power industry, transmission, construction, and safety. This business intent tag does not replace the semantic expression of the user's question, but is used to correct the business direction of candidate content during the retrieval stage, enabling the system to clearly understand the power profession, business process, and management goals inquired by the user, and providing a basis for subsequent metadata matching.
[0035] For example, if a user's question "How's the weather today?" is determined to be outside the power industry, it will not be searched in the power knowledge base. If it is determined to belong to the power industry, then professional, process, and management tags will be identified respectively. In this embodiment, the Qwen3-4B model is used as the user intent recognition module, targeting the phased multi-dimensional business tag system established in S1 to extract business intent tags from user questions. During training, parameters can be efficiently fine-tuned using the QLoRA method based on Qwen3-4B, controlling training costs and deployment resource consumption while enabling the model to stably complete multi-dimensional tag recognition in power business scenarios. Training samples can consist of power industry question-and-answer corpora, historical search logs, manually annotated questions, rewritten similar questions, and highly similar, low-negativity samples. The classifier outputs a unified structured result, which is convenient for the subsequent retrieval module to directly parse and use.
[0036] The business intent tag for a user's question can be represented as: ; in, Indicates industry attributes, Indicates a professional field label, Indicates process domain label, This indicates a label related to the management field.
[0037] The following example uses a specific user question to illustrate this step: When a user inputs "What are the safety requirements when constructing a power transmission line crossing structure?", the system first confirms that the question belongs to the power industry, and then identifies the professional field as power transmission, the process field as construction, and the management field as safety, thus obtaining a business intent icon (power industry, power transmission, construction, safety).
[0038] In step S4, after the classifier outputs the business intent tag for the user's question, the system matches it with the metadata tags. During matching, the industry attribute is first determined to ensure that non-electrical content does not enter the electrical professional Q&A process; then, business relevance matching is performed on the professional domain, process domain, and management domain. To accommodate cases where metadata tags are not fully annotated, tag relevance scores can be defined as follows: ; in, The label relevance score. This indicates a user issue. Indicates the first in the knowledge base A knowledge fragment; This represents the function for determining industry attributes. , , These represent the weights for the professional field, the process field, and the management field, respectively. , , These represent effectiveness indicators in the professional, process, and management domains, respectively. , , These represent the degree of matching in the professional field, process field, and management field, respectively.
[0039] For example, when a user's question is tagged with "power industry - transmission - construction - safety", the system prioritizes knowledge fragments that have the tags of transmission, construction, and safety. For content that only matches transmission but not construction or safety, the ranking weight is reduced. For content that clearly conflicts with the user's intent, such as substation - design - quality, it can be directly filtered or downgraded.
[0040] In this embodiment, tag compatibility relationships can also be set. Tags that match exactly receive a higher relevance score, adjacent or compatible tags within the same business chain receive a partial relevance score, and tags that clearly cross professional, process, or management objectives trigger conflict penalties. This allows semantically similar but business-irrelevant content to be removed or downgraded, reducing the probability of false detections.
[0041] For knowledge fragments with incomplete metadata tags, the system does not directly classify them as irrelevant content. Instead, it performs partial matching based on existing tag dimensions. For example, if a user's question tag is "Power Industry-Transmission-Construction-Safety," and a knowledge fragment only has the "Power Industry-Transmission" tag, the system can still award a matching score in the professional domain and retain the fragment. Similarly, a knowledge fragment with only the "Power Industry-Safety" tag can still participate in matching in the management domain. Unlabeled dimensions do not trigger conflict penalties, but their business relevance score is lower than that of knowledge fragments with complete matching across all three tag categories. The validity indicator factor in the tag relevance score calculation formula... , , This is designed to handle unlabeled dimensions: if a dimension is unlabeled, the corresponding factor is 0, and that dimension does not participate in the weighted average.
[0042] In step S5, the candidate knowledge fragments are rearranged using a fusion ranking score, whereby the fusion ranking score is expressed as: ; in, To merge sorted scores, For vector similarity scores, The label relevance score. For tag conflict penalty items, , , These are the weight coefficients for vector similarity score, label relevance score, and label conflict penalty term, respectively. This indicates normalization processing. This indicates a user issue. Indicates the first in the knowledge base A knowledge fragment.
[0043] The fusion ranking score integrates vector similarity, label relevance, and conflict penalty. For example, when a user's question is tagged "Power Industry - Transmission - Construction - Safety," the system can set a positive value for the label conflict penalty for knowledge fragments tagged "Power Industry - Substation - Design - Quality," thereby lowering their ranking score. By adjusting the weight coefficients, the system can flexibly balance recall and precision in different business scenarios. Normalization makes the vector similarity score and label relevance score comparable in dimensions. It should be noted that for knowledge fragments containing similar words such as "construction" and "requirements" but tagged as "substation - design - quality" (such as substation civil engineering design specifications), they will be downgraded or filtered because the business dimension is inconsistent with the user's true intent; while for knowledge fragments that are not completely consistent with the user's question in literal expression but are also tagged as "transmission - construction - safety" (such as "risk control measures for crossing operations" and "protection requirements for adjacent live conductors"), they are retained and their ranking weight is increased.
[0044] This invention does not completely replace vector retrieval, but rather introduces business tag relevance correction based on vector recall. Vector similarity is mainly used to discover semantically related candidate sets, while matching business intent tags with metadata tags is used to determine whether these candidate contents truly match the user's business intent. After obtaining the business intent tag of the user's question, the system can first determine the candidate knowledge range based on the matching relationship between the tag and the knowledge base metadata tags, and then rank them within the candidate range using vector similarity. When metadata tags are incompletely labeled, the candidate range is insufficient, or the tag confidence is low, vector recall results can also be introduced as supplementary candidates, and they can be downweighted or filtered through conflict penalty terms.
[0045] The content ultimately entering the large model context not only closely resembles the user's question semantically, but also aligns with the user's intent across the power industry, professional fields, process domains, and management domains, thereby enhancing the professionalism and usability of the answers. To improve classification stability, mechanisms such as phased label supervision, structured output constraints, long-tail label processing, hard-to-bear sample comparison, and confidence gating can be incorporated during training, without further restrictions on specific training parameters. Through the aforementioned training and ranking process, the business intent of the user's question can participate in the retrieval process in a parsable and controllable structured manner, thereby increasing the probability of highly relevant knowledge entering the large model context.
[0046] In step S6, the rearranged top K knowledge fragments are input into the large model along with the user's question. Since the knowledge fragments entering the context are already aligned with the user's intent in both semantic and business dimensions, the large model can generate a final response based on more accurate and business-oriented knowledge content, reducing irrelevant answers, generalized responses, and insufficient evidence. Continuing the example above, the large model ultimately receives knowledge content highly relevant to power transmission, construction, and safety, and generates a professional answer based on this, addressing the safety requirements for the erection of the crossing structure.
[0047] This embodiment provides a complete application example: taking the Q&A on safety during power transmission line construction as an example.
[0048] A user entered the question: "What are the safety requirements for the construction of power transmission line crossings?" The system first makes a judgment according to the phased multidimensional label recognition process: the first phase confirms that the problem belongs to the power industry; the second phase identifies the professional field, process field and management field respectively to obtain the business intent label: power industry, power transmission, construction and safety.
[0049] Subsequently, the system matches knowledge fragments with corresponding metadata tags in the knowledge base. If knowledge fragments such as the Safety Regulations for Transmission Line Construction, the Operation Guidelines for Erecting Crossing Frames, and the Safety Risk Management Documents for Transmission Engineering Construction exist in the knowledge base, their tags are highly consistent with the user's question (Power Industry - Transmission - Construction - Safety), and they are given priority for retention and sorting.
[0050] For candidate content containing similar words such as "construction" and "requirements" but tagged as "substation-design-quality" (e.g., substation civil engineering design specifications), the ranking will be reduced or filtered because the business dimension is inconsistent with the user's true intent. For candidate content that is not completely consistent with the user's question in terms of wording but is also tagged as "transmission-construction-safety" (e.g., "risk control measures for crossing frame operations" and "protection requirements for adjacent live conductors"), the ranking will be increased.
[0051] Ultimately, the large model receives knowledge content highly relevant to power transmission, construction, and safety, and generates professional answers based on this knowledge to address the safety requirements for the erection of cross-passage structures. Compared to traditional vector retrieval, this process can simultaneously reduce the probability of false recalls of semantically similar but business-irrelevant content, as well as the probability of truly relevant content being filtered out due to differences in expression.
[0052] In a real-world case, a test set was constructed containing 1200 user questions from the power industry and 37872 knowledge fragments. Each question was manually labeled with the corresponding set of real-world relevant knowledge fragments. The system uses the top 8 candidates as the context input for the large model, and the performance of traditional vector retrieval schemes is compared with that of the present invention.
[0053]
[0054] Among them, the top 8 candidate accuracy represents the proportion of truly relevant fragments among the 8 knowledge fragments that enter the context of the large model; the top 8 candidate recall represents the proportion of truly relevant fragments covered by the top 8 candidates; the average reciprocal ranking is used to measure the ranking position of the first truly relevant fragment in the candidate sequence; the professional usability of the generated answer is evaluated manually from three dimensions: whether the question is answered, whether it is based on correct knowledge, and whether there is a significant business deviation.
[0055] As can be seen from the comparison results, the present invention reduces the false detection rate from 41.4% to 15.1% and the false negative rate from 30.6% to 12.9% by using phased multi-dimensional business tag recognition and metadata tag matching and rearrangement. It can improve the probability of business-related content entering the context of the large model while retaining the vector similarity recall capability, thereby improving the final question answering quality.
[0056] Example 2
[0057] like Figure 2 As shown, this embodiment provides a question-answer relevance optimization system based on multi-dimensional label recognition, used to execute the question-answer relevance optimization method based on multi-dimensional label recognition described in Embodiment 1, including: The tag system construction module is used to build a phased, multi-dimensional business tag system; The knowledge base annotation module is used to pre-configure metadata tags for knowledge fragments in the knowledge base that are consistent with the phased multidimensional business tagging system. The user intent recognition module is used to receive user questions and extract business intent tags; The tag matching module is used to match business intent tags with metadata tags of knowledge fragments and calculate tag relevance scores; The fusion ranking module is used to rearrange candidate knowledge fragments by combining vector similarity scores and label relevance scores; The generation module is used to input the rearranged top K knowledge fragments along with the user's question into the large model to generate the final response.
[0058] The modules described above can be deployed on servers, workstations, or edge computing devices, and are implemented by executing corresponding computer programs through a processor. In actual deployment, the tag system construction module and the knowledge base annotation module run during the system initialization phase; the user intent recognition module, tag matching module, fusion sorting module, and generation module are executed online with each question-and-answer request.
[0059] Example 3
[0060] This embodiment provides an electronic device, including a processor and a memory. The memory stores a computer program, and when the processor executes the computer program, it implements the question-answering relevance optimization method based on multi-dimensional label recognition described in Embodiment 1.
[0061] This embodiment also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the question-answering relevance optimization method based on multi-dimensional tag recognition described in Embodiment 1. The computer-readable storage medium may be ROM, RAM, hard disk, optical disk, cloud storage, or any other form of non-transitory computer-readable medium.
[0062] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A question-answering relevance optimization method based on multi-dimensional label recognition, characterized in that, Includes the following steps: S1: Construct a phased, multi-dimensional business tag system that includes at least industry attribute tags, professional field tags, process field tags, and management field tags; S2: Pre-configure metadata tags for knowledge fragments in the knowledge base that are consistent with the phased multidimensional business tag system; S3: Receive user questions and extract business intent tags from user questions according to the phased multi-dimensional business tag system; first, determine whether the user question belongs to the target industry, and after confirming that it belongs to the target industry, identify its business intent tags in the professional field, process field and management field respectively. S4: Match the business intent tags with the metadata tags in step S2, and calculate the tag relevance score for each knowledge fragment; S5: Combine the vector similarity score with the label relevance score obtained in step S4 to rearrange the candidate knowledge fragments and generate a rearranged list of knowledge fragments; S6: Input the rearranged top K knowledge fragments and the user's question into the large model to generate the final response.
2. The question-answering relevance optimization method based on multi-dimensional label recognition according to claim 1, characterized in that, In step S1, the professional field labels include substation, transmission, distribution, or technical and economic fields; the process field labels include design, surveying, construction, acceptance, or operation and maintenance; and the management field labels include quality, safety, schedule, cost, or compliance.
3. The question-answering relevance optimization method based on multi-dimensional label recognition according to claim 1, characterized in that, In step S3, when a user's question is determined to be outside the target industry, its recall weight in the target industry knowledge base is reduced or it is transferred to the general question-and-answer process.
4. The question-answering relevance optimization method based on multi-dimensional label recognition according to claim 1, characterized in that, In step S4, for knowledge fragments with incomplete metadata tags, partial matching is performed based on their existing tag dimensions. Unlabeled dimensions do not trigger conflict penalties, but their business relevance score is lower than that of knowledge fragments with complete tag matching.
5. The question-answering relevance optimization method based on multi-dimensional label recognition according to claim 1, characterized in that, In step S5, the candidate knowledge fragments are rearranged using a fusion ranking score, whereby the fusion ranking score is expressed as: ; in, To merge sorted scores, For vector similarity scores, The label relevance score. For tag conflict penalties, , , These are the vector similarity score, label relevance score, and weight coefficient of the label conflict penalty term, respectively. This indicates normalization processing. This indicates a user issue. Indicates the first in the knowledge base A knowledge fragment.
6. The question-answering relevance optimization method based on multi-dimensional label recognition according to claim 1, characterized in that, In step S3, the Qwen3-4B model is used as the user intent recognition module to extract multi-dimensional business intent tags from user questions.
7. The question-answering relevance optimization method based on multi-dimensional label recognition according to claim 1, characterized in that, The label relevance score is defined as follows: ; in, The label relevance score. This indicates a user issue. Indicates the first in the knowledge base A knowledge fragment; This represents the function for determining industry attributes. , , These represent the weights for the professional field, the process field, and the management field, respectively. , , These represent effectiveness indicators in the professional, process, and management domains, respectively. , , These represent the degree of matching in the professional field, process field, and management field, respectively.
8. A question-answer relevance optimization system based on multi-dimensional label recognition, used to execute the question-answer relevance optimization method based on multi-dimensional label recognition as described in any one of claims 1 to 7, characterized in that, include: The tag system construction module is used to build a phased, multi-dimensional business tag system; The knowledge base annotation module is used to pre-configure metadata tags for knowledge fragments in the knowledge base that are consistent with the phased multidimensional business tagging system. The user intent recognition module is used to receive user questions and extract business intent tags; The tag matching module is used to match business intent tags with metadata tags of knowledge fragments and calculate tag relevance scores; The fusion ranking module is used to rearrange candidate knowledge fragments by combining vector similarity scores and label relevance scores; The generation module is used to input the rearranged top K knowledge fragments along with the user's question into the large model to generate the final response.
9. An electronic device comprising a processor and a memory, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the question-answering relevance optimization method based on multi-dimensional label recognition as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the question-answering relevance optimization method based on multi-dimensional label recognition as described in any one of claims 1 to 7.