A context-aware based multi-intent routing and trusted question-answer generation method

By employing a context-aware multi-intent routing and trusted question-answering generation method, this paper addresses the issues of intent ambiguity, retrieval-generation coupling, and knowledge boundary ambiguity in enterprise-level complex dialogues of intelligent question-answering systems. It achieves accurate identification of user intent and dynamic routing decisions, thereby improving the robustness and trustworthiness of the system.

CN123068700APending Publication Date: 2026-11-10FUJIAN NEWLAND SOFTWARE ENGINEERING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611040253.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-14
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing intelligent question answering systems suffer from several problems when dealing with complex enterprise-level dialogues, including insufficient recognition of ambiguous intent, a precision-richness dilemma caused by the coupling of retrieval and generation, and blurred knowledge boundaries. These issues result in low relevance and unreliability of the system output.

Method used

By constructing a comprehensive input containing historical session information, and employing multi-intent recognition and dynamic routing mechanisms, user questions are diverted to the corresponding processing links. Clarity judgment and completion are performed, and the questions are split into retrieval questions and response questions. Semantic filtering and reliable generation are carried out, and a triple boundary control strategy before, during and after generation is combined to ensure the credibility of the answers.

Benefits of technology

It achieves accurate identification of user intent and dynamic routing decisions, decouples the adversarial requirements of retrieval and generation, improves the semantic substantive discrimination of knowledge fragments and the security and controllability of generation boundaries, and enhances the robustness and credibility of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123068700A_ABST
    Figure CN123068700A_ABST
Patent Text Reader

Abstract

The application provides a kind of multi-intention routing and trusted question-answer generation method based on context perception in the field of artificial intelligence and intelligent question answering technology, comprising the following steps: receiving user questions and integrating historical session information, identifying the intention and routing to knowledge base or non-knowledge base processing link according to rules;For knowledge base link questions, first judge the intelligibility, if not clear, complete or ask questions;Then split the question into search and answer dual track, enhance search and recall candidate segments;Then filter effective knowledge segments, generate trusted answers combined with knowledge boundaries, finally output responses and update session state, realize complete multi-turn question answering closed loop.The application has the advantages of: greatly improving the accurate identification and dynamic routing decision ability of user intention ambiguity, the semantic decoupling and collaborative optimization ability between search query and answer generation, the safe controllable ability of semantic essence of knowledge segment and generation boundary.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and intelligent question answering technology, and in particular to a context-aware multi-intent routing and trusted question answering generation method. Background Technology

[0002] In recent years, with the rapid development of artificial intelligence (AI) and large language model (LLM) technologies, intelligent question-answering systems have become core tools for enterprise digital transformation, widely empowering scenarios such as knowledge management, customer service, and internal collaboration. In particular, the emergence of retrieval-augmented generation (RAG) technology, by introducing external knowledge bases as the basis for generation, effectively alleviates model illusion, improves the timeliness and credibility of answers, and promotes a leap forward in enterprise-level knowledge service capabilities.

[0003] However, the inherent massive, heterogeneous, and dynamic nature of enterprise knowledge bases makes real-world interaction scenarios highly complex. Faced with overlapping intentions, ambiguous referencing, and implicit constraints in multi-turn dialogues, existing RAG-based intelligent question-answering systems still have significant limitations in their technical architecture. These shortcomings are concentrated in the following three dimensions of deep-seated mechanism conflicts: I. Inflexible request processing chain and lack of intent awareness.

[0004] Existing systems generally employ a "one-size-fits-all" processing logic, indiscriminately feeding all user input into the RAG retrieval chain. This design ignores the widespread non-knowledge-based intents in dialogues (such as casual conversation, human referral, and business operation instructions), leading not only to the ineffective consumption of computing resources but also potentially causing abnormal system responses due to chain conflicts. Crucially, the system lacks a pre-emptive "retrievalability assessment" mechanism. When user questions contain ellipsis (e.g., "What's the process?"), missing entities (e.g., "How do I apply for that?"), or ambiguous conditions (e.g., "Recent reimbursement policies"), the system still blindly performs vector matching. This practice of directly mapping highly ambiguous, low-information queries to a high-dimensional semantic space fundamentally determines the low relevance and unreliability of the retrieval results, making it difficult for subsequent generation stages, no matter how powerful, to correct the noise introduced upstream.

[0005] II. The precision-richness dilemma caused by the high coupling between retrieval query and answer generation.

[0006] In the classic RAG paradigm, both the input query of the retrieval system and the large model prompts of the generation system originate from the user's original question. This coupling leads to an inherent structural contradiction: user questions often contain instructions on output format and tone, or redundant emotional expressions unrelated to the core entities. If the original question is used for retrieval, the format instructions and redundant information will severely interfere with the spatial arrangement of semantic vectors, dilute the weight of core business entities, and cause a sharp drop in recall precision. If the above information is stripped away to simplify the query in order to improve the recall rate, the context will be lost, forcing the large model to "guess" the user's format preferences and the real scenario during the generation stage. The output answer may be literally relevant, but it deviates from the user's expectations in terms of structural integrity and interactive experience. Currently, there is a lack of an effective decoupling mechanism that allows the query to focus on the "optimal solution for semantic recall" while ensuring that the generated prompts take into account the "completeness of user instructions."

