Multi-knowledge-base scheduling routing method based on intention recognition and feedback optimization
By adopting a multi-knowledge base scheduling and routing method based on intent recognition and feedback optimization, the shortcomings of existing RAG systems in user intent understanding and routing strategy optimization are addressed. This enables dynamic and accurate knowledge base scheduling, adapts to multimodal and multi-scenario information retrieval, and improves the intelligence and accuracy of the question answering system.
Patent Information
- Application Number
- CN202511314083.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-15
- Publication Date
- 2025-11-18
AI Technical Summary
The existing RAG system lacks the ability to understand and dynamically adjust to the user's true intent, resulting in the invocation of irrelevant knowledge bases and the failure to recall relevant knowledge, which affects the quality of answers. Furthermore, it cannot optimize routing strategies based on historical interaction results and is difficult to adapt to knowledge base scheduling in multimodal and multi-scenario applications.
The multi-knowledge base scheduling and routing method optimized by intent recognition and feedback includes user input parsing, knowledge base capability modeling, routing decision and invocation, information generation and feedback optimization. It utilizes lightweight and large language models to generate intent tags, and combines capability profiles and matching scoring matrices to achieve dynamic knowledge base selection and self-evolution.
It achieves more accurate and efficient knowledge base scheduling, adapts to multimodal and multi-scenario information retrieval, improves the system's intelligence and response accuracy, has self-evolution capabilities, and is suitable for scenarios such as text question answering, multimodal question answering, and document generation.
Smart Images

