Method and system for collaborative optimization of domain large model and domain knowledge base
By constructing a two-way information exchange channel, optimizing the knowledge base using a domain-specific large model, and enhancing the large model using the optimized knowledge base, the problems of knowledge cutoff in large language models and insufficient semantic understanding in traditional knowledge bases are solved, thereby realizing automated updates of the knowledge base and improved reasoning capabilities of the large model.
Patent Information
- Application Number
- CN202511663704.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-02-13
AI Technical Summary
Large Language Models (LLMs) suffer from knowledge cutoff issues in domain applications, making it difficult to update professional knowledge in real time and potentially leading to factual errors; traditional knowledge bases lack flexible semantic understanding and generation capabilities.
Construct a two-way information exchange channel, and through efficient, two-way, and continuous information exchange between the domain big model and the knowledge base, optimize the knowledge base using the domain big model and enhance the big model using the optimized knowledge base, forming a closed-loop optimization.
It enables automated completion, error correction, and real-time updates of the knowledge base, enhancing the accuracy of domain knowledge, reducing illusions, and improving the reasoning ability of large models.
Smart Images

Figure CN121525858A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of interdisciplinary technology of artificial intelligence and knowledge engineering, and more specifically, to a method and system for collaborative optimization of a domain-wide model and a domain knowledge base based on a two-way information exchange channel, which is particularly suitable for professional fields with high requirements for accuracy and timeliness. Background Technology
[0002] With the rapid development of Large Language Model (LLM) technology, it has demonstrated powerful capabilities in many natural language processing tasks.
[0003] However, domain applications face two major challenges: (1) large models have a "knowledge cutoff" problem, making it difficult to update professional knowledge in real time and potentially leading to factual errors ("illusions"); (2) traditional knowledge bases (such as knowledge graphs) contain structured, high-precision knowledge, but lack flexible semantic understanding and generation capabilities. Summary of the Invention
[0004] This invention proposes a collaborative optimization method and system for a domain-wide large model and a domain knowledge base. By constructing a two-way information exchange channel, it enables efficient, bidirectional, and continuous information exchange between the domain-wide large model and the knowledge base. The knowledge base utilizes the large model to complete knowledge base completion, error correction, redundancy removal, association discovery, and real-time updates. The optimized, high-quality knowledge base enhances the accuracy of domain knowledge, reduces illusions, and improves the reasoning ability of the domain-wide large model, thereby achieving collaborative optimization.
[0005] The present invention is implemented using the following technical solutions:
[0006] A collaborative optimization method for a domain-wide large model and a domain knowledge base is proposed, including:
[0007] Construct a two-way information exchange channel connecting the domain's large model and the domain's knowledge base; the two-way information exchange channel consists of a knowledge mining and verification channel and a knowledge injection and constraint channel;
[0008] In the knowledge mining and verification channel, domain big models are used to optimize the domain knowledge base: domain big models are used to extract, generate and verify knowledge from multi-source data, and then used to expand, correct and update the domain knowledge base to generate an optimized domain knowledge base;
[0009] In the knowledge injection and constraint channel, the domain knowledge base is used to optimize the domain big model: knowledge is extracted from the optimized domain knowledge base and injected into the training or inference process of the domain big model to generate the optimized domain big model;
[0010] The collaborative optimization process is modeled as a bi-objective optimization problem, and the iterative process is dynamically managed through reinforcement learning to achieve optimal quality of the domain knowledge base and performance of the domain large model.
[0011] In some embodiments of the present invention, the domain knowledge base is optimized using a domain-wide model in the knowledge mining and verification process, including:
[0012] By utilizing cue engineering and mind chain technology, structured cue words are designed to guide domain-wide models to extract entities, relationships, and attributes from unstructured text and generate triples.
[0013] Leveraging the reasoning capabilities of domain-wide models to predict links and discover potential new relationships or patterns; transforming internalized common sense within domain-wide models into explicit knowledge;
[0014] For existing or candidate triples in the domain knowledge base, construct declaration verification prompts, and use prompt words to allow the domain big model to identify knowledge points that need to be updated for deprecation risk assessment;
[0015] The new knowledge or modification suggestions generated by the above steps are written into the candidate knowledge pool. The credibility of multiple candidate versions of a fact is evaluated and fused based on a weighted voting mechanism of a domain-wide model to generate the final candidate.
[0016] In some embodiments of the present invention, the optimization of a large domain model using a domain knowledge base in the knowledge injection and constraint channels includes:
[0017] The domain-specific large model is used to convert knowledge in the domain knowledge base into domain-specific text, and the domain-specific text is used to perform domain-adaptive pre-training or continuous learning on the domain-specific large model.
[0018] Based on the domain knowledge base, instruction fine-tuning data pairs and positive-negative example pairs are constructed, and knowledge consistency constraint loss is added to the training objective to perform supervised fine-tuning and comparative learning on the domain large model;
[0019] During the reasoning phase of the domain-wide model, relevant knowledge fragments are retrieved from the domain knowledge base in real time, and a knowledge base-based distributed pruning strategy is used to bias the model's output to suppress illusions.
[0020] Construct a domain knowledge evaluation set based on the domain knowledge base, regularly evaluate the performance of the domain big model, and feed back the errors generated by the domain big model to the knowledge mining and verification channel as potential signals that the domain knowledge base needs to be supplemented or corrected, thus forming a closed loop.
[0021] In some embodiments of the present invention, the collaborative optimization process includes:
[0022] (1) Define quantitative evaluation metrics to assess the effectiveness of each iteration:
[0023] ;
[0024] in, and These are hyperparameters used to adjust the emphasis on optimizing the domain knowledge base or the large domain model. It is the total reward of the nth iteration;
[0025] For the quality indicators of the domain knowledge base, among which, , , Here, n represents the weighting coefficients, and n represents the nth iteration. Indicates the completeness of the knowledge base. The number of new entities / relations obtained through this round of extraction and reasoning. This refers to the total number of entities / relationships that should exist within the domain, as assessed by domain experts or estimated by authoritative sources; A The accuracy of the knowledge base is calculated by manually reviewing samples of newly added knowledge from the candidate knowledge pool in this round. The freshness of the knowledge base is represented by t, which is the average delay from the publication time of knowledge in the source data to the current time, and λ is the decay coefficient. This indicator encourages the system to absorb the latest knowledge.
[0026] For large-scale model performance metrics, among which, , , These are the weighting coefficients; n represents the nth iteration. The ratio of correct answers to total answers represents the accuracy of facts. It is used to calculate the factual accuracy of the model's generated answers on a fixed domain knowledge evaluation set built on a knowledge base. The ratio of hallucination statements to the total number of statements can be used to annotate the proportion of hallucination statements in the text generated by the model using NLP tools. It indicates the depth of reasoning, using a standardized domain-specific reasoning chain; the question evaluates the correctness and depth of the model's reasoning steps.
[0027] (2) Formulate collaborative optimization states, actions, and strategies:
[0028] state The system's state at the start of iteration n is a feature vector, including: the quality of the knowledge base in the previous iteration. Performance of the previous model and the growth trend of rewards ;
[0029] action The meta controller is based on the current state. The decisions made, including , , , , ; Represents comprehensive optimization; This indicates that only the knowledge base is being optimized; This indicates that only the large model is optimized; Represents lightweight optimization; This indicates hibernation; optimization is not performed, resources are saved, and more new data is awaited.
[0030] Policy π: A function that maps state S to action A. The entire policy is learned using a policy network to maximize long-term cumulative reward. For the goal, among which It is a discount factor;
[0031] (3) Execute iterative optimization algorithms, including:
[0032] Observation state: The system collects data and constructs the current state feature vector. ;
[0033] Meta-controller decision: The policy network generates an action probability distribution based on the current state. Select an action based on the action probability distribution. ;
[0034] Perform the selected action :if Includes domain knowledge base optimization: Enables knowledge mining and verification channels, using... optimization get ,calculate ;
[0035] if Includes domain-wide model optimization: Initiating knowledge injection and constraint channels, using... or optimization get ,calculate ;
[0036] Calculate the reward: Calculate the total reward for this round based on the above indicators. ;
[0037] Strategy Update: Move the experience tuple ( , , , Store in the experience replay buffer;
[0038] A batch of experience is sampled from the buffer, and the policy network parameters θ are updated using the policy gradient algorithm to maximize the expected cumulative reward; the policy gradient update formula is: , where η is the learning rate, V(S) is the state value function, and G is the actual reward;
[0039] State transition: The system enters the initial state of the next iteration. ;
[0040] Termination condition: When the reward R of multiple consecutive iterations grows below the threshold ε, or when computing resources are exhausted, the algorithm terminates or enters a low-power listening mode.
[0041] A collaborative optimization system for a domain-wide large model and a domain knowledge base is proposed, including:
[0042] A domain knowledge base that stores structured, semi-structured, and unstructured domain knowledge;
[0043] Large domain models are used to perform semantic understanding, generation, and reasoning.
[0044] A two-way information exchange channel connecting the domain's large model and its knowledge base includes:
[0045] The knowledge mining and verification channel is used to extract, generate, and verify knowledge from multi-source data using a large domain model, and to use it to expand, correct, and update the domain knowledge base, generating an optimized domain knowledge base.
[0046] The knowledge injection and constraint channel is used to extract knowledge from the optimized domain knowledge base and inject it into the training or inference process of the domain large model to generate the optimized domain large model.
[0047] The optimization and control unit is used to model the collaborative optimization process as a bi-objective optimization problem and dynamically manage the iterative process through reinforcement learning to achieve optimal quality of the domain knowledge base and performance of the domain large model.
[0048] In some embodiments of the present invention, the domain knowledge base is optimized using a domain-wide model in the knowledge mining and verification process, including:
[0049] By utilizing cue engineering and mind chain technology, structured cue words are designed to guide domain-wide models to extract entities, relationships, and attributes from unstructured text and generate triples.
[0050] Leveraging the reasoning capabilities of domain-wide models to predict links and discover potential new relationships or patterns; transforming internalized common sense within domain-wide models into explicit knowledge;
[0051] For existing or candidate triples in the domain knowledge base, construct declaration verification prompts, and use prompt words to allow the domain big model to identify knowledge points that need to be updated for deprecation risk assessment;
[0052] The new knowledge or modification suggestions generated by the above steps are written into the candidate knowledge pool. The credibility of multiple candidate versions of a fact is evaluated and fused based on a weighted voting mechanism of a domain-wide model to generate the final candidate.
[0053] In some embodiments of the present invention, the optimization of a large domain model using a domain knowledge base in the knowledge injection and constraint channels includes:
[0054] The domain-specific large model is used to convert knowledge in the domain knowledge base into domain-specific text, and the domain-specific text is used to perform domain-adaptive pre-training or continuous learning on the domain-specific large model.
[0055] Based on the domain knowledge base, instruction fine-tuning data pairs and positive-negative example pairs are constructed, and knowledge consistency constraint loss is added to the training objective to perform supervised fine-tuning and comparative learning on the domain large model;
[0056] During the reasoning phase of the domain-wide model, relevant knowledge fragments are retrieved from the domain knowledge base in real time, and a knowledge base-based distributed pruning strategy is used to bias the model's output to suppress illusions.
[0057] Construct a domain knowledge evaluation set based on the domain knowledge base, regularly evaluate the performance of the domain big model, and feed back the errors generated by the domain big model to the knowledge mining and verification channel as potential signals that the domain knowledge base needs to be supplemented or corrected, thus forming a closed loop.
[0058] Compared with existing technologies, the advantages and positive effects of this invention are as follows: In the collaborative optimization method and system of domain large model and domain knowledge base proposed in this invention, a two-way information exchange channel is constructed, allowing the domain knowledge base to utilize the semantic understanding, reasoning and generation capabilities of the domain large model to complete the knowledge base's completion, error correction, redundancy removal, association discovery and real-time updates; using the optimized high-quality knowledge base, through knowledge injection, comparative learning and consistency constraints, the domain large model is continuously trained or fine-tuned to enhance its domain knowledge accuracy, reduce illusions and improve its reasoning ability.
[0059] Specifically, it has the following technical advantages:
[0060] 1. Breaking through the one-way mode of current technologies such as RAG (Retrieval Enhancement Generation), a two-way, closed-loop optimization channel of "large model optimizing knowledge base" and "knowledge base optimizing large model" has been established. The two have been upgraded from a tool relationship to a symbiotic relationship, realizing a synergistic effect of 1+1>>2, and achieving true two-way collaboration and closed-loop feedback.
[0061] 2. By deeply utilizing the semantic understanding and generation capabilities of large models, the process of building, completing, correcting, and updating the knowledge base has been automated and intelligentized, greatly reducing the human resource costs of knowledge engineering and improving the quality, breadth, and dynamism of the knowledge base, thus realizing the automated and intelligent evolution of the knowledge base.
[0062] 3. It goes beyond the shallow combination of knowledge injection through context alone. Through knowledge-enhanced continuous pre-training, contrastive learning, consistency constraints and other deep training methods, it solidifies structured knowledge into the model parameters, fundamentally improving the domain cognition accuracy and reliability of the model, significantly reducing illusions, and achieving deep knowledge solidification and illusion suppression in large models.
[0063] 4. Through reinforcement learning, the large model acquires the ability to continuously learn and self-improve. Each iteration enriches and improves the knowledge base, while making the large model more professional and reliable. This design enables the system to adapt to rapid changes in domain knowledge over the long term, achieving iterative self-evolution.
[0064] Other features and advantages of the present invention will become clearer after reading the detailed description of the embodiments of the present invention in conjunction with the accompanying drawings. Attached Figure Description
[0065] The accompanying drawings, as part of this invention, are provided to further illustrate the invention. The illustrative embodiments and descriptions are used to explain the invention but do not constitute an undue limitation thereof. Clearly, the drawings described below are merely some embodiments; those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0066] Figure 1 This invention presents the system architecture of the collaborative optimization system for a large domain model and a domain knowledge base.
[0067] Figure 2 This is a schematic diagram of the collaborative optimization process between the domain big model and the domain knowledge base proposed in this invention (domain knowledge base optimization).
[0068] Figure 3 This is a schematic diagram of the collaborative optimization process between the domain large model and the domain knowledge base proposed in this invention (domain large model optimization). Detailed Implementation
[0069] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments will be clearly and completely described below with reference to the accompanying drawings. The following embodiments are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0070] The present invention proposes a domain-wide large-scale model and knowledge base collaborative optimization system based on a two-way information exchange channel, such as... Figure 1 As shown, it includes:
[0071] The Domain Large Model (Domain LLM) is the core computing engine of the system, performing semantic understanding, generation, and reasoning. It uses DeepSeek, GPT-4, and other technologies as its foundation and performs preliminary domain adaptation.
[0072] The Domain Knowledge Base (Domain KB) stores structured, semi-structured, and unstructured domain knowledge, preferably in the form of a knowledge graph, and includes elements such as entities, relationships, attributes, and events.
[0073] The Bidirectional Information Exchange Channel (BIEC) is used to coordinate the information and control flow between the domain big model and the domain knowledge base, and includes two sub-channels:
[0074] (1) Knowledge mining and verification channel (LLM→KB channel): Extract, generate and verify knowledge from data sources based on domain big model, and expand and correct knowledge base.
[0075] (2) Knowledge Injection and Constraint Channel (KB→LLM Channel) is used to extract knowledge from the domain knowledge base and inject it into the training or inference process of the domain large model.
[0076] External data sources, including domain text, documents, and real-time data streams, provide raw materials for updating the domain knowledge base.
[0077] The optimization and control unit is used to monitor the collaborative optimization process, evaluate the optimization results, and dynamically adjust the strategies and parameters of the two-way information exchange channel; the evaluation of optimization results includes evaluating the quality indicators of the domain knowledge base and evaluating the performance indicators of the domain large model.
[0078] Based on the collaborative optimization system proposed in this invention, the collaborative optimization method of the system is described below from three aspects: domain knowledge base optimization, domain large model optimization, and collaborative and iterative optimization of bidirectional information exchange channels.
[0079] 1. Optimize the domain knowledge base using the domain big model (in the LLM→KB channel), including knowledge extraction and construction enhancement, knowledge reasoning and completion, knowledge verification and error correction, and knowledge base management and optimization.
[0080] In knowledge extraction and construction enhancement, (1) to address the difficulty of traditional extraction tools (such as rule-based or small models) in handling complex and implicit relationships, this invention utilizes Prompt Engineering and Chain-of-Thought (CoT) techniques to design structured prompts, guiding the domain big model to extract entities, relationships, and attributes from unstructured text and generate (head entity, relationship, tail entity) triples. For example, the prompt is: "Please extract all medical relationships from the following text. Please list them in the format of (entity 1, relationship type, entity 2). Text: [input text]". The powerful contextual understanding capability of the domain big model can significantly improve the extraction accuracy, especially for long texts and complex sentences. (2) For long descriptive texts, the domain big model's summarizing capability is used to generate structured representations of key information and transform them into entity attributes or related knowledge in the domain knowledge base. (3) In view of the problem that knowledge extracted from multiple heterogeneous data sources may conflict or be redundant, this invention uses a domain big model as a judge. By designing comparison prompts, the domain big model analyzes the same fact statement from different sources, judges its authenticity and consistency, and outputs the most credible version or points out the conflict for manual review.
[0081] In knowledge reasoning and completion, (1) to address the problem of missing links in knowledge bases, this invention utilizes the reasoning ability of a domain big model to predict links; for example, given the head entity "drug A" and the relationship "may interact", the domain big model can infer the most likely tail entity "drug B". Generative or ranking prompts can be used. (2) Utilize the domain big model to discover potential new relationships or patterns; for example, if the knowledge base contains "gene A-regulation → disease B" and "gene C-homologous → gene A", the big model can be guided to infer "gene C may have a potential association with disease B", generating candidate knowledge for verification. (3) Extract the common sense internalized in the domain big model through specific prompt words, transform it into explicit knowledge, and supplement it into the domain knowledge base to enrich its contextual information; for example, supplement common descriptions of disease symptoms.
[0082] In knowledge verification and correction, (1) a "statement verification" prompt is constructed for existing or candidate triples in the domain knowledge base; for example: "Based on reliable medical knowledge, determine whether the following statement is correct: Statement: [Triple statement in the knowledge base]". The domain big model gives a confidence score based on its parameterized knowledge and may provide evidence or correction suggestions. Combining multiple domain big model voting or the domain knowledge base's own consistency check can effectively identify and mark potential erroneous knowledge. (2) Although the big model has time limitations, it can help judge the risk of knowledge "outdated". This invention uses prompt words to allow the domain big model to analyze the differences between new literature / data and old knowledge in the domain knowledge base, identify the knowledge points that need to be updated, and drive the domain knowledge base update process.
[0083] In knowledge base management and optimization, the new knowledge or modification suggestions generated in the above steps are written into a candidate knowledge pool (rather than directly into the domain knowledge base). For multiple candidate versions of the same fact (which may come from different data sources or different reasoning paths), a weighted voting mechanism based on a large domain model is used for credibility evaluation and fusion to generate the final candidate. High-confidence candidate knowledge is written into the domain knowledge base, medium-confidence candidates are prompted for manual review, and low-confidence candidates are directly rejected or used for negative sample training of the model. This process is continuously iterated, thereby promoting the continuous evolution of the domain knowledge base.
[0084] 2. Optimize the domain-specific large model using a domain knowledge base (in the KB→LLM channel). Inject the high-precision, structured knowledge from the optimized domain knowledge base into the domain-specific large model to improve its domain performance. This includes knowledge-enhanced pre-training / continuous learning, knowledge-guided fine-tuning (KG-FT), knowledge-enhanced inference, and model evaluation and feedback.
[0085] In knowledge-enhanced pre-training / continuous learning, high-quality domain training corpora are generated using domain knowledge bases. This is not simply converting triples into natural language, but rather leveraging the domain-wide model (or another specialized text generation model) itself to generate knowledge-to-text. For example, given an entity (such as "diabetes"), all its relevant attributes and relationships are extracted from the domain knowledge base to generate a coherent, accurate, and rich descriptive text. The resulting massive amounts of high-quality domain text are used for Domain Adaptive Pre-training (DAPT) or Continual Learning of the domain-wide model, fundamentally enhancing its domain knowledge representation.
[0086] In knowledge-guided fine-tuning, (1) constructing supervised fine-tuning (SFT) data: constructing high-quality instruction-response pairs based on the domain knowledge base, for example:
[0087] Instruction: "Briefly describe the causes and symptoms of myocardial infarction."
[0088] Answer: A standard, accurate answer generated from relevant entities and relationships in the knowledge base.
[0089] This method ensures the factual accuracy of SFT data and effectively aligns model behavior.
[0090] (2) Construct positive-negative pairs, where positive examples are accurate knowledge statements and negative examples are statements containing factual errors (such as incorrect entities or incorrect relationships). These errors can come from errors marked in the knowledge verification step or be artificially constructed. By using a contrastive loss (such as InfoNCE), the distance between the model representation and the positive examples is narrowed, and the distance between the model representation and the negative examples is widened, enabling the model to learn to distinguish between right and wrong and enhancing its factual sensitivity.
[0091] (3) Incorporate a knowledge consistency constraint loss into the training objective. For example, for a given question, the answer generated by the domain-wide model should maintain maximum consistency with both the knowledge internalized by its parameters (from pre-training / SFT) and the knowledge retrieved from the knowledge base (through the retrieval system). This loss term penalizes the model for generating outputs that contradict known facts.
[0092] In knowledge-enhanced reasoning (retrieval-enhanced generation++), (1) a retrieval engine is introduced during the reasoning stage to retrieve the most relevant knowledge fragments from the domain knowledge base in real time for user queries. These fragments can be triples or generated text fragments. (2) When generating each token, the influence of the retrieved knowledge fragments is considered not only in the context but also in the context of the context. Maximum marginal likelihood (MMI) or a knowledge base-based distribution pruning strategy can be used to bias the model's output during the decoding stage, making it more inclined to generate content consistent with the knowledge base, effectively suppressing illusions.
[0093] In model evaluation and feedback, a domain knowledge evaluation set based on the domain knowledge base is constructed to regularly evaluate the performance of the domain large model on tasks such as factual question answering and relational reasoning; errors generated by the model (especially factual errors) are fed back to the LLM→KB channel as potential signals that the domain knowledge base needs to be supplemented or corrected, forming a closed loop.
[0094] 3. Collaborative and iterative optimization of two-way information exchange channels.
[0095] The two processes LLM→KB and KB→LLM in this invention are not independent, but constitute a tightly coupled iterative loop. The core idea is to model the collaborative process as a dual-objective optimization problem, simultaneously pursuing the maximization of knowledge base quality and large model performance. The iterative process is dynamically managed by a reinforcement learning (RL)-based meta-controller, which decides when and how to start the next round of optimization, thereby achieving optimal resource allocation and maximizing the effect.
[0096] First, we define quantitative evaluation metrics to assess the effectiveness of each iteration. These metrics will serve as reward signals for the optimization algorithm, including:
[0097] Knowledge base quality indicators ;in, , , Here, n represents the weighting coefficients, and n represents the nth iteration. Indicates the completeness of the knowledge base. The number of new entities / relations obtained through this round of extraction and reasoning. This refers to the total number of entities / relationships that should exist within the domain, as assessed by domain experts or estimated by authoritative sources; A The accuracy of the knowledge base is indicated by the manual review of samples of newly added knowledge in the candidate knowledge pool during this round, and the resulting accuracy (True Positive, False Positive, etc.) is calculated. The freshness of the knowledge base is represented by t, which is the average delay from the publication time of knowledge in the source data to the current time, and λ is the decay coefficient. This indicator encourages the system to absorb the latest knowledge.
[0098] Model performance metrics ; in, , , These are the weighting coefficients; n represents the nth iteration. The ratio of correct answers to total answers represents the factual accuracy. It is used to calculate the factual accuracy of the model's generated answers on a fixed domain knowledge evaluation set built on a knowledge base. The ratio of hallucination statements to the total number of statements can be used to annotate the proportion of hallucination statements in the text generated by the model using NLP tools. To represent the depth of reasoning, a standardized set of chain-of-thought questions is used to evaluate the correctness and depth of the model's reasoning steps. This can be achieved through human scoring or model self-evaluation.
[0099] The overall performance index of the collaborative optimization system is:
[0100] ;
[0101] in, and These are hyperparameters used to adjust the emphasis on optimizing the domain knowledge base or the large domain model. It is the total reward for the nth iteration.
[0102] Next, formulate collaborative optimization states, actions, and strategies, including:
[0103] Each iteration is considered as a timestep in reinforcement learning.
[0104] state : The system's state at the start of iteration round n. It is a feature vector that includes: the quality of the knowledge base in the previous round. Performance of the previous model and the growth trend of rewards .
[0105] action The meta controller is based on the current state. The decisions made. The action space is discrete, including... , , , , , It represents comprehensive optimization, while simultaneously executing the complete KBO (Domain Knowledge Base Optimization) and LLMO (Domain Large Model Optimization) processes, using the most intensive configurations (such as more training steps and more complex cue engineering). This option represents KBO-only optimization, which is triggered when the model performance is already high but the knowledge base is the bottleneck. This means optimizing only large models (LLMO-only), which is triggered when the knowledge base is already very complete but the model has not learned enough. This represents lightweight optimization, which involves rapid optimization of only critical parts, such as enhancing inference solely through RAG without training. This indicates hibernation, where optimizations are not performed, resources are saved, and more new data is awaited.
[0106] Policy π: A function that maps state S to action A. The entire policy can be learned using a policy network (e.g., a small neural network), with the goal of maximizing long-term cumulative reward. ,in It is a discount factor.
[0107] Finally, the iterative optimization algorithm is executed.
[0108] The loop iterates for steps n = 1, 2, 3, ...:
[0109] Observation state: The system collects data and constructs the current state feature vector. .
[0110] Meta-controller decision: The policy network generates an action probability distribution based on the current state. Select an action based on this distribution. ,For example : KBO-only.
[0111] Execute action: The system executes the selected action. .
[0112] if Includes KBO: Start the LLM→KB channel, use optimization get .calculate .
[0113] if Includes LLMO: Enables the KB→LLM channel, using (or ) optimization get .calculate .
[0114] Calculate Reward: Calculate the total reward for this round based on the above indicators. .
[0115] Strategy Update: Move the experience tuple ( , , , Store in the experience replay buffer.
[0116] Sample a batch of experience from the buffer and update the policy network parameters θ using a policy gradient algorithm (such as PPO or A2C) to maximize the expected cumulative reward.
[0117] Policy gradient update formula: , where η is the learning rate, V(S) is the state value function, and G is the actual reward.
[0118] State transition: The system enters the initial state of the next iteration. .
[0119] Termination condition: When the reward R of multiple consecutive iterations grows below a certain threshold ε, or when computing resources are exhausted, the algorithm terminates or enters a low-power listening mode.
[0120] It should be noted that the above description is not intended to limit the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention should also fall within the protection scope of the present invention.
Claims
1. A collaborative optimization method for domain-wide large-scale models and domain knowledge bases, characterized in that, include: Construct a two-way information exchange channel connecting the domain's large model and the domain's knowledge base; the two-way information exchange channel consists of a knowledge mining and verification channel and a knowledge injection and constraint channel; In the knowledge mining and verification channel, domain big models are used to optimize the domain knowledge base: domain big models are used to extract, generate and verify knowledge from multi-source data, and then used to expand, correct and update the domain knowledge base to generate an optimized domain knowledge base; In the knowledge injection and constraint channel, the domain knowledge base is used to optimize the domain big model: knowledge is extracted from the optimized domain knowledge base and injected into the training or inference process of the domain big model to generate the optimized domain big model; The collaborative optimization process is modeled as a bi-objective optimization problem, and the iterative process is dynamically managed through reinforcement learning to achieve optimal quality of the domain knowledge base and performance of the domain large model.
2. The method for collaborative optimization of a large domain model and a domain knowledge base according to claim 1, characterized in that, In the knowledge mining and verification process, the domain knowledge base is optimized using a large domain model, including: By utilizing cue engineering and mind chain technology, structured cue words are designed to guide domain-wide models to extract entities, relationships, and attributes from unstructured text and generate triples. Leveraging the reasoning capabilities of domain-wide models to predict links and discover potential new relationships or patterns; transforming internalized common sense within domain-wide models into explicit knowledge; For existing or candidate triples in the domain knowledge base, construct declaration verification prompts, and use prompt words to allow the domain big model to identify knowledge points that need to be updated for deprecation risk assessment; The new knowledge or modification suggestions generated by the above steps are written into the candidate knowledge pool. The credibility of multiple candidate versions of a fact is evaluated and fused based on a weighted voting mechanism of a domain-wide model to generate the final candidate.
3. The method for collaborative optimization of a domain-wide large model and a domain knowledge base according to claim 1, characterized in that, Optimizing large domain models using domain knowledge bases in the knowledge injection and constraint channels includes: The domain-specific large model is used to convert knowledge in the domain knowledge base into domain-specific text, and the domain-specific text is used to perform domain-adaptive pre-training or continuous learning on the domain-specific large model. Based on the domain knowledge base, instruction fine-tuning data pairs and positive-negative example pairs are constructed, and knowledge consistency constraint loss is added to the training objective to perform supervised fine-tuning and comparative learning on the domain large model; During the reasoning phase of the domain-wide model, relevant knowledge fragments are retrieved from the domain knowledge base in real time, and a knowledge base-based distributed pruning strategy is used to bias the model's output to suppress illusions. Construct a domain knowledge evaluation set based on the domain knowledge base, regularly evaluate the performance of the domain big model, and feed back the errors generated by the domain big model to the knowledge mining and verification channel as potential signals that the domain knowledge base needs to be supplemented or corrected, thus forming a closed loop.
4. The method for collaborative optimization of a large domain model and a domain knowledge base according to claim 1, characterized in that, The collaborative optimization process includes: (1) Define quantitative evaluation metrics to assess the effectiveness of each iteration: ; in, and These are hyperparameters used to adjust the emphasis on optimizing the domain knowledge base or the large domain model. It is the total reward of the nth iteration; For the quality indicators of the domain knowledge base, among which, , , Here, n represents the weighting coefficients, and n represents the nth iteration. Indicates the completeness of the knowledge base. The number of new entities / relations obtained through this round of extraction and reasoning. This refers to the total number of entities / relationships that should exist within the domain, as assessed by domain experts or estimated by authoritative sources; A The accuracy of the knowledge base is calculated by manually reviewing samples of newly added knowledge from the candidate knowledge pool in this round. The freshness of the knowledge base is represented by t, which is the average delay from the publication time of knowledge in the source data to the current time, and λ is the decay coefficient. This indicator encourages the system to absorb the latest knowledge. For large-scale model performance metrics, among which, , , These are the weighting coefficients; n represents the nth iteration. The ratio of correct answers to total answers represents the accuracy of facts. It is used to calculate the factual accuracy of the model's generated answers on a fixed domain knowledge evaluation set built on a knowledge base. The ratio of hallucination statements to the total number of statements can be used to annotate the proportion of hallucination statements in the text generated by the model using NLP tools. It indicates the depth of reasoning, using a standardized domain-specific reasoning chain; the question evaluates the correctness and depth of the model's reasoning steps. (2) Formulate collaborative optimization states, actions, and strategies: state The system's state at the start of iteration n is a feature vector, including: the quality of the knowledge base in the previous iteration. Performance of the previous model and the growth trend of rewards ; action The meta controller is based on the current state. The decisions made, including , , , , ; Represents comprehensive optimization; This indicates that only the knowledge base is being optimized; This indicates that only the large model is optimized; Represents lightweight optimization; This indicates hibernation; optimization is not performed, resources are saved, and more new data is awaited. Policy π: A function that maps state S to action A. The entire policy is learned using a policy network to maximize long-term cumulative reward. For the goal, among which It is a discount factor; (3) Execute iterative optimization algorithms, including: Observation state: The system collects data and constructs the current state feature vector. ; Meta-controller decision: The policy network generates an action probability distribution based on the current state. Select an action based on the action probability distribution. ; Perform the selected action :if Includes domain knowledge base optimization: Enables knowledge mining and verification channels, using... optimization get ,calculate ; if Includes domain-wide model optimization: Initiating knowledge injection and constraint channels, using... or optimization get ,calculate ; Calculate the reward: Calculate the total reward for this round based on the above indicators. ; Strategy Update: Move the experience tuple ( , , , Store in the experience replay buffer; A batch of experience is sampled from the buffer, and the policy network parameters θ are updated using the policy gradient algorithm to maximize the expected cumulative reward; the policy gradient update formula is: , where η is the learning rate, V(S) is the state value function, and G is the actual reward; State transition: The system enters the initial state of the next iteration. ; Termination condition: When the reward R of multiple consecutive iterations grows below the threshold ε, or when computing resources are exhausted, the algorithm terminates or enters a low-power listening mode.
5. A collaborative optimization system for domain-wide large-scale models and domain knowledge bases, characterized in that: include: A domain knowledge base that stores structured, semi-structured, and unstructured domain knowledge; Large domain models are used to perform semantic understanding, generation, and reasoning. A two-way information exchange channel connecting the domain's large model and its knowledge base includes: The knowledge mining and verification channel is used to extract, generate, and verify knowledge from multi-source data using a large domain model, and to use it to expand, correct, and update the domain knowledge base, generating an optimized domain knowledge base. The knowledge injection and constraint channel is used to extract knowledge from the optimized domain knowledge base and inject it into the training or inference process of the domain large model to generate the optimized domain large model. The optimization and control unit is used to model the collaborative optimization process as a bi-objective optimization problem and dynamically manage the iterative process through reinforcement learning to achieve optimal quality of the domain knowledge base and performance of the domain large model.
6. The domain-wide large model and domain knowledge base collaborative optimization system according to claim 1, characterized in that, In the knowledge mining and verification process, the domain knowledge base is optimized using a large domain model, including: By utilizing cue engineering and mind chain technology, structured cue words are designed to guide domain-wide models to extract entities, relationships, and attributes from unstructured text and generate triples. Leveraging the reasoning capabilities of domain-wide models to predict links and discover potential new relationships or patterns; transforming internalized common sense within domain-wide models into explicit knowledge; For existing or candidate triples in the domain knowledge base, construct declaration verification prompts, and use prompt words to allow the domain big model to identify knowledge points that need to be updated for deprecation risk assessment; The new knowledge or modification suggestions generated by the above steps are written into the candidate knowledge pool. The credibility of multiple candidate versions of a fact is evaluated and fused based on a weighted voting mechanism of a domain-wide model to generate the final candidate.
7. The domain-wide large model and domain knowledge base collaborative optimization system according to claim 6, characterized in that, Optimizing large domain models using domain knowledge bases in the knowledge injection and constraint channels includes: The domain-specific large model is used to convert knowledge in the domain knowledge base into domain-specific text, and the domain-specific text is used to perform domain-adaptive pre-training or continuous learning on the domain-specific large model. Based on the domain knowledge base, instruction fine-tuning data pairs and positive-negative example pairs are constructed, and knowledge consistency constraint loss is added to the training objective to perform supervised fine-tuning and comparative learning on the domain large model; During the reasoning phase of the domain-wide model, relevant knowledge fragments are retrieved from the domain knowledge base in real time, and a knowledge base-based distributed pruning strategy is used to bias the model's output to suppress illusions. Construct a domain knowledge evaluation set based on the domain knowledge base, regularly evaluate the performance of the domain big model, and feed back the errors generated by the domain big model to the knowledge mining and verification channel as potential signals that the domain knowledge base needs to be supplemented or corrected, thus forming a closed loop.