[0007] Third, the filtering mechanism for blurred knowledge boundaries and lack of semantic substance discrimination.

[0008] The performance ceiling of a RAG system is highly dependent on the quality of the retrieved fragments. However, current technologies rely solely on vector similarity thresholds or Top-K rankings to filter context, lacking in-depth discernment of whether retrieved fragments provide "substantial semantic support." Enterprise-level knowledge bases are rife with distractors that are literally similar but have drastically different subjects, scopes of application, or temporal validity. Once these "highly similar, pseudo-relevance" fragments are captured by large models, they can easily lead to factual confusion (such as misattribution or rule misuse), generating highly misleading incorrect answers. Furthermore, the system lacks the ability to detect abnormal states such as empty or completely filtered search result sets, and lacks corresponding generation boundary control strategies. In the absence of effective knowledge anchors, large models tend to exploit their fabrication capabilities, creating non-existent systems or processes, which is unacceptable for industrial applications that demand high compliance and rigor.

[0009] In summary, the fundamental problem with existing intelligent question-answering generation technologies in handling complex enterprise-level dialogues lies in the lack of global system perception capabilities—that is, the inability to accurately identify ambiguous intent, the inability to decouple adversarial demands between retrieval and generation, and the inability to define the effective boundaries of knowledge.

[0010] Therefore, how to provide a context-aware multi-intent routing and trustworthy question-answering generation method to improve the ability to accurately identify the ambiguity of user intent and make dynamic routing decisions, the ability to decouple and coordinate between retrieval queries and answer generation, and the ability to deeply discriminate the semantic substance of knowledge fragments and ensure the security and controllability of generation boundaries has become an urgent technical problem to be solved. Summary of the Invention

[0011] The technical problem to be solved by this invention is to provide a context-aware multi-intent routing and trustworthy question-answering generation method, which improves the ability to accurately identify the ambiguity of user intent and make dynamic routing decisions, the ability to decouple and coordinate between retrieval queries and answer generation, and the ability to deeply discriminate the semantic substance of knowledge fragments and the ability to securely control the generation boundary.

[0012] This invention provides a context-aware multi-intent routing and trusted question-answering generation method, comprising the following steps: Step S1, Request Reception and State Construction: Receive the user's question in the current round and obtain historical session information including historical questions, historical intents, previous round answers and session identifiers to form the comprehensive input for the current round; Step S2, Multi-intent recognition and routing: Based on the comprehensive input, identify the intent category of the user's question in the current round, and distribute the user's question to the corresponding processing link according to the preset routing rules; the processing link includes the knowledge base question-answering link and the non-knowledge base question-answering link; Step S3, Clarity Judgment and Question Completion: The clarity of user questions distributed to the knowledge base question-and-answer link is judged. For unclear user questions, the clarity is completed or a clarifying follow-up question is generated based on the historical session information. Step S4, Dual-track rewriting and retrieval enhancement: The user question after clarity judgment or completion is split into a retrieval question for knowledge base retrieval and a response question for answer generation. The retrieval question is then enhanced by querying, knowledge retrieval is performed, and candidate knowledge fragments are retrieved. Step S5, Semantic Filtering and Trusted Generation: Semantic support discrimination is performed on the recalled candidate knowledge fragments, effective knowledge fragments that can substantially support the answer are selected, and the retrieval status is determined. Based on the effective knowledge fragments and the preset knowledge boundary control strategy, a trustworthy answer is generated. Step S6, Result Output and Status Update: Based on the intent category, retrieval status, and trusted answer, output the final response and update the current session status.

[0013] Furthermore, in step S2, the intent category includes at least knowledge base Q&A, casual chat, image Q&A, document Q&A, and requests for human assistance; the routing rules are used to divert user questions that are not knowledge base Q&A to the corresponding general Q&A, multimodal content parsing, or human service guidance processing flow.

[0014] Furthermore, in step S3, the clarity determination specifically includes: determining whether the current user question contains a clear business object, business action, applicable subject, time condition or limiting condition, and whether the contextual pronouns can be parsed from historical session information; The completion of the user question refers to combining the current user question with the historical session information to complete a complete question expression that can be independently retrieved when the user question is unclear but can be parsed from historical session information.

[0015] Furthermore, in step S4, the retrieval question is obtained by removing greetings, emotional expressions, format requirements, and non-retrievable information from the user's question, while retaining the business object, business action, key conditions, and standard terminology; the response question is obtained by retaining the user's complete request, business scenario, limiting conditions, and output format requirements.

[0016] Furthermore, in step S4, the query enhancement is based on the enterprise business terminology table, the thesaurus, and the business rule mapping table, expanding the retrieval question into a set of one or more forms of queries, including standard terminology query, thesaurus query, keyword query, and simplified query.

[0017] Furthermore, in step S5, the semantic support discrimination specifically includes: determining the consistency between the candidate knowledge fragment and the answer question in terms of business subject, applicable object, time range, and intent category, and outputting the support score and the reason for unavailability, and retaining only the candidate knowledge fragments with a support score higher than a preset threshold as valid knowledge fragments.

[0018] Furthermore, in step S5, the knowledge boundary control strategy includes: Pre-generation constraints ensure that only the valid knowledge fragments are used as the basis for generating a credible answer; The generation process includes constraints, requiring that a reliable answer be generated solely based on the provided valid knowledge fragments. After generation, a verification rule is applied to check whether the credible answer contains any deterministic statements that exceed the scope of valid knowledge fragments.