Figure CN120973866A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a multi-knowledge base scheduling routing method, in particular to a multi-knowledge base scheduling routing method based on intention recognition and feedback optimization. BACKGROUND
[0002] With the wide application of large language models (LLM) and retrieval augmented generation (RAG) technology, building a question and answer system containing multiple heterogeneous knowledge sources (such as text library, image library, structured database, etc.) has become the development direction of the new generation of intelligent applications. In such systems, the routing and scheduling strategy of the knowledge base (KB) directly affects the final retrieval quality and the accuracy of the generated content.
[0003] RAG (Retrieval-Augmented Generation) is a technology framework that combines information retrieval and large language model generation capabilities, aiming to make the model more accurate, informative, and reliable in answering questions or generating text. RAG includes a retriever and a generator. The retriever finds relevant documents or passages from external knowledge bases based on user input (such as FAISS / Elasticsearch / Milvus vector databases), and the generator inputs the user's question and the retrieved content as context into a large language model (such as GPT, T5, BERT2BERT, etc.) for generation.
[0004] However, existing RAG systems mostly use static or fixed rule-based knowledge base calling methods, lacking understanding of user's real intentions and dynamic adjustment capabilities, especially when facing complex, multi-modal, and cross-domain inputs, which can easily lead to the following problems: • Irrelevant knowledge bases are called, increasing interference; • Relevant knowledge is not recalled, affecting the quality of the answer; • Unable to optimize routing strategies based on historical interaction results, lacking feedback loops.
[0005] Therefore, there is an urgent need for a dynamic knowledge base routing method that combines user intention recognition and feedback learning mechanisms to improve the intelligence, response accuracy, and scalability of the system.
[0006] Specifically, the present application aims to solve the following technical problems: 1. Inaccurate knowledge base selection problem: Existing systems cannot dynamically select the most suitable knowledge base based on the semantic intent of user input. In multi-knowledge-base scenarios, there are problems such as "false recall" and "redundant calls", which reduce retrieval efficiency and generation quality.
[0007] 2. Lack of deep understanding of users' true intentions Most existing solutions rely solely on shallow features such as keywords and embedding similarity for knowledge base selection, making it difficult to understand the contextual semantics and task intent behind user questions.
[0008] 3. The problem of not being able to optimize routing strategies using historical feedback. Existing routing mechanisms are mostly statically configured or rule-based, lacking the ability to "learn and optimize based on historical retrieval feedback", and thus failing to achieve self-evolution of knowledge base scheduling strategies.
[0009] 4. Lack of intelligent scheduling mechanisms to adapt to multimodal and multi-scenario knowledge systems In cross-modal scenarios (such as text-based question answering), routing strategies lack modality awareness and cannot select the optimal path among knowledge sources such as images, tables, and text. Summary of the Invention
[0010] The technical problem to be solved by this invention is to provide a multi-knowledge base scheduling and routing method based on intent recognition and feedback optimization, which is applicable to multi-knowledge base retrieval augmentation generation (RAG) systems and can achieve a more accurate, efficient and self-evolving knowledge base scheduling mechanism.
[0011] The technical solution adopted by this invention to solve the above-mentioned technical problems is to provide a multi-knowledge base scheduling and routing method based on intent recognition and feedback optimization, including the following steps: S1, User input parsing and semantic intent recognition: Receive multimodal input from the user, perform deep semantic parsing on the input content through natural language understanding and multimodal analysis, identify the user's query intent, task type, topic domain, and key entities, and output standardized intent tags; S2, Knowledge base capability modeling and matching scoring: Construct a capability profile for each knowledge base, including its supported modal types, topic domains, task types, and response granularity; then, based on the similarity between the user's intent tags and the capability profiles of each knowledge base... The system generates a routing matching score matrix to provide a basis for subsequent scheduling decisions; S3, Knowledge Base Scheduling Decision and Invocation: Based on the score matrix and the set matching threshold, one or more most relevant candidate knowledge bases are selected, and a retrieval combination strategy is chosen to achieve information retrieval; S4, Information Retrieval and Result Generation: Information retrieval is performed based on the selected knowledge base, and the retrieval results are combined with the original user input and fed into a large language model to generate content, forming an answer or suggestion output; S5, User Feedback Collection and Strategy Optimization: Feedback information from users during the usage process is collected in real time, and through reinforcement learning and weight update strategies, the knowledge base capability profile and routing strategy parameters are continuously optimized to form a closed-loop feedback mechanism.
[0012] Furthermore, the multimodal input in step S1 includes text, speech, and images, and intent labels are generated using a lightweight classifier or a large language model. These intent labels include query definition categories, diagnostic analysis categories, and image-related categories.
[0013] Furthermore, in step S1, a lightweight distillation model is first used for preliminary classification to achieve acceptable accuracy while ensuring efficiency. Then, for samples with confidence scores below the threshold, the GPT large language model is called for secondary judgment. The final output intent label includes a one-hot encoding for routing decisions and a semantic vector for similarity calculation.
[0014] Furthermore, in step S2, the modal types include text, images, and tables; the subject areas include detection, repair, and products; the task types include definition, attribution, and recommendation; and the response granularity includes summaries, full text, and structured tables.
[0015] Furthermore, the matching scoring matrix in S2 is as follows: ; For user intent vectors, for The capability vector of the first knowledge base; For the first A score for matching the knowledge base with the intent; The matching score threshold; It is one of the following: Cosine similarity:
[0016] Or multiply-add similarity: ;in It is a learnable weight matrix.
[0017] Further, step S3 includes: S31, filtering 1-N candidate knowledge bases according to the matching score and a score threshold; S32, based on the matching score... and setting thresholds Filter candidate knowledge base sets : S33. Set up a fusion strategy to make knowledge base scheduling decisions and calls.
[0018] Furthermore, step S33 involves parallel fusion for knowledge base scheduling decisions and invocation: all candidate knowledge bases participate in the retrieval simultaneously; the retrieval results are then uniformly concatenated and input into the generation model.
[0019] Furthermore, step S33 involves weighted fusion for knowledge base scheduling decisions and invocation: based on matching scores... Weights are assigned to results from different knowledge bases; these weights are used as a reference when sorting, truncating, or aggregating information; the weights can be normalized to... When generating the Prompt, use either "weighted sampling" or "segmented organization".
[0020] Furthermore, the "weighted sampling" weights the intent categories based on historical query frequency and increases the sampling probability for high-frequency intent categories, so that few-shot examples cover the main business scenarios; the "segmented organization" segments the knowledge base by domain, layers it by intent complexity, and adopts a dynamic template of {task description} + {domain context} + {layered examples} + {output format}.
[0021] Furthermore, step S33 performs knowledge base scheduling decisions and invocations based on semantic fusion and rearrangement: after mixing the retrieval results of multiple knowledge bases, the results are reordered using a language model or a lightweight reranker; the information fragments that best match the query are extracted to form the final context; and BM25+Embedding is used for rearrangement and combination, where BM25 is used to capture precise keyword matching and handle word overlap; and Embedding is used to understand semantic relevance and handle synonyms and concept associations.
[0022] Compared with existing technologies, the present invention has the following advantages: The multi-knowledge base scheduling and routing method based on intent recognition and feedback optimization provided by the present invention is applicable to scenarios such as text question answering, multimodal question answering, document generation, and dialogue systems, and is particularly suitable for complex knowledge systems containing multiple heterogeneous knowledge sources (such as text databases, image knowledge bases, structured databases, etc.). By analyzing the semantic intent of user input, combining multimodal recognition and contextual understanding, the most relevant knowledge base is dynamically selected for information retrieval, and the routing strategy is continuously optimized based on feedback data of historical retrieval results, thereby achieving a more accurate, efficient, and self-evolving knowledge base scheduling mechanism. Attached Figure Description
[0023] Figure 1 This is a flowchart of the multi-knowledge base scheduling process based on intent recognition and feedback optimization of the present invention; Figure 2 This is a schematic diagram illustrating the intent parsing of user input in this invention; Figure 3 This is a schematic diagram illustrating the knowledge base matching process of this invention. Figure 4 A schematic diagram illustrating the fusion strategy selection of this invention. Detailed Implementation
[0024] The present invention will now be further described with reference to the accompanying drawings and embodiments.
[0025] Figure 1 This is a flowchart of the multi-knowledge base scheduling process based on intent recognition and feedback optimization in this invention.
[0026] Please see Figure 1 The present invention provides a multi-knowledge base scheduling and routing method based on intent recognition and feedback optimization, comprising: Step S1: User Input Parsing and Semantic Intent Recognition Obtain user-input query information, including text, voice, images, etc. Perform multimodal parsing and language understanding on the input to extract user intent, task type, key entities, etc. Intent labels generated using lightweight classifiers or large language models (LLMs), such as query definition classes, diagnostic analysis classes, and image-related classes.
[0027] Preferably, the lightweight natural language processing model BERT is used in conjunction with a prompt template for task intent recognition, such as... Figure 2 As shown.
[0028] Intent recognition model optimal strategy: • Lightweight model selection: Prioritize using distillation models such as DistilBERT and TinyBERT for initial classification, achieving acceptable accuracy while ensuring efficiency. • Larger model supplement: For samples with confidence scores below the threshold, use large language models such as GPT-3.5 / 4 for secondary judgment. • Domain adaptation: Fine-tuning the pre-trained model using domain corpus for a specific knowledge base domain.
[0029] Template customization based on intent: Task description + Domain context + List of intent labels + Few-shot example + Output format requirements • Dynamically adjust the Prompt template based on different knowledge bases • Supports intent recognition in multi-turn dialogue contexts • Configurable confidence threshold and fallback strategy.
[0030] The final representation of the intent label: Supports two representation methods: 1. One-hot encoding (used for routing decisions) • Single-label classification: [0,0,1,0,0] represents the 3rd intent category. • Multi-label classification: [1,0,1,0,1] indicates matching multiple intents simultaneously; 2. Semantic vectors (used for similarity calculation) • Generate 768 / 1024-dimensional semantic representations using BERT's [CLS] token or sentence vector model. • Supports open-domain intent discovery and similar query matching • Facilitates online learning and cluster analysis of new intent categories.
[0031] Step S2: Knowledge base capability modeling and matching scoring For each knowledge base, a capability profile (KB Profile) is created, including the following dimensions: i. The modalities contained (text / image / table, etc.) ii. Coverage of subject areas (testing / repair / products, etc.) iii. Supports question-and-answer types (definition-based, attribution-based, recommendation-based, etc.) iv. Response granularity and structure (abstract / full text / structured tables, etc.) The identified intent tags are matched with the capabilities of each knowledge base to generate a route matching score matrix (KBMatch Score).
[0032] The derivation logic is as follows: set up: The user intent vector (identified from step S1, such as one-hot encoding or semantic vector); for The capability vector of the first knowledge base (composed of domain labels, modality labels, and content features); For the first A score for matching the knowledge base with the intent; The matching score threshold.
[0033] Matching scoring function:
[0034] in, It can be one of the following: i. Cosine similarity:
[0035] ii. Weighted dot-product similarity:
[0036] in It is a learnable weight matrix.
[0037] Filtering function:
[0038] The entire derivation process is as follows: Figure 3 As shown.
[0039] Step S3: Routing Decision and Knowledge Base Scheduling S31. Based on the matching score, select 1-N candidate knowledge bases according to the score threshold; S32, Based on matching score and setting thresholds Filter candidate knowledge base sets :
[0040] S33. Set the fusion strategy (such as weighted average, multi-way search and re-sorting, etc.); In the initial stage of the system, the administrator can set the default fusion strategy to ensure controllability. During operation, the system will collect user feedback in real time (such as satisfaction, task completion rate) and use the feedback results as the basis for weight updates, so that the fusion strategy gradually tends to the optimal combination.
[0041] i. Parallel Fusion All candidate knowledge bases participate in the retrieval simultaneously; the retrieval results are then concatenated and input into the generative model. Advantages: Simple and comprehensive, retains a lot of information; Disadvantages: May be redundant, increases interference.
[0042] ii. Weighted Fusion Based on matching score Assign weights to the results from different knowledge bases; Used as a reference weight when sorting, truncating, or aggregating information; The weights can be normalized to
[0043] Use either "weighted sampling" or "segmented organization" when generating the Prompt;
[0044] Prompt Implementation Plan: 1. Weighted sampling strategy: Intent categories are weighted based on historical query frequency. Increase sampling probability for high-frequency intent categories Ensure that few-shot examples cover the main business scenarios; 2. Segmented organization method: Segmented by knowledge base domain: Technical documents, FAQs, product manuals, etc. Layered by intent complexity: simple queries, compound queries, and reasoning queries. Dynamic template: {Task description} + {Domain context} + {Hierarchical example} + {Output format} Example template structure: "You are a professional intent recognition assistant. [Domain]: Technical document search [Candidate Intent]: Concept search, operation guidance, troubleshooting [Example]:" "How to configure SSL" → Instructions "What are microservices?" → Concept query: Please identify the user intent and return in JSON format.
[0045] iii. Semantic Fusion + Reranking After combining the search results from multiple knowledge bases, the results are re-ranked using a language model / lightweight reranker. Extract the information fragment that best matches the query to form the final context; BM25+Embedding rearrangement can be used; such as Figure 4 As shown, the core idea is: • BM25 (Best Matching): Captures precise keyword matches and handles word overlap. •Embedding: Understanding semantic relevance and handling synonyms and concept associations. • Rearrangement fusion: Combining the advantages of both to improve retrieval accuracy.
[0046] Step S4: Information retrieval and result generation, interpretability output and monitoring Information retrieval is performed based on the selected knowledge base, and the retrieved results are fed together with the original user input into a large language model (LLM) to generate content, forming an answer or suggestion output; Output the final knowledge base routing path and the reason for the call; provide knowledge base call logs and result quality analysis for human supervision or auditing.
[0047] Step S5: Feedback Collection and Strategy Optimization Record user feedback signals to the system response, such as: click result content, user rating / satisfaction level, and whether multi-turn dialogues were successfully resolved; Update routing model parameters or adjust knowledge base capability profile weights based on feedback signals; Policy evolution can be achieved using bandit learning, DQN policy optimization, or RLHF methods.
[0048] The multi-knowledge base scheduling and routing method based on intent recognition and feedback optimization provided by this invention has the following advantages: 1. High intelligence: Dynamic scheduling based on semantic intent avoids rigidity caused by fixed rules; This invention introduces a semantic intent recognition module, enabling a deep understanding of user input rather than relying on keywords or static rules. The system can perceive the user's query purpose, task type, and information demand scope, thereby achieving dynamic access and intelligent selection of the knowledge base, significantly improving the relevance and accuracy of the question-answering system.
[0049] 2. Highly adaptable: Supports multiple knowledge bases, multiple modalities, and multiple task types; The system connects to multiple heterogeneous knowledge bases (text, images, structured tables, etc.) and models the capability profiles of each knowledge base. It can adaptively call the most matching knowledge source based on intent tags. Whether the user input is a structured query, free-language question answering, or cross-modal input (such as mixed text and images), it can achieve flexible adaptation and accurate matching.
[0050] 3. Feedback-driven optimization: It has self-learning and self-adjustment capabilities, becoming more accurate the more it is used; By embedding a user behavior feedback collection module (such as clicks, satisfaction, and dialogue success / failure rates), the system can automatically iteratively optimize the knowledge base capability profile and routing strategy. It supports reinforcement learning, weighted feedback adjustment, and strategy updates, enabling the system to possess the self-evolutionary ability to become more accurate and understandable with repeated use.
[0051] 4. Easy to integrate and expand: It can be integrated with existing RAG systems, knowledge base platforms, and large model reasoning platforms; The method of this invention can be embedded as a scheduling module into existing mainstream RAG platforms (such as LangChain, LlamaIndex, Haystack), and can also be connected to mainstream large model APIs (such as GPT-4, Claude, Qwen, etc.) to adapt to the intelligent question answering deployment needs of different scales and scenarios.
[0052] 5. Good interpretability: It can output the reasons for routing decisions and the path, which is convenient for debugging and supervision.
[0053] The system supports recording and displaying the selection path and scheduling decision basis of the knowledge base, improving the auditability and user trust of the system, and is particularly suitable for deployment in high-security fields such as healthcare, finance, and law.
[0054] Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications and improvements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be defined by the claims.
Claims
1. A multi-knowledge base scheduling and routing method based on intent recognition and feedback optimization, characterized in that, Includes the following steps: S1. User Input Parsing and Semantic Intent Recognition: Receives multimodal input from users, performs deep semantic parsing on the input content through natural language understanding and multimodal analysis, identifies the user's query intent, task type, topic domain and key entities, and outputs standardized intent labels; S2. Knowledge Base Capability Modeling and Matching Scoring: Construct a capability profile for each knowledge base, including its supported modal types, subject domains, task types, and response granularity; then, based on the similarity relationship between user intent tags and the capability profiles of each knowledge base, generate a routing matching scoring matrix to provide a basis for subsequent scheduling decisions. S3. Knowledge Base Scheduling Decision and Recall: Based on the scoring matrix and the set matching threshold, select one or more of the most relevant candidate knowledge bases and choose a retrieval combination strategy to achieve information retrieval. S4. Information Retrieval and Result Generation: Perform information retrieval based on the selected knowledge base, and submit the retrieved results and the original user input to the large language model for content generation to form an answer or suggestion output. S5. User Feedback Collection and Strategy Optimization: Collect user feedback information in real time during the usage process, and continuously optimize the knowledge base capability profile and routing strategy parameters through reinforcement learning and weight update strategies to form a closed-loop feedback mechanism.
2. The multi-knowledge base scheduling and routing method based on intent recognition and feedback optimization as described in claim 1, characterized in that, The multimodal input in step S1 includes text, speech, and images, and intent labels are generated using a lightweight classifier or a large language model. The intent labels include query definition categories, diagnostic analysis categories, and image-related categories.
3. The multi-knowledge base scheduling and routing method based on intent recognition and feedback optimization as described in claim 2, characterized in that, Step S1 first uses a lightweight distillation model for preliminary classification, achieving acceptable accuracy while ensuring efficiency; then, for samples with confidence scores below a threshold, the GPT large language model is called for secondary judgment, and the final output intent label includes a one-hot encoding for routing decisions and a semantic vector for similarity calculation.
4. The multi-knowledge base scheduling and routing method based on intent recognition and feedback optimization as described in claim 1, characterized in that, In step S2, the modal types include text, images, and tables; the subject areas include detection, repair, and products; the task types include definition, attribution, and recommendation; and the response granularity includes summaries, full text, and structured tables.
5. The multi-knowledge base scheduling and routing method based on intent recognition and feedback optimization as described in claim 1, characterized in that, The matching score matrix in S2 is as follows: ; For user intent vectors, for The capability vector of the first knowledge base; For the first A score for matching the knowledge base with the intent; The matching score threshold; It is one of the following: Cosine similarity: Or multiply-add similarity: in It is a learnable weight matrix.
6. The multi-knowledge base scheduling and routing method based on intent recognition and feedback optimization as described in claim 1, characterized in that, Step S3 includes: S31. Based on the matching score, select 1-N candidate knowledge bases according to the score threshold; S32, Based on matching score and setting thresholds Filter candidate knowledge base sets : ; S33. Set up a fusion strategy to make knowledge base scheduling decisions and calls.
7. The multi-knowledge base scheduling and routing method based on intent recognition and feedback optimization as described in claim 6, characterized in that, Step S33 involves parallel fusion for knowledge base scheduling decisions and invocation: all candidate knowledge bases participate in the retrieval simultaneously; the retrieval results are then uniformly concatenated and input into the generation model.
8. The multi-knowledge base scheduling and routing method based on intent recognition and feedback optimization as described in claim 6, characterized in that, Step S33 involves making knowledge base scheduling decisions and retrieval based on weighted fusion: Based on matching score Assign weights to the results from different knowledge bases; Used as a reference weight when sorting, truncating, or aggregating information; The weights can be normalized to ; Use either "weighted sampling" or "segmented organization" when generating the Prompt.
9. The multi-knowledge base scheduling and routing method based on intent recognition and feedback optimization as described in claim 1, characterized in that, The "weighted sampling" weights the intent categories based on historical query frequency and increases the sampling probability for high-frequency intent categories, so that few-shot examples cover the main business scenarios; the "segmented organization" segments the knowledge base by domain, layers it by intent complexity, and adopts a dynamic template of {task description} + {domain context} + {layered examples} + {output format}.
10. The multi-knowledge base scheduling and routing method based on intent recognition and feedback optimization as described in claim 1, characterized in that, Step S33 involves making knowledge base scheduling decisions and invocations based on semantic fusion and rearrangement. After combining the search results from multiple knowledge bases, the results are re-ranked using a language model or a lightweight reranker. Extract the information fragment that best matches the query to form the final context; It uses a combination of BM25 and Embedding for rearrangement. BM25 is used to capture precise keyword matches and handle word overlap; Embedding is used to understand semantic relevance and handle synonyms and concept associations.
Citation Information
Cited By
Intelligent driving scheduling method and device based on intention recognition and medium
CN121524694A
Voice interaction method based on retrieval enhancement generation and multi-model collaboration and application thereof
CN121545518A
Cross-domain large model method and system based on federated RAG
CN121660106A
Cross-domain large model method and system based on federated rag
CN121660106B
Retrieval method of dynamic knowledge base, medium and electronic equipment
CN121833930A