Ontology-based large language model self-evolution method and device
By using an ontology-based self-evolution method, a concept tree for a professional domain is generated and organized, perplexity and confidence are calculated, reliable and paths that need improvement are marked, new knowledge is generated and fine-tuned, and the problem of insufficient professional capabilities of large language models in professional domains is solved, achieving efficient self-evolution and cost reduction.
Patent Information
- Application Number
- CN202510554833.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2045-04-29
AI Technical Summary
Existing large-scale language models perform poorly in professional fields such as medicine, law, and finance, lacking professional depth and containing conceptual confusion or factual errors. Furthermore, existing self-evolutionary methods cannot meet the requirements of knowledge-intensive professional fields, and the cost of acquiring external professional corpora is high.
By using an ontology-based self-evolution method, domain ontology concepts are generated and organized, perplexity and confidence are calculated, reliable and paths that need improvement are marked, and new knowledge is generated and fine-tuned through interaction, thereby achieving the self-evolution of the model.
It reduces reliance on external resources, lowers the cost of improving expertise in specific fields, and enhances the model's expertise in those fields and the natural fluency of its responses.
Smart Images

Figure CN120471136B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of natural language processing technology, specifically relating to an ontology-based method and apparatus for the self-evolution of a large language model. Background Technology
[0002] Current large-scale language models (LLMs) have demonstrated remarkable capabilities in general domains, enabling fluent conversations, creative content generation, and answering common-sense questions. These models, pre-trained on massive amounts of data, have acquired rich language patterns and world knowledge. However, when faced with highly specialized fields such as medicine, law, and finance, their performance often falls short. While they may provide seemingly reasonable answers, they frequently lack professional depth and may even contain conceptual confusion or factual errors.
[0003] To address this issue, the mainstream approach currently is to enhance the model's professional capabilities by injecting existing domain-specific knowledge. Specifically, researchers mainly employ two technical routes: one is to introduce specialized corpora during the model pre-training stage. For example, Professor Nie Zaiqing's team at Tsinghua University released the open-source multimodal biomedical foundational model BioMedGPT in 2023. As the first open-source, lightweight, general-purpose biomedical AI model, it is based on the Transformer architecture, supports multi-task processing, and achieves good performance on various biomedical tasks. The other is to inject domain knowledge through fine-tuning and other methods during the post-training stage. For example, med42-v2, based on the LLama model, is fine-tuned using a large amount of clinical data, demonstrating superior performance in various medical benchmark tests compared to the base model. However, these methods all have significant limitations, because in highly specialized fields, obtaining high-quality domain-labeled data often requires substantial human and resource costs.
[0004] Currently, a new paradigm called "model self-evolution" is emerging in general domains. This paradigm allows models to autonomously generate training data based on driving tasks and continuously improve their performance automatically through self-evaluation and iterative optimization. This approach eliminates dependence on external, manually labeled data, demonstrating strong scalability. For example, the paper "Principle-Driven Self-Alignment of Language Models from Scratch with Minimal Human Supervision" proposes a method that appends a "please follow ethical requirements" prompt to the question, thereby obtaining a more ethically compliant response from the model. The question without the prompt and the high-standard response are then combined into a question-answer pair for training the model itself. However, most of these self-evolutionary methods are based on relatively broad principles, such as requiring the model to maintain consistency in answers and improve the coherence of reasoning. These principles cannot meet the knowledge-intensive requirements of model evolution in knowledge-intensive specialized domains.
[0005] In specialized domains, many conceptually rich and well-developed domain ontology structures already exist. Recently, the Ontotune method has demonstrated that injecting high-quality domain ontology into large models can enhance their domain-specific capabilities. This provides a framework for ontology-based self-evolution of models within specialized domains. This is because domain ontology, as a standardized description of a specific domain's conceptual system, not only clearly defines core concepts and precisely depicts the relationships between concepts, but also possesses rich professional connotations. Furthermore, this structured knowledge representation method has built-in logical rules, such as (concept A belongs to concept B), (concept B belongs to concept C), then (concept A belongs to concept C). These logical rules can automatically detect whether there are knowledge contradictions within the model. For example, if the model simultaneously contains the three pieces of knowledge (concept A belongs to concept B), (concept B belongs to concept C), and (concept A does not belong to concept C), then there is a knowledge contradiction within the specialized domain within the model. Summary of the Invention
[0006] In view of the above, the purpose of this invention is to provide a method and apparatus for self-evolution of a large language model based on ontology. This method extracts specialized ontology knowledge from the large language model and filters out ontology knowledge that does not conform to the rules, thereby improving and supplementing the large language model and realizing the self-evolution of the model.
[0007] To achieve the above-mentioned objectives, an embodiment provides a self-evolution method for a large language model based on ontology, comprising the following steps:
[0008] Based on the first prompt template used for ontology knowledge extraction, ontology concepts in the fields of medicine, law, or finance are generated from a large language model through question-and-answer interaction.
[0009] The ontology concepts generated by the large language model are organized into a concept tree corresponding to the domain ontology. Each edge on the concept tree is marked as a knowledge path. The perplexity and confidence of the large language model for each knowledge path on the concept tree are calculated. Based on the confidence, reliable paths and paths that need to be strengthened in the concept tree are marked.
[0010] Based on the path to be strengthened, new knowledge is generated through interaction with the large language model, which is then used to fine-tune the large language model, thereby achieving self-evolution in professional ontology knowledge.
[0011] Preferably, the first prompt template for ontology knowledge extraction includes: a defined professional field, a given top-level professional concept, a requirement to generate subordinate sub-concepts and their synonyms based on the top-level professional concept, and a requirement to organize the generated concepts into an ontology concept and output them in JSON format.
[0012] Preferably, the ontology concepts generated hierarchically by the large language model are organized into a concept tree corresponding to the domain ontology, and each edge on the concept tree is marked as a knowledge path, including:
[0013] The concept tree contains a top-level professional concept within a single professional field, several layers of sub-concepts under the top-level professional concept, and synonym concepts of the sub-concepts. The concept tree reflects the understanding of the relationship between the top-level professional concept and the lower-level sub-concepts and synonym concepts.
[0014] Each edge in the concept tree is marked as a knowledge path, and each knowledge path reflects the relationship between two concepts, including synonym relationships and hierarchical relationships.
[0015] Preferably, the confidence level of each knowledge path is calculated, including:
[0016] The formula for calculating confidence based on perplexity includes:
[0017] The formula for calculating BeliefConf(min) based on the minimum of positive and negative perplexity is as follows:
[0018]
[0019] The second formula for calculating the confidence level BeliefConf(max) based on the maximum of the positive and negative perplexities is as follows:
[0020]
[0021] Formula 3 for calculating the confidence level BeliefConf(min) based on the difference between positive and negative perplexity is as follows:
[0022] BeliefConf(minus)=false_ppl-tr_ppl
[0023] Here, true_ppl and false_ppl represent the positive perplexity and the negative perplexity, respectively.
[0024] In the specific calculation, one of the three formulas mentioned above is used to calculate the confidence level of each knowledge path.
[0025] Preferably, the reliable path in the concept tree based on the confidence level includes:
[0026] For multiple knowledge paths that have certain relationships between ontology concepts, such as (concept A, belongs to, concept B), (concept A, is a synonym, concept C), (concept C, belongs to, concept B), if the large language model gives these multiple knowledge paths a high degree of confidence exceeding a given threshold, it indicates that during pre-training, a large amount of corpus simultaneously points to and supports the two knowledge paths (concept A, belongs to, concept B) and (concept C, belongs to, concept B), and these two knowledge paths are marked as reliable paths.
[0027] Preferably, the given threshold is determined in the following manner:
[0028] Calculate the confidence level of each knowledge path in the concept tree, obtain the average confidence level and the confidence level corresponding to multiple quantiles, and mark the average confidence level and the confidence level corresponding to multiple quantiles as thresholds. The confidence level corresponding to multiple quantiles includes the confidence levels corresponding to 50%, 60%, 70%, 80%, and 90%.
[0029] Preferably, the path to be strengthened in the confidence-tagged concept tree includes:
[0030] For the selected multiple reliable paths, such as (concept A, belongs to, concept B) and (concept B, belongs to, concept C), these two reliable paths should be able to deduce (concept A, belongs to, concept C) according to the consistency rule of ontology. However, if the result given by the large language model is that it highly believes (concept A, does not belong to, concept C), then it is considered that there is a knowledge conflict within the large language model. At this time, the knowledge path (concept A, belongs to, concept C) is marked as a path to be strengthened.
[0031] Preferably, new knowledge that is more natural and fluent is generated by interacting with a large language model based on the path to be strengthened, including:
[0032] Design a second prompt template for interactive thinking, which includes asking questions about the relationship of the path to be strengthened and setting two corpus modes;
[0033] The first corpus mode is the reflection mode, which means that the second prompt template is used to ask the large language model about relationships only, allowing the large language model to answer the questions based on its existing knowledge. The aim is to stimulate the large language model to reflect and enable it to have a better understanding of the relationship between the two concepts in the reinforcement path.
[0034] The second corpus mode is the reference mode, which means that the path to be strengthened is appended to the relational query question in the second prompt template, and the large language model is given prompts to answer the question based on this.
[0035] New knowledge is generated based on the two corpus patterns mentioned above.
[0036] Preferably, the large language model is fine-tuned by incorporating new knowledge, including:
[0037] Based on new knowledge, the large language model is fine-tuned using LoRa's fine-tuning method.
[0038] To achieve the above-mentioned objectives, the embodiments also provide an ontology-based large language model self-evolution device, including a memory and one or more processors. The memory stores executable code, and when the one or more processors execute the executable code, they are used to implement the above-mentioned ontology-based large language model self-evolution method.
[0039] Compared with the prior art, the beneficial effects of the present invention include at least the following:
[0040] Based on a large language model embedded with medical, legal, or financial domains, this approach generates ontological concepts related to these domains through question-and-answer interaction. Building upon this, the ontological concepts generated hierarchically by the large language model are organized into a concept tree corresponding to the domain ontology. Each edge in the concept tree is marked as a knowledge path, and the perplexity and confidence levels of the large language model for each knowledge path in the concept tree are calculated. Based on the confidence levels, reliable paths and paths requiring reinforcement are marked in the concept tree to filter out non-compliant ontological knowledge. Then, based on the paths requiring reinforcement, new, more natural and fluent knowledge paths are generated through interaction with the large language model. The large language model is then fine-tuned and improved by incorporating these new knowledge, achieving self-evolution in professional ontological knowledge. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a flowchart of the ontology-based large language model self-evolution method provided in the embodiment;
[0043] Figure 2 An example diagram of the ontology-based large language model self-evolution method provided in the embodiment. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the scope of protection of this invention.
[0045] The inventive concept of this invention is as follows: Existing fine-tuning of large language models for professional fields such as medicine, law, or finance often requires the use of large-scale external professional corpora. Large-scale external professional corpora result in significant human and resource costs. Therefore, embodiments of this invention provide an ontology-based method and apparatus for the self-evolution of large language models, enabling self-evolution of large language models in fields such as medicine, law, or finance, thereby reducing dependence on external resources and lowering the cost of improving the capabilities of large language models in professional fields.
[0046] like Figure 1 As shown in the embodiment, a self-evolution method and apparatus for an ontology-based large language model includes the following steps:
[0047] S1, based on the first prompt template used for ontology knowledge extraction, generates domain-specific ontology concepts from a large language model through question-and-answer interaction.
[0048] Step S1 extracts the parameterized professional knowledge of the large language model into an explicit ontology structure using knowledge extraction techniques. Specifically, a first prompt template is defined for ontology knowledge extraction. This first prompt template includes: a defined professional domain, a given top-level professional concept, a requirement to generate subordinate concepts and their synonyms based on the top-level professional concept, and a requirement to output the generated concepts as ontology concepts in JSON format. Specifically, using the first prompt template, the large language model is given a top-level professional concept, and the model generates subordinate concepts and their synonyms based on this concept.
[0049] Taking the medical field as an example, such as Figure 2 As shown, the given first prompt template is: "As a medical expert, you need to construct an ontology in the medical field. Please generate strict subclasses of the top-level professional concept {layer concepts (e.g., cells, antibiotics, vitamins)} and provide their synonyms, organized into JSON format." Based on this first prompt template, the first-layer concept of a cell is a neuron, the second-layer concept is a motor neuron, and the third-layer concept is a synonym of the second-layer concept, namely, a motor nerve cell. The ontology concepts generated by the large language model include drug names, biological tissues, physiological tissues, surgical procedures, disease names, body parts, doctor names, hospital names, etc.
[0050] S2 organizes the ontology concepts generated by the large language model step by step into a concept tree corresponding to the domain ontology, marks each edge on the concept tree as a knowledge path, and calculates the perplexity and confidence of the large language model for each knowledge path on the concept tree. Based on the confidence, reliable paths and paths that need to be strengthened are marked in the concept tree.
[0051] In this embodiment, the ontology concepts in JSON format with hierarchical relationships generated in step S1 are combined to form a concept tree corresponding to a domain ontology. The concept tree includes a top-level professional concept in a single professional domain, several layers of sub-concepts under the top-level professional concept, and synonym concepts of the sub-concepts. The concept tree reflects the understanding of the relationship between the top-level professional concept and the lower-level sub-concepts and synonym concepts in the large language model.
[0052] In this embodiment, each edge in the concept tree is also marked as a knowledge path. Each knowledge path reflects the relationship between two concepts, including synonym relationships and hierarchical relationships. For example... Figure 2 As shown, the triples (neuron, belongs to, cell), (neuron, is a synonym, nerve cell), (nerve cell, belongs to, cell) represent a knowledge path. In this triple, (neuron, belongs to, cell) reflects the subordinate relationship between the superordinate and subordinate terms, while (neuron, is a synonym, nerve cell) reflects the synonym relationship.
[0053] In the embodiment, the perplexity of each knowledge path on the concept tree by the large language model is also calculated. Specifically, the perplexity of each knowledge path is calculated using the formula for perplexity. Taking the synonym relationship as an example, for a given synonym 1 and synonym 2, the following two texts are designed, and the loss value of the token ("yes" or "no") output at the end of the two texts is calculated as the perplexity.
[0054] The calculation text for positive perplexity is: Positive text = f'Please determine whether the following statement is true or false, and then answer with "Yes" or "No": "{Synonym 1}" is a synonym of "{Synonym 2}". Answer: Yes';
[0055] The reverse perplexity calculation text is: Reverse text = f'Please determine whether the following statement is true or false, and then answer with "yes" or "no": "{synonym 1}" is a synonym of "{synonym 2}". Answer: No';
[0056] For hyponym relationships, replace {synonym1}, "is... a synonym", and {synonym2} in the text with the corresponding hyponym relationship and concept.
[0057] In this embodiment, a confidence calculation formula is also designed based on perplexity, which reflects the confidence level of the large language model for a certain knowledge path. The specific confidence calculation formula includes:
[0058] The formula for calculating BeliefConf(min) based on the minimum of positive and negative perplexity is as follows:
[0059]
[0060] The second formula for calculating the confidence level BeliefConf(max) based on the maximum of the positive and negative perplexities is as follows:
[0061]
[0062] Formula 3 for calculating the confidence level BeliefConf(min) based on the difference between positive and negative perplexity is as follows:
[0063] BeliefConf(minus)=false_ppl-true_ppl
[0064] Here, true_ppl and false_ppl represent the positive perplexity and the negative perplexity, respectively.
[0065] In the specific calculation, one of the three formulas mentioned above is used to calculate the confidence level of each knowledge path. In the embodiment, the confidence level of each knowledge path in the concept tree is calculated to obtain the average confidence level and the confidence level corresponding to multiple quantiles. The average confidence level and the confidence level corresponding to multiple quantiles are marked as thresholds for subsequent confirmation of reliable paths. The confidence level corresponding to multiple quantiles includes confidence levels corresponding to 50%, 60%, 70%, 80%, and 90%.
[0066] In this embodiment, a reliable path pattern is defined, and reliable paths in the concept tree are labeled based on confidence level. For multiple knowledge paths with certain relationships between ontology concepts, such as (concept A, belongs to, concept B), (concept A, is a synonym, concept C), (concept C, belongs to, concept B), if the large language model assigns these multiple knowledge paths a high confidence level exceeding a given threshold, it indicates that during pre-training, a significant amount of corpus simultaneously points to and supports the two knowledge paths (concept A, belongs to, concept B) and (concept C, belongs to, concept B), and these two knowledge paths are labeled as reliable paths. The purpose of finding reliable paths first is to determine which one to believe and discard when two conflicting ontology knowledge points are found.
[0067] like Figure 2 As shown, for the knowledge paths (neuron, belongs to, cell), (neuron, is a synonym, nerve cell), and (nerve cell, belongs to, cell), if a large amount of corpus points to and supports both (neuron, belongs to, cell) and (nerve cell, belongs to, cell), then these two paths are reliable.
[0068] In this embodiment, a pattern for strengthening paths is defined, and paths to be strengthened in the concept tree are labeled. For example, (Concept A, belongs to, Concept B) and (Concept B, belongs to, Concept C). If the large language model has a high degree of confidence in both paths, i.e., both are reliable paths, these two reliable paths should be able to deduce (Concept A, belongs to, Concept C) according to the consistency rules of the ontology. However, if the result given by the large language model is that it highly believes (Concept A, does not belong to, Concept C), then it is considered that there is a knowledge conflict within the large language model. In this case, the knowledge path (Concept A, belongs to, Concept C) is marked as a path to be strengthened.
[0069] like Figure 2 As shown, (motor neuron, belongs to, neuron), (neuron, belongs to, cell), should be able to deduce (motor neuron, belongs to, cell), but this conflicts with (motor neuron, does not belong to, cell) given by the large language model. At this point, (motor neuron, belongs to, cell) needs to be marked as the path to be strengthened.
[0070] The above methods are used to identify inconsistencies in the ontological knowledge of large language models.
[0071] S3 generates more natural and fluent new knowledge by interacting with the large language model based on the path to be strengthened, and then fine-tunes the large language model by combining the new knowledge, thereby achieving self-evolution in professional ontology knowledge.
[0072] In this embodiment, when generating new knowledge paths as training corpus, a second prompt template for interactive thinking is designed. This second prompt template includes relationship questions for the path to be strengthened. For example, for the knowledge path to be strengthened (concept A, belongs to, concept C), the second prompt template can be "Question: What is the relationship between concept A and concept C?". Two corpus modes are set: a reflection mode and a reference mode. New knowledge is generated based on the two corpus modes.
[0073] In the reflective mode, the above questions are only asked to the large language model. That is, the second prompt template is used to ask the large language model about relationships, and the model answers the questions based on its existing knowledge. The aim is to stimulate the large language model to reflect and enable it to have a better understanding of the relationship between the two concepts in the reinforcement path.
[0074] In the reference mode, the path to be strengthened is appended to the relational query question in the second prompt template. That is, the knowledge (concept A, belongs to, concept C) is appended to the question, which is "Question: What is the relationship between concept A and concept C?, (concept A, belongs to, concept C)". By providing prompts to the large language model, the large language model can answer the question based on this.
[0075] After acquiring new knowledge, natural language corpora are generated based on the new knowledge paths. LoRa fine-tuning is then used to fine-tune the large language model, specifically by using inconsistencies to generate corresponding new knowledge as training corpora to refine the large language model. This method accurately supplements missing professional knowledge and leverages ontology characteristics to achieve model self-evolution independent of external resources, thereby enhancing the model's professional capabilities.
[0076] Based on the same inventive concept, the embodiment also provides an ontology-based large language model self-evolution device, including a memory and one or more processors. The memory stores executable code, and when the one or more processors execute the executable code, it is used to implement the above-mentioned ontology-based large language model self-evolution method, specifically including the following steps:
[0077] S1, based on the first prompt template used for ontology knowledge extraction, generates ontology concepts about the professional field from the large language model through question-and-answer interaction;
[0078] S2 organizes the ontology concepts generated by the large language model step by step into a concept tree corresponding to the domain ontology, marks each edge on the concept tree as a knowledge path, and calculates the perplexity and confidence of the large language model for each knowledge path on the concept tree. Based on the confidence, it marks reliable paths and paths that need to be strengthened in the concept tree.
[0079] S3 generates more natural and fluent new knowledge by interacting with a large language model based on the path to be strengthened, and then fine-tunes the large language model by combining the new knowledge, thereby achieving self-evolution in professional ontology knowledge.
[0080] The computing device provided in this embodiment, at the hardware level, includes not only a processor and memory, but also internal buses, network interfaces, memory, and other hardware required for business operations. The memory is non-volatile memory. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to implement the ontology-based large language model self-evolution method described in S1-S3 above. Of course, besides software implementation, this invention does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.
[0081] The specific embodiments described above illustrate the technical solution and beneficial effects of the present invention in detail. It should be understood that the above description is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, additions, and equivalent substitutions made within the scope of the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A self-evolutionary method for large language models based on ontology, characterized in that, Includes the following steps: Based on the first prompt template used for ontology knowledge extraction, ontology concepts about professional fields, including medicine, law, or finance, are generated from a large language model through question-and-answer interaction. The ontology concepts generated hierarchically by the large language model are organized into a concept tree corresponding to the domain ontology. Each edge in the concept tree is marked as a knowledge path, and the perplexity and confidence of the large language model for each knowledge path in the concept tree are calculated. The confidence calculation formula is designed based on the perplexity, including: Confidence based on the minimum of positive and negative perplexity The calculation formula is as follows: ; Confidence based on the maximum values of positive and negative perplexity Formula 2 is as follows: ; Confidence based on the difference between positive and negative perplexity Formula 3 is as follows: ; in, and These represent positive and negative perplexity, respectively. In the specific calculation, one of the three formulas mentioned above is used to calculate the confidence level of each knowledge path; Based on the confidence level labeling concept tree, reliable paths and paths to be strengthened include: For multiple knowledge paths that have certain relationships between ontology concepts, such as (concept A, belongs to, concept B), (concept A, is a synonym, concept C), (concept C, belongs to, concept B), if the large language model gives these multiple knowledge paths a high degree of confidence exceeding a given threshold, it means that during pre-training, a large amount of corpus simultaneously points to and supports the two knowledge paths (concept A, belongs to, concept B) and (concept C, belongs to, concept B), and these two knowledge paths are marked as reliable paths; For multiple reliable paths selected, such as (concept A, belongs to, concept B) and (concept B, belongs to, concept C), these two reliable paths should be able to infer (concept A, belongs to, concept C) according to the consistency rule of ontology. However, if the result given by the large language model is that it highly believes (concept A, does not belong to, concept C), then it is considered that there is a knowledge conflict within the large language model. At this time, the knowledge path (concept A, belongs to, concept C) is marked as a path to be strengthened. Based on the path to be strengthened, new knowledge is generated more naturally and fluently through interaction with a large language model, including: designing a second prompt template for interactive thinking, which includes relational questions for the path to be strengthened, and setting two corpus modes; The first corpus mode is the reflection mode, which means that the second prompt template is used to ask the large language model about relationships only, allowing the large language model to answer the questions based on its existing knowledge. The aim is to stimulate the large language model to reflect and enable it to have a better understanding of the relationship between the two concepts in the reinforcement path. The second corpus mode is the reference mode, which means that the path to be strengthened is appended to the relational query question in the second prompt template, and the large language model is given prompts to answer the question based on this. New knowledge is generated based on the above two corpus patterns; By incorporating new knowledge to fine-tune the large language model, self-evolution based on professional ontology knowledge can be achieved.
2. The ontology-based large language model self-evolution method according to claim 1, characterized in that, The first prompt template for ontology knowledge extraction includes: a defined professional field, a given top-level professional concept, a requirement to generate subordinate sub-concepts and their synonyms based on the top-level professional concept, and a requirement to organize the generated concepts into an ontology concept and output them in JSON format.
3. The ontology-based large language model self-evolution method according to claim 1, characterized in that, The ontology concepts generated hierarchically by the large language model are organized into a concept tree corresponding to the domain ontology. Each edge in the concept tree is marked as a knowledge path, including: The concept tree contains a top-level professional concept within a single professional field, several layers of sub-concepts under the top-level professional concept, and synonym concepts of the sub-concepts. The concept tree reflects the understanding of the relationship between the top-level professional concept and the lower-level sub-concepts and synonym concepts. Each edge in the concept tree is marked as a knowledge path, and each knowledge path reflects the relationship between two concepts, including synonym relationships and hierarchical relationships.
4. The ontology-based large language model self-evolution method according to claim 1, characterized in that, The given threshold is determined in the following way: Calculate the confidence level of each knowledge path in the concept tree, obtain the average confidence level and the confidence level corresponding to multiple quantiles, and mark the average confidence level and the confidence level corresponding to multiple quantiles as thresholds. The confidence level corresponding to multiple quantiles includes the confidence levels corresponding to 50%, 60%, 70%, 80%, and 90%.
5. The ontology-based large language model self-evolution method according to claim 1, characterized in that, Fine-tuning the large language model by incorporating new knowledge, including: Based on new knowledge, the large language model is fine-tuned using LoRa's fine-tuning method.
6. A self-evolving device for a large language model based on ontology, comprising a memory and one or more processors, wherein the memory stores executable code, characterized in that, When the one or more processors execute the executable code, they are used to implement the ontology-based large language model self-evolution method as described in any one of claims 1-5.
Citation Information
Patent Citations
Knowledge discovery-oriented scientific experiment knowledge graph construction method and system
CN117725223A