[0019] Furthermore, in step S5, the retrieval status includes the existence of valid knowledge fragments, no recalled candidate fragments, all recalled fragments are unavailable, retrieval timeout, and retrieval anomaly; when the retrieval status is no recalled candidate fragments, all recalled fragments are unavailable, retrieval timeout, or retrieval anomaly, a fallback generation strategy or an anomaly handling strategy is executed, and no credible answer with knowledge basis is generated.

[0020] Furthermore, in step S6, the final response output specifically includes: when the retrieval status is that a valid knowledge fragment exists, outputting a credible answer generated based on the valid knowledge fragment and displaying the citation source; when the user's question is unclear, outputting a clarification follow-up question; when the retrieval status is that no candidate fragments were recalled, all recalled fragments are unavailable, the retrieval timed out, or the retrieval is abnormal, outputting a fallback prompt or an error prompt.

[0021] Furthermore, in step S6, updating the current session state specifically includes recording the current user question, intent category, clarity judgment result, complete question expression, retrieval question, answer question, valid knowledge fragment, credible answer, and reference source for use in the next round of question answering.

[0022] The advantages of this invention are: 1. By constructing a comprehensive input containing historical conversation information, combined with multi-intent recognition and dynamic routing mechanisms, user questions are accurately routed to knowledge base question-and-answer or non-knowledge base question-and-answer links. Unclear questions are assessed for clarity and contextual completion or clarification follow-up questions are generated, thus achieving accurate identification of user intent ambiguity and dynamic routing decisions. 2. Through a dual-track rewriting strategy, the same user question is split into a retrieval question for knowledge base recall and a response question for answer generation. The former removes redundant information to improve recall accuracy, while the latter retains the complete request to ensure generation quality, fundamentally decoupling the adversarial requirements of retrieval and generation and achieving collaborative optimization. 3. Through a semantic support discrimination mechanism, the recalled knowledge fragments undergo multi-dimensional substantive review based on business subject, applicable object, and time range to filter out effective knowledge fragments. Combined with a triple knowledge boundary control strategy before, during, and after generation, and fallback handling for abnormal retrieval states, it ensures that the generated credible answer is strictly anchored within the effective knowledge range and does not create illusions, thus achieving deep semantic substantive discrimination of knowledge fragments and secure control over the generation boundary.

[0023] 2. By identifying intent categories beforehand (covering knowledge base Q&A, casual conversation, image Q&A, document Q&A, and requests for human assistance) and pre-defined routing rules, non-knowledge base Q&A is diverted to a dedicated processing flow. This "classify first, process later" architecture fundamentally eliminates the possibility of accidentally sending casual conversation instructions or business operations into the knowledge retrieval link. This not only avoids the consumption of system resources by ineffective calculations but also prevents irrelevant answers due to link conflicts, significantly improving the robustness and reliability of the system under high concurrency and multiple scenarios.

[0024] 3. By determining whether the current question contains a clear business object, condition, and resolvable reference, unclear questions are supplemented or clarified based on historical conversations. This mechanism ensures that the queries entering the retrieval chain are complete and unambiguous, effectively avoiding the direct embedding of fragmented statements with insufficient information into the high-dimensional semantic space. This improves the relevance of the retrieval results from the source, so that the subsequent generation process no longer passively processes "inherently deficient" inputs.

[0025] 4. The user question is deconstructed into two parallel tracks: "retrieval question" and "response question". The retrieval question is processed by removing noise such as small talk and format requirements, retaining the core entities and conditions, providing the cleanest "semantic fingerprint" for high-precision vector retrieval; while the response question fully retains the user's instructions on the output format and scenario, providing rich context for answer generation. This decoupled design eliminates the need for the system to make trade-offs between "sacrificing precision for richness" or "sacrificing richness for precision", allowing the retrieval and generation stages to obtain optimal inputs, fundamentally reconciling this long-standing technical contradiction.

[0026] 5. Deep semantic support discrimination is performed on the recalled candidate fragments. Consistency verification and scoring are carried out from dimensions such as business subject, applicable object, time range and intent category. This process is equivalent to equipping the knowledge fragments with a "quality inspector". Only fragments that can provide substantial support for answering questions are retained. This effectively filters out those interference information that are literally related but substantially wrong, greatly reducing the risk of the model being misled and laying a solid data foundation for generating credible answers.

[0027] 6. The system defines multiple retrieval states, including "valid knowledge exists," "not recalled," and "all unavailable," enabling it to clearly perceive its own knowledge coverage. Secondly, through a "triple insurance" system of pre-generation constraints, in-generation prompt constraints, and post-generation verification, it strictly restricts large models to only creating based on valid knowledge. Finally, for cases without knowledge basis or abnormal states, it forcibly triggers fallback prompts rather than fabricating answers. This series of strategies eliminates the risk of model "illusion" from a mechanism perspective, ensuring that under all retrieval results, the system's output is safe, honest, and traceable, greatly enhancing the trust of enterprise-level applications in the system.

