Progressive knowledge enhancement-based large language model question and answer method in poultry field
By employing a progressive knowledge enhancement method, a structured dataset and knowledge graph are constructed. Combining cosine similarity and web page retrieval, the problem of insufficient accuracy and reliability in question answering in the poultry domain is solved. This enables deep reasoning and knowledge self-optimization for complex questions, thereby improving question answering capabilities and domain adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HOHAI UNIV
- Filing Date
- 2025-12-11
- Publication Date
- 2026-05-08
AI Technical Summary
Existing general-purpose large language models in the poultry industry suffer from low accuracy and reliability in intelligent question answering, and are unable to achieve continuous knowledge accumulation and self-optimization, thus failing to effectively handle complex problems and rapidly updated production practices.
A progressive knowledge enhancement approach is adopted, which fine-tunes a large language model by constructing a structured dataset optimized for triple extraction, and combines cosine similarity calculation, knowledge graph and web page retrieval to achieve problem decomposition and multi-source information fusion, dynamically optimize the knowledge base and graph, and form a knowledge closed loop.
It significantly improves the accuracy and reliability of question answering in the poultry field, enables in-depth reasoning and knowledge self-completion for complex questions, and has good domain adaptability and efficient response capabilities.
Smart Images

Figure CN121996749A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a question-answering method based on a large language model in the poultry industry with progressive knowledge enhancement, belonging to the field of natural language processing technology. Background Technology
[0002] In recent years, the poultry industry has seen continuous expansion in production scale, with its industrial structure accelerating its transformation from fragmented to intensive and integrated across the entire industry chain. However, against the backdrop of high production capacity and pressure on market prices, the industry is facing multiple challenges, including rising feed costs, changing consumer demand, increasingly complex disease risks, and the need to improve its deep processing capabilities. In this process, digital and intelligent transformation has become a key consensus for the industry to reduce costs, increase efficiency, and achieve high-quality development.
[0003] Meanwhile, with the outstanding performance of large language models in general domains, their potential for application in vertical professional fields such as agriculture and animal husbandry is becoming increasingly prominent. However, in knowledge-intensive and highly specialized scenarios such as poultry farming, directly using general-purpose large language models for intelligent question answering faces significant challenges:
[0004] First, the models have limited access to poultry-related expertise during the pre-training phase. When faced with complex issues such as disease prevention and control, nutrition management, and environmental control, they are prone to generating seemingly reasonable but factually flawed "illusionary" answers with low credibility. Second, existing retrieval-enhanced generation (RAG) methods rely heavily on simple matching from a single vector library, which is insufficient for handling complex problems requiring multi-step reasoning and sub-problem decomposition. Furthermore, static knowledge bases struggle to cover rapidly updated production practices and disease dynamics, resulting in low response efficiency. Finally, most systems lack effective knowledge closure and self-evolution mechanisms, failing to learn continuously from interactions, leading to rigid response capabilities and difficulty adapting to the continuous development of domain knowledge.
[0005] Therefore, existing technologies cannot meet the urgent needs of the poultry industry for reliable, accurate, and traceable intelligent decision support during its large-scale and intelligent upgrading process. There is an urgent need for a specialized intelligent question-answering solution that can deeply integrate domain knowledge, possess the ability to understand and reason about complex problems, and achieve closed-loop knowledge growth. Summary of the Invention
[0006] The technical problem to be solved by this invention is to provide a question-answering method for a large language model in the poultry field based on progressive knowledge enhancement, which solves the problems of low accuracy and reliability of existing general-purpose large language models in question-answering in professional fields such as poultry, and the inability to achieve continuous knowledge accumulation and self-optimization.
[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: A question-answering method based on a large language model in the poultry domain with progressive knowledge enhancement includes the following steps: Step 1: Based on the complex characteristics of poultry disease, construct a structured dataset for triple extraction optimization, and use the structured dataset to fine-tune the planning large language model so that the sub-problems obtained by decomposing the complex problem by the fine-tuned planning large language model satisfy the atomicity constraint mechanism. Step 2: Calculate the cosine similarity between the complex question input by the user and the questions of each question-answer pair in the pre-built poultry disease knowledge base, and find the maximum value among all cosine similarities. Determine whether the maximum value is greater than or equal to the first preset threshold. If so, return the answer of the question-answer pair corresponding to the maximum value to the user; otherwise, proceed to step 3. Step 3: Using the fine-tuned planning large language model, the complex question input by the user is decomposed into several sub-questions. For each sub-question, the cosine similarity between the sub-question and the questions of each question-answer pair in the pre-built poultry disease knowledge base is calculated, and the maximum value among all cosine similarities is found. It is determined whether the maximum value is greater than or equal to the first preset threshold. If so, the answer of the question-answer pair corresponding to the maximum value and the corresponding sub-question are input into the question-answering large language model; otherwise, proceed to step 4. Step 4: For sub-questions whose maximum value is less than the first preset threshold, use the pre-built poultry disease knowledge graph to match and query the sub-questions. If the answer to the sub-question is matched and found, input the answer and the corresponding sub-question into the question-answering big language model; otherwise, proceed to step 5. Step 5: For sub-questions whose maximum value is less than the first preset threshold and for which no matching answer was found in the pre-constructed poultry disease knowledge graph, obtain the answer to the sub-question through web page retrieval, and input the answer and the corresponding sub-question into the question-answering big language model; Step 6: Use the question-answering big language model to fuse all the sub-questions and their answers obtained in steps 3-5 to generate the answer to the complex question and return it to the user; Step 7: Dynamically and collaboratively optimize the pre-built poultry disease knowledge base and the pre-built poultry disease knowledge graph for solving subsequent complex problems.
[0008] Compared with the prior art, the present invention, employing the above technical solution, has the following technical effects: 1. This invention significantly improves the accuracy and reliability of question answering in the poultry field through progressive knowledge enhancement and dynamic knowledge closure; it effectively suppresses the illusion phenomenon of large language models by using question decomposition and hierarchical retrieval strategies, and can achieve deep reasoning for complex questions.
[0009] 2. This invention achieves automatic accumulation and continuous evolution of domain knowledge through knowledge graph completion and a knowledge write-back mechanism based on user feedback, enabling knowledge self-completion. The framework combines high efficiency and high coverage, and its modular design provides good domain adaptability, allowing for easy migration to other vertical professional fields.
[0010] 3. This invention significantly improves the question-answering ability of large language models in the poultry domain, effectively suppresses model illusion, enhances overall performance, and greatly improves question-answering accuracy, while achieving knowledge closure and self-evolution. This framework has good domain adaptability and can be widely applied to various specialized fields. Attached Figure Description
[0011] Figure 1 This is a flowchart of a question-answering method for a large language model in the poultry field based on progressive knowledge enhancement, according to the present invention. Figure 2 This is a flowchart comparing the knowledge base of this invention; Figure 3 This is a flowchart of the webpage retrieval process of the present invention; Figure 4 This is a flowchart of the knowledge refresh process for this invention. Detailed Implementation
[0012] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0013] like Figure 1 As shown, this invention proposes a question-answering method for a large language model in the poultry domain based on progressive knowledge enhancement. The specific steps are as follows: Step 1: Construct a problem dataset for the poultry domain and fine-tune the large language model for problem decomposition. Based on the complex characteristics of poultry diseases, a structured dataset (complex problem - atomic subproblem) for triple extraction optimization is constructed. This dataset is then used to fine-tune the Planning LLM. , making The atomic constraint mechanism ensures that each subproblem obtained from the decomposition satisfies the following: , in, This indicates the number of triples (entity-relation-entity) extracted from the subproblem. This indicates that for a sequence of subproblems Each subproblem in .
[0014] Step 2: Vectorize complex problems and perform initial matching with the domain knowledge base, such as... Figure 2 As shown Step 2-1: Translate the complex questions input by the user. Inputting the data into a poultry-specific embedded model (selecting the 1000 Questions 3 embedded model) generates its high-dimensional semantic vector representation. ; calculate The similarity between the question vectors of all question-answer pairs and the pre-built poultry domain knowledge base is used, and the highest similarity is denoted as . ; like First preset threshold (90%): Directly retrieve the corresponding standard answer from the knowledge base and return it to the user, terminating the process; otherwise, proceed to step 2-2.
[0015] Step 2-2: Translate the complex questions input by the user. Input into the fine-tuned planning language model Using a finely tuned large language model to solve complex problems Decompose to obtain a set of subproblems ; For sets Each subproblem in : (1) Generate its vector representation using the same embedding model. and calculate Similarity to question vectors of question-answer pairs in the knowledge base ; (2) If First preset threshold (90%): Directly retrieve the corresponding [item] from the knowledge base. The standard answer is input into the question-answering language model. ,jump over Subsequent enhancement steps; (3) Otherwise Proceed to the next knowledge enhancement process.
[0016] Step 3, for the sub-problems in Step 2 with a similarity of <90%. Generate missing triples, query the knowledge graph, and complete the question triples. Extracting large language models using triples Pair problem The process involves structured parsing and deep semantic analysis to automatically generate standardized triples to be completed, including "tail entity query type" (entity 1-relation-?), "head entity query type" (?-relation-entity 2), and "relation inference type" (entity 1-?-entity 2). This step leverages pre-trained entity recognition and relation extraction capabilities to transform fuzzy natural language into interactive "query commands" within the knowledge graph. Based on the generated triples to be completed, a SPARQL structured query statement is constructed and a targeted retrieval is performed in the poultry domain knowledge graph. By traversing entity association paths and relation weights, the intelligent completion of unknown elements ("?") is prioritized to form complete triples (entity 1-relation-entity 2), realizing a direct mapping from "question" to "structured knowledge". If the knowledge graph can completely complete the problem triples, then directly return the triples and subproblems completed by the knowledge graph. To Question Answering Large Language Model If the triple is missing, the subsequent knowledge enhancement process will be terminated; if the triple is missing, the subsequent webpage retrieval enhancement process will be activated.
[0017] Step 4, knowledge enhancement based on web page retrieval triple completion, such as... Figure 3 As shown To address the knowledge gaps not covered by knowledge graphs, a closed-loop technology chain is constructed, consisting of "semantic-driven webpage retrieval - deep structured processing - dynamic fusion and completion - enhanced generation," to achieve efficient transformation of unstructured knowledge into structured answers. Step 4-1: Use SearchAPI to retrieve web page content related to the sub-question through the search interface, and extract the relevant content. One webpage; Step 4-2, Multi-threaded concurrent processing The content of each webpage is extracted using the Python package BeautifulSoup. Considering the large amount of text content on the webpage, a large model, Kimi-128k, is used for different webpages. It can accept 128k of context. The webpage content and incomplete triples are input into the large model, and the webpage knowledge is used to complete the triples. Step 4-3, for multi-threaded completion Considering the varying quality of content across different web pages, a confidence level filter was applied to the completed triplet sets, retaining only those with a confidence level higher than 65%. The calculation formula is as follows: , (Source Credibility): The credibility score of the webpage domain [0,1]. Predefined domain classifications (e.g., using publicly available credibility databases), such as authoritative sources (e.g., .gov, .edu, websites of well-known institutions): Common sources (e.g., .com, .org, common news websites): Low-trust sources (e.g., personal blogs, unknown domains): ; (Content Relevance): Web Page Text and Atomization Sub-problem The semantic similarity score ranges from [0,1]. Calculation method: Extracting webpage text (cleaned by beautifulSoup) and... Calculate the cosine similarity of the embedded vectors: ; (Triple Consistency): Identical triples in The percentage of pages that support the program. Calculation method: (Number of web pages that support this triple) ,For example, If two web pages output the same triplet, then Triples A score greater than 90% is considered the same. Weighting coefficient ( ): (Source credibility takes precedence, as webpage quality directly affects reliability). (Content relevance is key to ensuring information accuracy.) (Consistency serves as an aid to avoid noise); Step 4-4: Filter the confidence levels to complete the triplets and subproblems. Input to Question-Answering Large Language Model .
[0018] Step 5: Multi-source knowledge fusion reasoning and response generation The enhanced knowledge acquired in steps 2-4 is integrated into the question-answering large language model. Perform multi-source information fusion: Step 5-1 involves aligning the domain knowledge base matching results, knowledge graph triple completion data, and webpage retrieval structured information using features. Based on the fixed relation system of the poultry knowledge graph, a dynamic semantic template is predefined for each relation type. The multivariate triples obtained from parsing each sub-problem are translated using their respective relation type matching templates, achieving a precise mapping from the (entity-relation-entity) triple structure to natural language fragments. Step 5-2: Input the atomized sub-problem and its corresponding translated triple into the question-answering large language model. It combines the semantics of the question to generate a structured response and simultaneously outputs: a user-oriented natural language answer; a complete relational chain supporting the conclusion (for interpretability verification); and generates the final solution to the complex question Q.
[0019] Step 6: Dynamic Co-evolution of Knowledge Base and Knowledge Graph Step 6-1: Use the confidence-filtered completion triples to dynamically complete and optimize the knowledge graph; Step 6-2: Combining the reinforcement learning mechanism of the domain knowledge base, the system continuously monitors and analyzes users' explicit satisfaction feedback and implicit acceptance performance in actual interactions. When the system determines that the user's satisfaction has reached a set threshold, it automatically triggers the knowledge write-back process, vectorizing the high-quality question-and-answer pairs verified by the user and storing them in the domain knowledge base. This continuously optimizes and updates the knowledge system, improving its support capabilities and intelligence level for subsequent tasks.
[0020] For historical questions and answers in the question-and-answer database that have long been inactive and have low credibility, automatic demotion, archiving, or even forgetting are implemented to maintain the activity of the knowledge base and the real-time responsiveness of the system. Figure 4 As shown.
[0021] The method of the present invention will be described below with reference to a specific embodiment.
[0022] Step 1: Construct a problem dataset for the poultry domain and fine-tune the large language model for problem decomposition. Based on the complex nature of problems in the field of poultry diseases, a structured dataset (complex problem - atomic subproblem) optimized for triple extraction is constructed; this dataset is then used to fine-tune a domain-adapted large language model. The atomicity constraint mechanism ensures that each subproblem satisfies the following: .
[0023] Step 2, regarding the problem Vectorize sub-problems and compare them with domain knowledge bases. On the issue The poultry-domain-adapted embedding model Qwen3-embedding is vectorized to generate a 64-dimensional high-dimensional semantic representation. [0.04253073036670685, 0.02677680179476738,0.03238578513264656, -0.11754479259252548, -0.058869943022727966, -0.0203874371945858, 0.10408323258161545, 0.059455230832099915, -0.08984129130840302, 0.009705981239676476, 0.07096584141254425, -0.016351407393813133, -0.041555255651474, -0.08447617292404175, -0.042677052319049835, -0.08891458809375763, -0.11364289373159409, -0.32210201025009155, -0.05189529433846474, -0.15851476788520813, -0.18943732976913452, 0.12320254743099213, -0.17382973432540894,0.0903778001666069, 0.17353709042072296, 0.3837520480155945,0.09042657166719437, -0.07159990072250366, -0.03162979334592819,0.08823175728321075, -0.2780105173587799, -0.08740260452032089, -0.06047947704792023, 0.14124885201454163, 0.15822212398052216,0.08476881682872772, -0.12573878467082977, 0.031654179096221924, -0.12125159800052643, -0.009937656112015247, -0.06321080774068832, -0.1320793777704239, 0.10925325006246567, -0.02797175943851471, -0.11149684339761734, 0.13734693825244904, -0.06525930762290955, -0.02755718119442463, -0.2725478410720825, -0.1920711249113083, -0.025533070787787437, -0.17148858308792114, -0.048432357609272,0.04157964140176773, 0.0870124101638794, 0.015656381845474243,0.13539598882198334, 0.03555608168244362, 0.045042578130960464, -0.06482034176588058, -0.02288709208369255, 0.1501256674528122, -0.006901489105075598, -0.23235826194286346];。 The vector distance between this representation and the question-answer pairs in the Milvus domain question-answering knowledge base is calculated based on cosine similarity. ; when The system directly calls the corresponding answer from the knowledge base and returns it to the user, interrupting the entire subsequent process. By decomposing the subproblems using the model from step 1, we obtain... ,right Repeat the above steps to obtain the similarity score. ; when If the accuracy is greater than or equal to 90%, the corresponding answer in the knowledge base is directly called to the question-answering language model. This interrupts the subsequent knowledge enhancement process for that subproblem; Here, if the user's question is very simple, it can be broken down into a single sub-question, and the sub-question has a similarity of >90% in the vector database, the user can be answered directly without going through all subsequent steps.
[0024] Step 3, regarding the similarity in Step 2 subproblems Generate missing triples, query the knowledge graph, and complete the question triples. This step, through pre-trained entity recognition and relation extraction capabilities, transforms fuzzy natural language into interactive "query commands" within the knowledge graph. This is transformed into (Chronic Respiratory Disease - Definition - ?).
[0025] Based on the generated triples, a SPARQL structured query is constructed to perform targeted retrieval within the poultry domain knowledge graph. By traversing entity association paths and relation weights, intelligent completion of unknown elements ("?") is prioritized to form complete triples (entity 1 - relation - entity 2), achieving a direct mapping from "question" to "structured knowledge." MATCH (crd:disease{name:"chronic respiratory disease"})-[r:definition]->(definition)RETURNcrd.name AS entity1, type(r) AS relation, definition.content AS entity2 The complete triad [Chronic respiratory diseases - definition - a group of diseases characterized by chronic inflammation, structural abnormalities or functional impairment of the respiratory tract (including trachea, bronchi, lung tissue, etc.), with a long course (usually more than 3 months) or recurrent attacks] is obtained; If the knowledge graph does not find relevant content, the subsequent webpage retrieval enhancement module is activated. If the content is successfully completed, it is then input into the question-answering large language model. .
[0026] Step 4: Knowledge Enhancement Based on Triple Completion from Web Page Retrieval This section addresses sub-problems for which no answers could be found in the knowledge graph. To perform a webpage search, here we take... For example, what are the specific impacts of CRD on poultry production performance? Step 4-1: Use the Search API to retrieve web page content related to the sub-question through the search interface, and extract the top k relevant web page contents. Here, we take... ; Step 4-2, Multi-threaded concurrent processing For each webpage, the text content is extracted using the Python package BeautifulSoup. Considering the large amount of text content on each webpage, a large model, Kimi-128k, is used, which can accept 128k of context. The webpage content and incomplete triples (CRD-influence-?) are input into the large model, and the webpage knowledge is used to complete the triples. T1: CRD - Impact - Delay in Broiler Market Launch Time (sohu.com) Page 1 T2: CRD - Impact - Decreased Hatching Rate of Hatching Eggs (sohu.com) Page 1 T3: CRD - Impact - Egg Product Cracking (sohu.com) Webpage 1 T4: CRD - Impact - Reduced feed intake in chicken flocks (mp.weixin.qq.com) Page 2 T5: CRD - Impact - Reduced Productivity (mp.weixin.qq.com) Page 2 T6: CRD - Impact - Decreased physical fitness (mp.weixin.qq.com) Page 2 T7: CRD - Impact - Decreased Egg Production Rate (baike.baidu.com) Page 3 T8: CRD - Impact - Decreased hatching rate of fertilized eggs (baike.baidu.com) Page 3 T9: CRD - Impact - Increase in weak chicks (baike.baidu.com) Page 3
[0027] Step 4-3, for multi-threaded completion Given a set of triplet contents, and considering the varying quality of content across different web pages, we perform confidence filtering on the triplets to obtain the most suitable triplet. The confidence score CS[0,1] is calculated as follows: CS1 = 0.4×0.7+0.4×0.85+0.2×0.111=0.642 CS2 = 0.4×0.7+0.4×0.90+0.2×0.222=0.684 CS3 = 0.4×0.7+0.4×0.70+0.2×0.111=0.582 CS4 = 0.4×0.7+0.4×0.88+0.2×0.111=0.654 CS5 = 0.4×0.7+0.4×0.92+0.2×0.111=0.670 CS6 = 0.4×0.7+0.4×0.86+0.2×0.111=0.646 CS7 = 0.4×0.7+0.4×0.93+0.2×0.111=0.674 CS8 = 0.4×0.7+0.4×0.90+0.2×0.222=0.684 CS9 = 0.4×0.7+0.4×0.87+0.2×0.111=0.650
[0028] Excluding triples with a confidence level less than 0.65, we obtain the subproblem. The corresponding triplet answer is: What are the specific effects of CRD on poultry production performance? CRD - Impact - Decreased hatchability of fertilized eggs; CRD - Impact - Reduced feed intake in flocks; CRD - Impact - Reduced production performance; CRD - Impact - Decreased egg production rate; CRD - Impact - Decreased hatchability of fertilized eggs; CRD - Impact - Increased number of weak chicks.
[0029] Step 5: Multi-source knowledge fusion reasoning and response generation Using Java's countDownLaunch, knowledge retrieval is performed in parallel for all sub-questions. After all sub-questions have retrieved their answers, a thought chain reasoning mechanism is used to drive question-answer generation.
[0030] Step 6: Dynamic Co-evolution of Knowledge Base and Knowledge Graph
[0031] This invention also proposes a question-answering system based on a large language model in the poultry domain, using progressive knowledge enhancement, comprising: The planning large language model fine-tuning module is used to construct a structured dataset for triple extraction optimization based on the complex problem characteristics in the field of poultry diseases. The structured dataset is then used to fine-tune the planning large language model so that the sub-problems obtained by decomposing complex problems by the fine-tuned planning large language model satisfy the atomicity constraint mechanism. The poultry disease knowledge base comparison module is used to calculate the cosine similarity between the complex question input by the user and the questions of each question-answer pair in the pre-built poultry disease knowledge base, and find the maximum value among all cosine similarities. It then determines whether the maximum value is greater than or equal to a first preset threshold. If so, the answer of the question-answer pair corresponding to the maximum value is returned to the user; otherwise, the module for complex question decomposition and sub-question matching is entered. The complex problem decomposition and sub-problem matching module is used to decompose the complex problem input by the user into several sub-problems using a fine-tuned planning large language model. For each sub-problem, the cosine similarity between the sub-problem and the questions of each question-answer pair in the pre-built poultry disease knowledge base is calculated, and the maximum value among all cosine similarities is found. It is then determined whether the maximum value is greater than or equal to a first preset threshold. If so, the answer of the question-answer pair corresponding to the maximum value and the corresponding sub-problem are input into the question-answering large language model; otherwise, the module proceeds to the knowledge graph enhancement matching module. The knowledge graph-enhanced matching module is used to match sub-questions with a pre-built poultry disease knowledge graph for sub-questions whose maximum value is less than a first preset threshold. If the answer to the sub-question is found, the answer and the corresponding sub-question are input into the question-answering big language model; otherwise, the webpage retrieval enhancement module is entered. The webpage retrieval enhancement module is used to retrieve the answers to sub-questions whose maximum value is less than the first preset threshold and whose answers are not matched in the pre-built poultry disease knowledge graph through webpage retrieval, and input the answers and corresponding sub-questions into the question-answering big language model. The fusion module is used to fuse multi-source information from all sub-questions and their answers using a question-answering language model, generating answers to complex questions and returning them to the user. The dynamic collaborative optimization module is used to dynamically and collaboratively optimize the pre-built poultry disease knowledge base and the pre-built poultry disease knowledge graph for solving subsequent complex problems.
[0032] Based on the same inventive concept, embodiments of this application provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the aforementioned steps of the question-answering method for a large language model in the poultry domain based on progressive knowledge enhancement.
[0033] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the aforementioned question-answering method for a large language model in the poultry domain based on progressive knowledge enhancement.
[0034] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0035] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0036] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0037] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0038] The above embodiments are merely illustrative of the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made to the technical solutions based on the technical concept proposed in this invention shall fall within the scope of protection of this invention.
Claims
1. A question-answering method based on a large language model in the poultry domain using progressive knowledge enhancement, characterized in that, Includes the following steps: Step 1: Based on the complex characteristics of poultry disease, construct a structured dataset for triple extraction optimization, and use the structured dataset to fine-tune the planning large language model so that the sub-problems obtained by decomposing the complex problem by the fine-tuned planning large language model satisfy the atomicity constraint mechanism. Step 2: Calculate the cosine similarity between the complex question input by the user and the questions of each question-answer pair in the pre-built poultry disease knowledge base, and find the maximum value among all cosine similarities. Determine whether the maximum value is greater than or equal to the first preset threshold. If so, return the answer of the question-answer pair corresponding to the maximum value to the user. Otherwise, proceed to step 3; Step 3: Using the fine-tuned planning large language model, the complex question input by the user is decomposed into several sub-questions. For each sub-question, the cosine similarity between the sub-question and the questions of each question-answer pair in the pre-built poultry disease knowledge base is calculated, and the maximum value among all cosine similarities is found. It is determined whether the maximum value is greater than or equal to the first preset threshold. If so, the answer of the question-answer pair corresponding to the maximum value and the corresponding sub-question are input into the question-answering large language model; otherwise, proceed to step 4. Step 4: For sub-questions whose maximum value is less than the first preset threshold, use the pre-built poultry disease knowledge graph to match and query the sub-questions. If the answer to the sub-question is matched and found, input the answer and the corresponding sub-question into the question-answering big language model; otherwise, proceed to step 5. Step 5: For sub-questions whose maximum value is less than the first preset threshold and for which no matching answer was found in the pre-constructed poultry disease knowledge graph, obtain the answer to the sub-question through web page retrieval, and input the answer and the corresponding sub-question into the question-answering big language model; Step 6: Use the question-answering big language model to fuse all the sub-questions and their answers obtained in steps 3-5 to generate the answer to the complex question and return it to the user; Step 7: Dynamically and collaboratively optimize the pre-built poultry disease knowledge base and the pre-built poultry disease knowledge graph for solving subsequent complex problems.
2. The question-answering method for a large language model in the poultry domain based on progressive knowledge enhancement as described in claim 1, characterized in that, The specific process of step 4 is as follows: The large language model extracts triples to perform deep semantic parsing on sub-problems and generate triples for the problems to be completed. Based on the triples of questions to be completed, construct a SPARQL structured query statement and perform a targeted search in the pre-built poultry disease knowledge graph. If the corresponding answer is found, input the answer and the corresponding sub-question into the question-answering big language model; otherwise, proceed to step 5.
3. The question-answering method for a large language model in the poultry domain based on progressive knowledge enhancement as described in claim 2, characterized in that, The specific process of step 5 is as follows: Step 5.1: Use the Search API to retrieve web page content related to the sub-question through the search interface, and extract the relevant content. One webpage; Step 5.2, use the Python package beautifulSoup to extract the initial... The text content of each webpage is input into the large model kimi-128k, along with the triplet to be completed and the text content of each webpage, to generate a complete triplet based on webpage knowledge. Step 5.3: Calculate the confidence score of each completed triplet, delete completed triplets with a confidence score lower than the second preset threshold, and input the remaining completed triplets into the question-answering large language model; where the confidence score... The calculation formula is as follows: , in, This represents the feasibility score of a webpage domain name. , This represents the semantic similarity score between the webpage text content and the sub-question. , This indicates the support percentage of each complete triplet among all complete triplets. and All are weighting coefficients.
4. The question-answering method for a large language model in the poultry domain based on progressive knowledge enhancement as described in claim 3, characterized in that, The specific process of step 6 is as follows: Step 6.1: Using the pre-built poultry disease knowledge graph, the sub-questions and corresponding answers matched by the poultry disease knowledge base pre-built in Step 3, the sub-questions and corresponding answers matched by the poultry disease knowledge graph pre-built in Step 4, and the remaining completion triplets obtained by web page retrieval in Step 5 are mapped into natural language fragments. Step 6.2: Use the question-answering big language model to fuse all sub-questions and their corresponding natural language fragments to generate the final solution to the complex question.
5. The question-answering method for a large language model in the poultry domain based on progressive knowledge enhancement as described in claim 4, characterized in that, The specific process of step 7 is as follows: Step 7.1: Use the remaining completion triplet obtained in step 5.3 to dynamically complete and optimize the pre-constructed poultry disease knowledge graph; Step 7.2: Monitor the explicit satisfaction signal and implicit satisfaction score of the user for the answer to the complex question. When the user is satisfied with the answer to the complex question and the satisfaction score reaches the third preset threshold, knowledge writing is triggered, and the complex question and the corresponding answer are stored in the pre-built poultry disease knowledge base.
6. A question-answering system based on a large language model in the poultry industry using progressive knowledge enhancement, characterized in that, The system includes: The planning large language model fine-tuning module is used to construct a structured dataset for triple extraction optimization based on the complex problem characteristics in the field of poultry diseases. The structured dataset is then used to fine-tune the planning large language model so that the sub-problems obtained by decomposing complex problems by the fine-tuned planning large language model satisfy the atomicity constraint mechanism. The poultry disease knowledge base comparison module is used to calculate the cosine similarity between the complex question input by the user and the questions of each question-answer pair in the pre-built poultry disease knowledge base, and find the maximum value among all cosine similarities. It then determines whether the maximum value is greater than or equal to a first preset threshold. If so, the answer of the question-answer pair corresponding to the maximum value is returned to the user; otherwise, the module for complex question decomposition and sub-question matching is entered. The complex problem decomposition and sub-problem matching module is used to decompose the complex problem input by the user into several sub-problems using a fine-tuned planning large language model. For each sub-problem, the cosine similarity between the sub-problem and the questions of each question-answer pair in the pre-built poultry disease knowledge base is calculated, and the maximum value among all cosine similarities is found. It is then determined whether the maximum value is greater than or equal to a first preset threshold. If so, the answer of the question-answer pair corresponding to the maximum value and the corresponding sub-problem are input into the question-answering large language model; otherwise, the module proceeds to the knowledge graph enhancement matching module. The knowledge graph-enhanced matching module is used to match sub-questions with a pre-built poultry disease knowledge graph for sub-questions whose maximum value is less than a first preset threshold. If the answer to the sub-question is found, the answer and the corresponding sub-question are input into the question-answering big language model; otherwise, the webpage retrieval enhancement module is entered. The webpage retrieval enhancement module is used to retrieve the answers to sub-questions whose maximum value is less than the first preset threshold and whose answers are not matched in the pre-built poultry disease knowledge graph through webpage retrieval, and input the answers and corresponding sub-questions into the question-answering big language model. The fusion module is used to fuse multi-source information from all sub-questions and their answers using a question-answering language model, generating answers to complex questions and returning them to the user. The dynamic collaborative optimization module is used to dynamically and collaboratively optimize the pre-built poultry disease knowledge base and the pre-built poultry disease knowledge graph for solving subsequent complex problems.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the question-answering method for a large language model in the poultry domain based on progressive knowledge enhancement as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the question-answering method for a large language model in the poultry domain based on progressive knowledge enhancement as described in any one of claims 1 to 5.