[0028] 7. Improve the accuracy of multi-intent recognition and routing: By constructing a multi-intent recognition and routing mechanism, user requests are semantically classified and processed and distributed. This enables the differentiation of different request types, such as knowledge base question and answer, casual question and answer, image / document question and answer, and requests to be transferred to human agents. Compared with a single question and answer process, this invention can reduce the occurrence of non-knowledge base question and answer requests mistakenly entering the knowledge retrieval link, and improve the system's accuracy in understanding different business requests, processing matching degree, and routing stability.

[0029] 8. Enhance pre-retrieval question comprehension: Through clarity judgment and question completion mechanisms, identify and process questions that are incomplete, unclear, or lack key conditions; generate clarification follow-up questions for questions with insufficient information; and complete questions that can be understood by combining historical conversations into complete and independently searchable question expressions, thereby reducing the probability of mis-retrieval of ambiguous questions and improving the accuracy and stability of subsequent knowledge retrieval.

[0030] 9. Improve the recall effect of knowledge retrieval: Through a dual-track question rewriting and retrieval enhancement mechanism, user questions are split into retrieval questions for knowledge retrieval and response questions for answer generation; retrieval questions remove redundant expressions, emotional expressions and format requirements, focusing on core business semantics; response questions retain the user's complete demands and output requirements, which can balance retrieval accuracy and answer completeness, and improve the hit rate, stability and effective knowledge fragment ratio of enterprise knowledge base retrieval.

[0031] 10. Enhance the credibility and traceability of answer generation: Through semantic support filtering and credible generation mechanisms, the retrieved knowledge fragments are substantially supported and filtered to remove content that is literally similar but irrelevant to the business or cannot support the answer. Combined with retrieval state awareness and knowledge boundary control strategies, the model is restricted from generating unfounded conclusions. This can reduce the risks of misquoting, over-inference, false citation, and large model illusion, and improve the accuracy, credibility, traceability, and output controllability of intelligent question answering results. Attached Figure Description

[0032] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0033] Figure 1 This is a flowchart of a context-aware multi-intent routing and trusted question-answering generation method according to the present invention. Detailed Implementation

[0034] The overall approach of the technical solution in this application is as follows: Based on the main lines of "state awareness - intent routing - clarity governance - dual-track decoupling - semantic filtering - boundary control," a fully controllable, multi-stage collaborative question-and-answer generation pipeline is constructed. First, by establishing a comprehensive input state containing historical conversation information, multi-intent recognition and dynamic routing mechanisms are used to accurately route user questions to either the knowledge base question-and-answer link or the non-knowledge base question-and-answer link, achieving architectural decoupling of "classification first, processing later" and preventing non-knowledge-based requests from mistakenly entering the retrieval link. Then, clarity diagnosis is used to complete or follow up on incomplete or ambiguous questions based on context, ensuring the integrity of the retrieval input from the source. Subsequently, an innovative "dual-track rewriting" strategy is adopted, decomposing the same question into a "retrieval question" oriented towards retrieval and a "response question" oriented towards generation. The former is separated from the latter. Redundant noise is used to optimize recall accuracy, while the latter retains complete instructions to ensure generation quality, fundamentally resolving input conflicts between retrieval and generation. A semantic support discrimination mechanism then performs substantive consistency checks on the recalled fragments across multiple dimensions, including business subject, applicable object, and time range, to filter out effective knowledge fragments. This, combined with a triple boundary control strategy ("before generation - during generation - after generation") and an anomaly fallback mechanism, ensures that the generated credible answers are strictly anchored to effective knowledge, eliminating the risk of illusions. Finally, a complete multi-round question-and-answer loop is formed through response output and session state updates. These six steps are interconnected and work synergistically, systematically improving the accuracy of intent recognition, the synergy between retrieval and generation, and the security of knowledge boundaries in complex dialogue scenarios. This provides a highly reliable, traceable, and scalable technical solution for enterprise-level intelligent question-and-answer systems.

[0035] Please refer to Figure 1 As shown, a preferred embodiment of the context-aware multi-intent routing and trusted question-answering generation method of the present invention includes the following steps: Step S1, Request Reception and State Construction: Receive user questions from the current round. and obtain information including historical issues. Historical Intent Previous round of answers and session identifier Historical conversation information forms the comprehensive input for the current round. ; In specific implementation, it is possible to Basic preprocessing, such as removing spaces, standardizing punctuation, filtering empty text, and normalizing special characters, yields the normalization problem. This ensures the stable processing of subsequent large language models, intent recognition models, and retrieval modules. Through the above processing, the system generates a session state input containing current question and historical session information, providing a unified context for subsequent multi-intent recognition, question completion, and session state write-back.

[0036] Step S2, Multi-intent recognition and routing: Based on the comprehensive input, identify the intent category of the user's question in the current round, and distribute the user's question to the corresponding processing link according to the preset routing rules; the processing link includes the knowledge base question-answering link and the non-knowledge base question-answering link; Unlike traditional intelligent question-answering systems that directly send all user input to the knowledge base for retrieval by default, this invention performs intent recognition before executing knowledge retrieval to determine whether the current request truly belongs to the knowledge base question-answering scenario, thereby avoiding non-knowledge base requests such as casual conversation, referral to human assistant, and image / document question-answering from mistakenly entering the knowledge base retrieval process.

[0037] Specifically, the system takes user questions, historical questions, historical intents, and previous responses as input, and performs semantic judgment based on a preset intent classification system and intent recognition prompts. The preset intent classification system includes at least knowledge base Q&A, casual conversation / office tasks, image / document Q&A, requests to contact a human agent, and other request types. Intent recognition prompts constrain the intent category, judgment rules, and output format, enabling the model to output the intent category, judgment basis, and routing suggestions for the current request in a structured form. This judgment not only focuses on the text content of the current question but also combines historical conversation information to determine whether the current request continues the previous topic or belongs to a new request type, thereby determining the processing path it should enter. For example, when a user inputs "contact a human agent," the system will identify it as a human service request; when the user inputs a question related to general knowledge, daily office work, or casual conversation, the system will identify it as a casual conversation Q&A; when the user inputs content that is clearly internal enterprise knowledge consultation, such as "What are the travel reimbursement standards?", the system will identify it as a knowledge retrieval Q&A; when a user inputs a question with an omitted subject, such as "What should I do if I forgot my password?", the system will determine its intent category based on historical conversations. If the previous question was "How do I use the company's OA system?", the system can determine that the current question is still related to the company's OA system and belongs to internal knowledge consultation, and will identify it as a knowledge retrieval question and answer; as for the completion of the specific question content, it will be completed by the subsequent clarity judgment and question completion module.

[0038] The above intent recognition process can be represented as: ; in, Indicates the intent category of the current user's question; This represents an intent recognition function built upon a large language model.

[0039] After obtaining the intent category, dynamic distribution is performed according to the preset routing rules: ; in, This indicates the processing path for the current user's question. If the identification result is a knowledge base question and answer, it proceeds to the subsequent clarity assessment and knowledge retrieval process; if the identification result is not a knowledge base question and answer, it proceeds to the triage process and is distributed to general question and answer, multimodal content parsing, human service guidance, or other corresponding processing processes according to the specific intent category.

[0040] By employing the above methods, multiple types of requests can be diverted at the front end of the question-and-answer process, allowing the knowledge retrieval chain to handle only the questions that truly require support from the enterprise knowledge base. This reduces the probability of invalid searches, false recalls, and unreasonable responses, thereby improving the overall processing efficiency and routing accuracy of the intelligent question-and-answer system.

[0041] Step S3, Clarity Judgment and Question Completion: The clarity of user questions distributed to the knowledge base question-and-answer link is judged. For unclear user questions, the clarity is completed or a clarifying follow-up question is generated based on the historical session information. Unlike direct retrieval based on user questions, this invention adds a question clarity judgment step before knowledge retrieval. This step is used to identify whether there are incomplete expressions, missing business objects, unclear applicable subjects, missing time conditions, or unclear contextual references in user questions. Then, it outputs three types of judgment results: question is clear, it can be completed by historical conversations, or it needs to be supplemented by follow-up questions.

[0042] Specifically, the current user's question, historical questions, historical intents, and previous responses are taken as input. Combined with preset clarity judgment rules, the system checks the question's completeness, business scope, applicable subjects, time conditions, and contextual referential relationships. The output is a structured judgment result indicating whether the question is clear, the type of missing information, and whether it can be completed using historical conversations. This process can be represented as: ; in, This indicates the clarity assessment result of the current user's question; This represents a function for judging the clarity of a question based on a large language model.

[0043] For questions that are incomplete and whose referent cannot be determined from historical conversations, the system does not directly perform knowledge retrieval but instead generates clarifying follow-up questions. For example, when a user enters "How do I apply for this?", if the specific matter referred to by "this" cannot be determined from historical conversations, the system will determine that the question lacks a business object and generate follow-up questions such as "What type of application process would you like to inquire about?"

[0044] For follow-up questions, the system will complete the question by combining historical questions and previous answers. For example, if the previous user asked about "employee public rental housing policy," and the current user enters "how to apply for this," the system can complete the question to "how to apply for employee public rental housing" based on historical conversations, and then continue the knowledge retrieval process. The completed user question can be represented as: ; in, This indicates the user's question after completion; This represents the context completion function. Through this process, the system can intercept questions with insufficient conditions before retrieval and perform semantic restoration on follow-up questions that can be completed, thereby reducing false retrieval of ambiguous questions and recall bias, and improving the accuracy of subsequent knowledge retrieval.

[0045] Step S4, Dual-track rewriting and retrieval enhancement: The user question after clarity judgment or completion is split into a retrieval question for knowledge base retrieval and a response question for answer generation. The retrieval question is then enhanced by querying, knowledge retrieval is performed, and candidate knowledge fragments are retrieved. This step decouples the retrieval and generation sides of questions entering the knowledge base question-and-answer chain. After step S3, the user question has undergone clarity assessment and necessary question completion, clearly expressing the user's knowledge inquiry intent. However, in actual question-and-answer scenarios, user questions often still contain greetings, redundant descriptions, output format requirements, tone requirements, etc., which are valuable for the final answer but not suitable for direct participation in knowledge base retrieval. Directly using the original question for recall can easily reduce the retrieval hit rate; oversimplifying the question may lead to a credible answer that loses the user's true needs. Therefore, a dual-track question rewriting mechanism is used to split the same user question into a retrieval question for knowledge recall and a response question for answer generation.

[0046] Specifically, the clear problem output in step S3 is denoted as... Based on a large language model and a pre-defined dual-track rewriting strategy, a dual-track problem rewriting function is constructed. Generate search questions and answering questions The process can be represented as follows: ; Specifically, This includes rules for rewriting search queries and rules for retaining answers. The rules for rewriting search queries are used to retain business objects, business actions, key conditions, and standard terminology, while deleting greetings, emotional expressions, format requirements, and non-essential information. The rules for retaining answers are used to retain complete user requests, business scenarios, limiting conditions, and output format requirements.

[0047] The retrieval question is primarily used to improve knowledge retrieval effectiveness and reduce interference from irrelevant content. The system retains the business object, business action, query conditions, and core keywords, while removing formatting requirements, greetings, emotional expressions, tone requirements, and non-essential information, making it more suitable for keyword retrieval, vector retrieval, or hybrid retrieval. The answer question guides the generation of credible answers, retaining the user's complete request, business scenario, limiting conditions, and output format requirements to ensure that credible answers are both knowledge-based and meet the user's expression needs.

[0048] For example, when a user enters "What are the steps involved in the company's business trip reimbursement process, with the result output in flowchart form?", the system can rewrite the search question as "Travel reimbursement steps" or "Business trip reimbursement process" to improve knowledge base retrieval efficiency. Simultaneously, the answer question remains "What are the steps involved in the company's business trip reimbursement process, with the result output in flowchart form?" to guide subsequent answer generation by organizing content according to flowchart format. In this way, the system can avoid formatted output requirements interfering with knowledge retrieval while ensuring the final answer meets the user's output requirements.

[0049] After generating the search query, the system further performs search enhancement processing. Search enhancement can combine a business terminology table, a thesaurus, and common colloquial expressions mapping rules to convert the user's expression into standard terms or expanded expressions that are easier to find in the knowledge base. For example, "business trip reimbursement" can be expanded to "travel reimbursement, travel expense reimbursement, transportation expense reimbursement," and "account login failure" can be expanded to "account login error, password reset, account permissions," etc. This process can be represented as: ; in, This represents the expanded query set; A glossary of business terms for the company; This refers to a thesaurus; Represents the business rule mapping table; This indicates a query enhancement function. The expanded query set can include various forms such as standard term queries, synonym queries, keyword queries, and simplified queries. ; in, Indicates a standard terminology query; This indicates a synonym-based extended search; Keyword search results; This indicates a simplified query.

[0050] Subsequently, the system performs knowledge retrieval based on the enhanced query set, and the candidate knowledge fragment recall process can be represented as follows: ; in, Represents the enterprise knowledge base; This represents the set of candidate knowledge fragments to be recalled.

[0051] This step decouples the retrieval and generation processes: the retrieval side improves the accuracy of knowledge retrieval through semantic purification, terminology standardization, and query expansion; the generation side ensures the integrity of the answer expression by preserving the user's complete demands and output requirements, thereby providing higher-quality candidate knowledge fragments for subsequent semantic filtering and reliable generation.

[0052] Step S5, Semantic Filtering and Trusted Generation: Semantic support discrimination is performed on the recalled candidate knowledge fragments, effective knowledge fragments that can substantially support the answer are selected, and the retrieval status is determined. Based on the effective knowledge fragments and the preset knowledge boundary control strategy, a trustworthy answer is generated. This step is used to perform a secondary screening of the recalled candidate knowledge fragments and generate a credible answer based on the screened valid knowledge fragments. Unlike the traditional RAG system's "recall and use" approach, this invention adds a semantic relevance judgment step before answer generation. This step filters out noisy fragments that are literally similar but have inconsistent business intent, inconsistent subjects, or cannot support answer generation, thereby reducing the risk of misquoting and illusion generation.

[0053] It's important to note that semantic filtering differs from traditional reranking mechanisms. Reranking primarily reorders candidate fragments based on relevance, typically resulting in a sorted list of fragments. Semantic filtering, however, emphasizes determining whether candidate fragments substantially support the answer, outputting a selection of "usable fragments" and "unusable fragments." In other words, it considers not only the similarity between the fragment and the question but also whether the fragment directly answers the user's question, whether there are inconsistencies in the business entity, applicable scope, or contextual mismatch. The semantic support assessment output includes not only a support score but also a determination of whether a candidate fragment can be used as an answer and the reasons for its unusability. Reasons for unusability include inconsistencies in the business entity, applicable objects, time frame mismatch, keyword similarity without answering the question, and fragment content inconsistent with the user's intent. Even if a candidate fragment ranks highly in relevance, it will not be included in the set of valid knowledge fragments if it does not substantially support the answer.

[0054] Specifically, the answers to the questions With candidate fragments Input the semantic discriminant function of the large language model to determine whether the candidate fragments can substantially support the current problem: ; in, This represents the relevance score between the i-th candidate fragment and the answer to the question; This represents a semantic relevance discrimination function built upon a large language model. The system can retain valid knowledge fragments based on a preset threshold τ. ; in, This represents the set of valid knowledge fragments. Fragments scoring below a threshold are deemed invalid and excluded from subsequent answer generation. In practical applications, semantic discrimination not only determines keyword similarity but also whether the fragment content directly answers the user's question and whether it aligns with the business entity, applicable audience, time frame, and question intent outlined in the user's question. Figure 1 To.

[0055] After obtaining valid knowledge fragments, different answer generation strategies are selected based on the retrieval status. The retrieval status can be represented as: ; in, This indicates the existence of valid knowledge fragments. This indicates that the candidate segments have not been recalled. This indicates that all recalled fragments are unavailable after semantic filtering. This indicates that the search timed out. This indicates an error in the retrieval or generation process.

[0056] when The system will then answer the question. Collection of effective knowledge fragments Knowledge boundary constraint strategy Input a large language model to generate a reliable answer: ; in, This indicates the reliable answer generated in the current round. This is to constrain large language models to answer only based on valid knowledge fragments, and prohibits the fabrication of institutional basis, the generation of false citations, the deterministic expansion of content that does not exist in the fragments, and the mixing of content from different business entities or different scopes of application.

[0057] when for , , or In such cases, instead of generating definitive answers with knowledge-based support, a fallback generation or exception handling strategy is employed. For fallback responses, a knowledge boundary control strategy restricts the model from using specific, institutional, or citation-based expressions, preventing the generation of seemingly definitive corporate policy answers in the absence of valid knowledge support.

[0058] The above steps complete the semantic filtering of candidate fragments, retrieval status identification, and generation of credible answers. The output includes a set of valid knowledge fragments. Search status credible answer and trusted generation identifier .

[0059] Step S6, Result Output and Status Update: Based on the intent category, retrieval status, and trusted answer, output the final response and update the current session status.

[0060] This involves outputting results based on the current intent type, search status, and credible answers. If the search finds a valid knowledge fragment, the output is a result generated from that fragment, along with the corresponding source. If the question is unclear, a clarification question is provided. If the search results are empty, no valid knowledge fragments are found after semantic filtering, the search times out, or a system error occurs, a fallback or error message is displayed. If the current request pertains to non-knowledge retrieval intents such as casual conversation or transferring to a human agent, the output is a routing result. This process can be represented as: ; in, This indicates the final output result of the current round; This represents the function that outputs the result. Indicates the type of intent; Indicates the search status; This indicates a clarification of the questions raised.

[0061] To ensure the traceability of the output results, the system only displays the source of the citation when there is a valid knowledge fragment; when the output content is a clarification question, a fallback suggestion, or an anomaly message, the knowledge citation is not displayed to avoid users mistaking unfounded content for the answer from the knowledge base.

[0062] After the results are output, the system updates the current session state, recording information such as the current question, intent type, clarity judgment result, question completion, search question, answer question, valid knowledge fragments, credible answers, and cited sources. The session state update process can be represented as follows: ; in, Indicates the session state after the current round of updates; This indicates the state of the previous session. The updated state can be used for contextual understanding and question completion in the next round of follow-up questions, thereby improving the system's continuous question-and-answer capabilities.

[0063] In step S2, the intent category includes at least knowledge base Q&A, casual chat, image Q&A, document Q&A, and requests for human assistance; the routing rules are used to divert user questions that are not knowledge base Q&A to the corresponding general Q&A, multimodal content parsing, or human service guidance process.

[0064] In step S3, the clarity determination specifically includes: determining whether the current user question contains a clear business object, business action, applicable subject, time condition or limiting condition, and whether the contextual pronouns can be parsed from historical session information; The completion of the user question refers to combining the current user question with the historical session information to complete a complete question expression that can be independently retrieved when the user question is unclear but can be parsed from historical session information.

[0065] In step S4, the retrieval question is obtained by removing greetings, emotional expressions, format requirements and non-retrievable information from the user's question, while retaining the business object, business action, key conditions and standard terminology; the response question is obtained by retaining the user's complete request, business scenario, limiting conditions and output format requirements.

[0066] In step S4, the query enhancement is based on the enterprise business terminology table, the thesaurus, and the business rule mapping table, expanding the retrieval question into a set of one or more forms of queries, including standard terminology query, thesaurus query, keyword query, and simplified query.

[0067] In step S5, the semantic support discrimination specifically includes: determining the consistency between the candidate knowledge fragment and the answer question in terms of business subject, applicable object, time range and intent category, and outputting the support score and the reason for unavailability, and retaining only the candidate knowledge fragments with a support score higher than a preset threshold as valid knowledge fragments.

[0068] In step S5, the knowledge boundary control strategy includes: Pre-generation constraints ensure that only the valid knowledge fragments are used as the basis for generating a credible answer; The generation process includes constraints, requiring that a reliable answer be generated solely based on the provided valid knowledge fragments. After generation, a verification rule is applied to check whether the credible answer contains any deterministic statements that exceed the scope of valid knowledge fragments.

[0069] In step S5, the retrieval status includes the existence of valid knowledge fragments, no recalled candidate fragments, all recalled fragments are unavailable, retrieval timeout, and retrieval anomaly. When the retrieval status is no recalled candidate fragments, all recalled fragments are unavailable, retrieval timeout, or retrieval anomaly, a fallback generation strategy or an anomaly handling strategy is executed, and no credible answer with knowledge basis is generated.

[0070] In step S6, the final output response specifically includes: when the retrieval status is that a valid knowledge fragment exists, outputting a credible answer generated based on the valid knowledge fragment and displaying the citation source; when the user's question is unclear, outputting a clarification follow-up question; when the retrieval status is that no candidate fragments were recalled, all recalled fragments are unavailable, the retrieval timed out, or the retrieval is abnormal, outputting a fallback prompt or an error prompt.

[0071] In step S6, updating the current session state specifically includes recording the current user question, intent category, clarity judgment result, complete question expression, search question, answer question, effective knowledge fragment, credible answer and reference source, for use in the next round of question answering.

[0072] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A context-aware multi-intent routing and trusted question-answering generation method, characterized in that: Includes the following steps: Step S1, Request Reception and State Construction: Receive the user's question in the current round and obtain historical session information including historical questions, historical intents, previous round answers and session identifiers to form the comprehensive input for the current round; Step S2, Multi-intent recognition and routing: Based on the comprehensive input, identify the intent category of the user's question in the current round, and distribute the user's question to the corresponding processing link according to the preset routing rules; the processing link includes the knowledge base question-answering link and the non-knowledge base question-answering link; Step S3, Clarity Judgment and Question Completion: The clarity of user questions distributed to the knowledge base question-and-answer link is judged. For unclear user questions, the clarity is completed or a clarifying follow-up question is generated based on the historical session information. Step S4, Dual-track rewriting and retrieval enhancement: The user question after clarity judgment or completion is split into a retrieval question for knowledge base retrieval and a response question for answer generation. The retrieval question is then enhanced by querying, knowledge retrieval is performed, and candidate knowledge fragments are retrieved. Step S5, Semantic Filtering and Trusted Generation: Semantic support discrimination is performed on the recalled candidate knowledge fragments, effective knowledge fragments that can substantially support the answer are selected, and the retrieval status is determined. Based on the effective knowledge fragments and the preset knowledge boundary control strategy, a trustworthy answer is generated. Step S6, Result Output and Status Update: Based on the intent category, retrieval status, and trusted answer, output the final response and update the current session status.

2. The context-aware multi-intent routing and trusted question-answering generation method as described in claim 1, characterized in that: In step S2, the intent category includes at least knowledge base Q&A, casual chat, image Q&A, document Q&A, and requests for human assistance; the routing rules are used to divert user questions that are not knowledge base Q&A to the corresponding general Q&A, multimodal content parsing, or human service guidance process.

3. The context-aware multi-intent routing and trusted question-answering generation method as described in claim 1, characterized in that: In step S3, the clarity determination specifically includes: determining whether the current user question contains a clear business object, business action, applicable subject, time condition or limiting condition, and whether the contextual pronouns can be parsed from historical session information; The completion of the user question refers to combining the current user question with the historical session information to complete a complete question expression that can be independently retrieved when the user question is unclear but can be parsed from historical session information.

4. The context-aware multi-intent routing and trusted question-answering generation method as described in claim 1, characterized in that: In step S4, the retrieval question is obtained by removing greetings, emotional expressions, format requirements and non-retrievable information from the user's question, while retaining the business object, business action, key conditions and standard terminology; the response question is obtained by retaining the user's complete request, business scenario, limiting conditions and output format requirements.

5. The context-aware multi-intent routing and trusted question-answering generation method as described in claim 1, characterized in that: In step S4, the query enhancement is based on the enterprise business terminology table, the thesaurus, and the business rule mapping table, expanding the retrieval question into a set of one or more forms of queries, including standard terminology query, thesaurus query, keyword query, and simplified query.

6. The context-aware multi-intent routing and trusted question-answering generation method as described in claim 1, characterized in that: In step S5, the semantic support discrimination specifically includes: determining the consistency between the candidate knowledge fragment and the answer question in terms of business subject, applicable object, time range and intent category, and outputting the support score and the reason for unavailability, and retaining only the candidate knowledge fragments with a support score higher than a preset threshold as valid knowledge fragments.

7. The context-aware multi-intent routing and trusted question-answering generation method as described in claim 1, characterized in that: In step S5, the knowledge boundary control strategy includes: Pre-generation constraints ensure that only the valid knowledge fragments are used as the basis for generating a credible answer; The generation process includes constraints, requiring that a reliable answer be generated solely based on the provided valid knowledge fragments. After generation, a verification rule is applied to check whether the credible answer contains any deterministic statements that exceed the scope of valid knowledge fragments.

8. The context-aware multi-intent routing and trusted question-answering generation method as described in claim 1, characterized in that: In step S5, the retrieval status includes the existence of valid knowledge fragments, no recalled candidate fragments, all recalled fragments are unavailable, retrieval timeout, and retrieval anomaly. When the retrieval status is no recalled candidate fragments, all recalled fragments are unavailable, retrieval timeout, or retrieval anomaly, a fallback generation strategy or an anomaly handling strategy is executed, and no credible answer with knowledge basis is generated.

9. The context-aware multi-intent routing and trusted question-answering generation method as described in claim 1, characterized in that: In step S6, the final output response specifically includes: when the retrieval status is that a valid knowledge fragment exists, outputting a credible answer generated based on the valid knowledge fragment and displaying the citation source; when the user's question is unclear, outputting a clarification follow-up question; when the retrieval status is that no candidate fragments were recalled, all recalled fragments are unavailable, the retrieval timed out, or the retrieval is abnormal, outputting a fallback prompt or an error prompt.

10. The context-aware multi-intent routing and trusted question-answering generation method as described in claim 1, characterized in that: In step S6, updating the current session state specifically includes recording the current user question, intent category, clarity judgment result, complete question expression, search question, answer question, effective knowledge fragment, credible answer and reference source, for use in the next round of question answering.