Anti-inflammatory diet knowledge question and answer method and system based on triplets and large model fusion
By transforming anti-inflammatory diet knowledge into triples and indexing them using vectorization, and then generating answers using a large language model, the problems of accuracy and usability of knowledge in the field of anti-inflammatory diets are solved, achieving efficient and accurate intelligent question answering.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ANHUI HONGYUAN JUKANG MEDICAL TECH CO LTD
- Filing Date
- 2026-04-22
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies struggle to achieve a balance between knowledge accuracy, ease of retrieval, and maintenance flexibility in the field of anti-inflammatory diets, failing to meet the demand for high-precision, low-illusion intelligent question answering.
Unstructured text in the field of anti-inflammatory diets is transformed into triples and stored in JSON format. Target natural language query sentences that meet quality standards are generated, and vectorized indexing is performed using a pre-trained semantic encoding model. Answers are generated by combining a large language model, and the generation process is constrained by structured context.
It has achieved the standardization and structuring of anti-inflammatory diet knowledge, improved the accuracy and efficiency of knowledge retrieval, reduced the uncertainty of generated content, and ensured the factual accuracy and professionalism of the answers.
Smart Images

Figure CN122432316A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing technology, specifically to a question-answering method and system for anti-inflammatory diet knowledge based on the fusion of triples and large models. Background Technology
[0002] With the continuous improvement of public health awareness, society's demand for scientific and accurate professional medical knowledge is growing. Anti-inflammatory diets, as an important research direction at the intersection of nutrition and preventive medicine, have received widespread attention due to their significant value in chronic inflammation intervention and chronic disease prevention. However, due to limitations such as uneven distribution of medical resources, high professional knowledge thresholds, and inadequate channels for disseminating authoritative health information, the general public finds it difficult to conveniently and systematically obtain reliable and standardized knowledge related to anti-inflammatory diets. In recent years, artificial intelligence technologies, represented by generative large language models, have developed rapidly, providing users with an efficient way to acquire knowledge through natural language interaction. However, general-purpose large language models are prone to factual illusions in the professional medical field, and the generated content suffers from insufficient accuracy and unreliability, failing to directly meet the actual needs for precise knowledge-based question answering in the field of anti-inflammatory diets.
[0003] To alleviate the illusion problem of large language models, retrieval augmentation generation (RAG) technology has become the mainstream solution, with existing technologies mainly forming three implementation paths. The first is a large model fine-tuning method based on domain data, which involves collecting specialized corpora such as anti-inflammatory diets to further train or fine-tune general large models, adapting them to specialized domain contexts. The second is a retrieval augmentation method based on unstructured text, which vectorizes unstructured knowledge such as documents, encyclopedias, and question-answer pairs to create an index, and then uses semantic retrieval to recall relevant text fragments as context to assist the large model in generating answers; this is currently the most widely used method. The third is an augmentation method based on structured knowledge bases such as knowledge graphs, which organizes professional knowledge into structured forms such as entities and relationships to improve the accuracy and logic of knowledge representation.
[0004] While existing retrieval enhancement techniques have improved the reliability of specialized question answering to some extent, they still have significant shortcomings in fields such as anti-inflammatory diets, where knowledge relationships are complex and entity connections are close. Methods based on fine-tuning general-purpose large models require large amounts of high-quality labeled data, resulting in high training costs and implementation barriers. Retrieval methods based on unstructured text suffer from uncontrollable knowledge granularity, significant noise interference, and imprecise factual expression, making it difficult to clearly present the structured relationships between food, components, pathways, and anti-inflammatory effects. While purely structured knowledge graphs offer higher accuracy, they are difficult to match with natural language user queries, failing to directly support fluent semantic retrieval; and model fine-tuning methods are limited by high data costs, long training cycles, and inflexible knowledge updates. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this application provides a question-answering method and system for anti-inflammatory diet knowledge based on the fusion of triples and large models. This solves the problem that existing technologies cannot simultaneously ensure knowledge accuracy, ease of retrieval, and maintenance flexibility, and cannot adequately meet the high-precision, low-illusion intelligent question-answering requirements in the field of anti-inflammatory diets.
[0006] To achieve the above objectives, this application provides the following technical solution: In a first aspect, embodiments of this application provide a question-answering method for anti-inflammatory diet knowledge based on the fusion of triples and a large model. This method includes: acquiring unstructured text representing knowledge in the anti-inflammatory diet domain; performing information extraction and structuring processing on the unstructured text to convert it into triples and store them in JSON format; inputting the triples into a preset large language model, combining structured prompts to generate target natural language query sentences that meet preset quality standards for each triple; mapping each target natural language query sentence into a high-dimensional vector using a pre-trained semantic encoding model, and associating the high-dimensional vector with the triples to obtain a vector index library; and acquiring user input. The problem is that the user input question is transformed into a query vector through a pre-trained semantic encoding model. The query vector is then matched with high-dimensional vectors in a vector index for similarity, and sorted from high to low based on the similarity scores to obtain a similarity sequence. Based on the mapping relationship between the high-dimensional vectors and the target natural language query sentences, the top K similarity scores in the similarity sequence are used to determine the K target natural language query sentences corresponding to them, and the triples corresponding to the K target natural language query sentences are retrieved. The triples corresponding to the K target natural language query sentences are organized into a structured context according to a preset template. The structured context and the user input question are then input into a preset large language model, and system instructions are used to guide the large language model to generate an answer corresponding to the user input question.
[0007] According to a first aspect of the embodiments of this application, after organizing the triples corresponding to K target natural language query sentences into a structured context according to a preset template, inputting the structured context and the user input question into a preset large language model, and constructing system instructions to guide the large language model to generate an answer corresponding to the user input question, the anti-inflammatory diet knowledge question answering method based on the fusion of triples and the large model further includes: formatting the answer corresponding to the user input question to bold and emphasize the conclusion part, food name part, and suggestion part in the answer to obtain first text information; adding a knowledge source part at the end of the first text information to enhance the readability and credibility of the result to obtain and output second text information; wherein, the knowledge source part includes the triples referenced in the answer.
[0008] According to a first aspect of the embodiments of this application, the triple includes a first entity, a relation, and a second entity; the first entity and the second entity are entities in the anti-inflammatory diet domain, and the relation is used to characterize the semantic association between the first entity and the second entity.
[0009] According to a first aspect of the embodiments of this application, the aforementioned input of triples into a preset large language model, combined with structured prompt words, generates a target natural language query sentence that meets a preset quality standard for each triple. Specifically, this may include: generating 1-N natural language query sentences for each triple through the large language model, wherein the natural language query sentences are used to represent the user's request for advice; sampling and checking the 1-N natural language query sentences to evaluate their accuracy, naturalness, and coverage, and obtaining evaluation results; iteratively optimizing the structured prompt words based on the evaluation results to generate a target natural language query sentence that meets the preset quality standard.
[0010] According to a first aspect of the embodiments of this application, each target natural language query sentence is mapped into a high-dimensional vector by a pre-trained semantic coding model, satisfying the expression: ; In the formula, For the target natural language query sentence, It is a high-dimensional vector. This is a pre-trained semantic encoding model.
[0011] According to a first aspect of the embodiments of this application, the vector index library is an index set that associates and stores high-dimensional vectors and triples corresponding to target natural language query sentences and supports similarity retrieval.
[0012] According to a first aspect of the embodiments of this application, the large language model is ChatGLM; the pre-trained semantic encoding model is BAAI / bge-large-zh-v1.5; and the knowledge sources for the unstructured text include a dietary anti-inflammatory property food database, nutrition guidelines, and expert consensus.
[0013] According to a first aspect of the embodiments of this application, the triples corresponding to the K target natural language query sentences satisfy the expression: ; in, This represents the triples corresponding to the K target natural language queries that were recalled. For the target natural language query sentence, Enter the question for the user. For pre-trained semantic encoding models; Indicates cosine similarity; This means finding the top K most similar target natural language queries among all calculated similarity scores and recalling the triples corresponding to the top K target natural language queries.
[0014] Secondly, embodiments of this application provide an anti-inflammatory diet knowledge question-answering system based on the fusion of triples and large models. This anti-inflammatory diet knowledge question-answering system based on the fusion of triples and large models includes: a text processing module, a query sentence generation module, a mapping association module, a similarity matching module, a triple recall module, and an answer generation module.
[0015] Specifically, the text processing module acquires unstructured text representing knowledge in the anti-inflammatory diet domain, extracts and structures the unstructured text to convert it into triples and stores it in JSON format; the query generation module inputs the triples into a preset large language model, combines structured prompts, and generates target natural language query sentences that meet preset quality standards for each triple; the mapping and association module maps each target natural language query sentence into a high-dimensional vector using a pre-trained semantic encoding model, and associates the high-dimensional vector with the triples to obtain a vector index library; the similarity matching module acquires user input questions, and converts the user input questions into... The query vector is converted into a query vector, and then matched with high-dimensional vectors in the vector index for similarity. The similarity scores are sorted from high to low to obtain a similarity sequence. The triplet recall module is used to determine the K target natural language query sentences corresponding to the top K similarity scores in the similarity sequence based on the mapping relationship between the high-dimensional vector and the target natural language query sentence, and recall the triplets corresponding to the K target natural language query sentences. The answer generation module is used to organize the triplets corresponding to the K target natural language query sentences into a structured context according to a preset template. The structured context and the user input question are input into a preset large language model, and system instructions are used to guide the large language model to generate an answer corresponding to the user input question.
[0016] Thirdly, embodiments of this application provide an electronic device, which includes: a processor, a memory, and a program stored in the memory and executable on the processor. When the program is executed by the processor, it implements the anti-inflammatory diet knowledge question-and-answer method based on the fusion of triples and large models described in the first aspect.
[0017] Fourthly, embodiments of this application provide a computer-readable storage medium storing a program or instructions that, when executed by a processor, implement the anti-inflammatory diet knowledge question-and-answer method based on triplet and large model fusion described in the first aspect.
[0018] This application provides a question-answering method and system for anti-inflammatory diet knowledge based on the fusion of triples and large models. Compared with existing technologies, it has the following advantages: This application transforms unstructured text in the field of anti-inflammatory diets into triples for structured storage. Based on these triples, standardized target natural language query sentences are generated and vectorized. A vector index is constructed by associating these triples. When a user asks a question, this application quickly retrieves the corresponding triples through semantic similarity matching and forms a structured context using a preset template. This application achieves standardization and structuring of anti-inflammatory diet knowledge in knowledge representation, reducing information noise and ambiguity caused by unstructured text. Simultaneously, this application utilizes a pre-trained semantic encoding model to achieve accurate matching between user input questions and standardized target natural language query sentences, improving the accuracy and efficiency of knowledge retrieval. Furthermore, by constraining the large language model to generate answers through structured context, the uncertainty of the model-generated content can be reduced. While achieving convenient natural language interaction, this application ensures the factual accuracy and professionalism of anti-inflammatory diet knowledge question answering. Attached Figure Description
[0019] 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.
[0020] Figure 1 This is a flowchart illustrating an anti-inflammatory diet knowledge question-answering method based on the fusion of triples and a large model, provided in an embodiment of this application. Figure 2 This is an exemplary architecture diagram corresponding to an anti-inflammatory diet knowledge question-answering method based on the fusion of triples and large models provided in this application embodiment; Figure 3 This is an exemplary schematic diagram illustrating how a large language model generates answers corresponding to user-input questions. Figure 4 This is a schematic diagram of the structure of an anti-inflammatory diet knowledge question-answering system based on the fusion of triples and large models provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are described clearly and completely. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0023] This application provides a question-answering method and system for anti-inflammatory diet knowledge based on the fusion of triples and large models. This solves the problem that existing technologies cannot simultaneously ensure knowledge accuracy, ease of retrieval, and maintenance flexibility, and cannot well meet the high-precision, low-illusion intelligent question-answering needs in the field of anti-inflammatory diet.
[0024] The technical solution in this application is to solve the above-mentioned technical problems, and the general idea is as follows: With the continuous improvement of public health awareness, the demand for scientific and accurate medical knowledge is increasing. Among these, anti-inflammatory diets, as a hot topic at the intersection of nutrition and preventive medicine, are becoming increasingly important in terms of professional guidance. However, due to the uneven distribution of medical resources and the lack of accessible channels for disseminating authoritative health information, the general public finds it difficult to conveniently and systematically obtain reliable anti-inflammatory dietary knowledge. In recent years, artificial intelligence technologies, represented by generative large language models, have provided new avenues for knowledge acquisition, allowing users to easily query relevant information through natural language interaction. However, large language models generally suffer from the "illusion" problem in professional fields, meaning that the generated content appears reasonable but actually contains factual errors. This mainly stems from the disconnect between their general training data and in-depth knowledge in specific domains.
[0025] To alleviate this problem, retrieval-enhanced generation techniques are widely adopted. These techniques retrieve relevant information from external knowledge sources and provide it as context to a large model, thus constraining the scope of its generated answers. In current practice, the main technical approaches are as follows: (1) The method based on fine-tuning of a general large model: By continuing to train or fine-tuning the domain text, the model can be adapted to the professional context. However, this method requires a large amount of high-quality labeled data, the training cost is high, and the implementation threshold is high.
[0026] (2) RAG method based on unstructured text retrieval: This is currently the most mainstream RAG implementation. It typically converts long documents, encyclopedia entries, or compiled question-and-answer pairs in the knowledge base into vectors, and retrieves relevant text fragments through semantic similarity matching. Although this method improves the accessibility of knowledge, it has inherent defects: the retrieval unit is a continuous text sentence or paragraph, the length and information density of which are uncontrollable. Excessively long texts may contain irrelevant noise, interfering with the model's judgment; excessively short texts are difficult to fully and structurally express the complex relationships between entities (such as "compound B contained in food A can produce an anti-inflammatory effect by inhibiting pathway C"). In addition, plain text cannot be efficiently parsed into structured facts by the model, which limits the accuracy of inference.
[0027] (3) Enhancement methods based on structured knowledge bases: Some studies have attempted to utilize structured knowledge such as knowledge graphs. Although knowledge graphs are more accurate than ordinary textual knowledge, structured knowledge graphs are difficult to match directly with unstructured user queries and still require further processing.
[0028] The most commonly used method in existing technologies is the second approach, namely the RAG system based on the retrieval of unstructured text fragments (including question-answer pairs). This type of system has been shown to effectively reduce some hallucinations, but its drawbacks are particularly prominent when dealing with domains such as anti-inflammatory diets, which involve complex relationships, frequent entity interactions, and highly structured knowledge. These drawbacks mainly include: Insufficient precision in knowledge representation: Natural language sentences struggle to accurately and unambiguously express specific relationships between multiple entities, and are prone to introducing non-factual text such as embellishments and evaluations.
[0029] There is a conflict between retrieval granularity and answer quality: fine-grained retrieval (such as a single fact) has low recall, while coarse-grained retrieval (such as an entire text) introduces noise, affecting the ability of large models to accurately extract key facts from lengthy contexts.
[0030] Inflexible knowledge expansion and maintenance: Adding or modifying knowledge requires rewriting or editing a large amount of coherent text, making it difficult to achieve independent updates and combinations of atomic knowledge points.
[0031] Therefore, how to design a search enhancement generation scheme that can both utilize structured knowledge to ensure factual accuracy, maintain the ease of use and flexibility of natural language retrieval, and implement cost-controllable search results has become a pressing technical problem in this field.
[0032] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0033] The following section first introduces an anti-inflammatory diet knowledge question-and-answer method based on the fusion of triples and large models provided in the embodiments of this application.
[0034] This application provides a flowchart illustrating an anti-inflammatory diet knowledge question-answering method based on the fusion of triples and a large model. Please refer to the following: Figure 1 and Figure 2 The anti-inflammatory diet knowledge question-answering method based on the fusion of triples and large models may include the following steps S110-S160.
[0035] S110. Obtain unstructured text representing knowledge in the field of anti-inflammatory diets, extract information from the unstructured text and perform structuring processing to convert the unstructured text into triples and store them in JSON format.
[0036] Understandably, this application extracts and structures information from unstructured text representing knowledge in the field of anti-inflammatory diets, transforming it into triples and storing it in JSON format. On the one hand, this achieves the transformation of unstructured knowledge into standardized and structured knowledge units, eliminating redundant and messy information in the text, making the expression of knowledge in the field of anti-inflammatory diets clearer and more consistent. On the other hand, the JSON format has universality and easy parsing, facilitating the reading, calling and management of knowledge in subsequent steps, providing a standardized and reliable data foundation for subsequent processing flows such as generating target natural language query sentences and building vector index libraries, thereby improving the data processing standardization of the overall solution.
[0037] S120. Input the triples into the preset large language model, and combine them with structured prompts to generate a target natural language query sentence that meets the preset quality standards for each triple.
[0038] Understandably, this application inputs structured triples into a large language model and combines them with structured prompts to generate target natural language query sentences that meet preset quality standards. This can transform machine-readable triple knowledge into standardized query statements that are close to the expression habits of natural language. It not only retains the core factual knowledge carried by the triples, but also forms a unified text form that is adapted to semantic retrieval. This provides standardized and high-quality matching objects for subsequent semantic matching with user input questions, avoids matching deviations caused by inconsistent knowledge expression forms, and improves the consistency and accuracy of subsequent semantic matching.
[0039] S130. Each target natural language query sentence is mapped to a high-dimensional vector through a pre-trained semantic coding model, and the high-dimensional vector is associated with triples to obtain a vector index library.
[0040] Understandably, this application employs a pre-trained semantic encoding model to map target natural language queries into high-dimensional vectors, and associates these vectors with triples to construct a vector index library. This transforms text-based queries into vector representations capable of numerical computation, enabling vectorized indexing and storage of knowledge. The mapping process can be invoked via Python programming. The establishment of the vector index library supports efficient similarity calculation and rapid retrieval, providing data structure support for subsequent real-time responses to user questions and rapid location of relevant knowledge, thereby improving the efficiency and scalability of knowledge retrieval.
[0041] S140. Obtain the user input question, transform the user input question into a query vector through a pre-trained semantic encoding model, perform similarity matching between the query vector and high-dimensional vectors in the vector index library, and sort them from high to low based on the similarity score to obtain a similarity sequence.
[0042] Understandably, this application transforms user input questions into query vectors using the same pre-trained semantic encoding model, and performs similarity matching and sorting with high-dimensional vectors in the vector index library. This enables accurate comparison between user questions and candidate knowledge in a unified semantic space, objectively quantifying their relevance. By forming a similarity sequence from high to low similarity scores, the relevance between knowledge and user questions can be intuitively distinguished, providing a reliable basis for screening highly relevant knowledge.
[0043] S150. Based on the mapping relationship between high-dimensional vectors and target natural language query sentences, determine the K target natural language query sentences corresponding to the top K similarity scores in the similarity sequence, and recall the triples corresponding to the K target natural language query sentences.
[0044] Understandably, this application selects the query sentences corresponding to the top K high similarity scores based on the mapping relationship between high-dimensional vectors and target natural language query sentences, and recalls their associated triples. This can accurately filter out structured core knowledge that is highly relevant to the user's input question, eliminate low-relevance or irrelevant knowledge, and reduce the interference of noise information on subsequent answer generation. At the same time, this application directly recalls structured knowledge in the form of triples, which can ensure the factual accuracy of the acquired knowledge.
[0045] S160. Organize the triples corresponding to the K target natural language query sentences into a structured context according to a preset template. Input the structured context and the user input question into a preset large language model. Construct system instructions to guide the large language model to generate an answer corresponding to the user input question. For example, please refer to... Figure 3 The system command could be: "Please answer the user's question by imitating the tone of a senior anti-inflammatory diet expert and combining the following knowledge points. Answer the question directly without explanation."
[0046] Understandably, this application organizes the recalled triples into a structured context according to a preset template and inputs it into the large language model along with the user's question, guiding the large language model to generate an answer in conjunction with system instructions. On the one hand, this application constrains the generation scope of the large language model through a structured and factually clear structured context, reducing the occurrence of fictitious content and factual errors in the model, and improving the professionalism and reliability of the answer; on the other hand, organizing knowledge with a standardized preset template enables the large language model to understand and utilize domain knowledge more efficiently.
[0047] The above is a specific implementation of an anti-inflammatory diet knowledge question-answering method based on the fusion of triples and a large model provided in this application. It is understood that this application can achieve the standardization and structuring of anti-inflammatory diet knowledge in knowledge representation, reducing information noise and ambiguity caused by unstructured text. At the same time, this application also uses a pre-trained semantic coding model to achieve accurate matching between user input questions and standardized target natural language query sentences, improving the accuracy and efficiency of knowledge retrieval. Then, by constraining the large language model through structured context to generate answers, the uncertainty of the model-generated content can be reduced. While achieving convenient natural language interaction, it ensures the factual accuracy and professionalism of anti-inflammatory diet knowledge question-answering.
[0048] It should be noted that existing knowledge-based retrieval methods typically require users to include accurate professional entity names in their queries (such as "gallstones") in order to retrieve corresponding knowledge through the query statement. However, ordinary users often use everyday descriptions (such as "what should gallstone patients eat"), which are difficult to directly match with professional terms, resulting in the inability to recall relevant knowledge. In addition, the field of anti-inflammatory diets has numerous concepts and complex relationships, making the establishment of comprehensive keyword mapping rules extremely costly. To address this, this application proposes to transform triples into questions that closely resemble users' natural expressions, i.e., target natural language query sentences, and then achieve intent matching through semantic similarity calculation, thereby bridging the semantic gap between everyday language and structured knowledge.
[0049] It should also be noted that simply converting triples into fixed-format statements (such as "Omega-3 fatty acids have anti-inflammatory effects") results in a limited expression and low information density, making it difficult to effectively match diverse user questions. Therefore, this application proposes generating one or more natural language questions for each triple that conform to common user queries, enabling similarity calculation at the "user question - generated question" level. This approach improves the semantic fit between triple knowledge and the user's true intent, thereby enhancing retrieval accuracy and answer relevance.
[0050] Based on this, this application achieves a good balance between knowledge accuracy, retrieval flexibility, and system maintainability by organically combining structured knowledge representation, dynamic semantic mapping, and automated processes. This improves the accuracy, applicability, and maintainability of knowledge Q&A in professional fields such as anti-inflammatory diets, and provides a reliable and efficient technical solution for precise knowledge services in professional fields, especially in health science popularization scenarios.
[0051] In some embodiments, after organizing the triples corresponding to the K target natural language query sentences into a structured context according to a preset template, inputting the structured context and the user input question into a preset large language model, and constructing system instructions to guide the large language model to generate an answer corresponding to the user input question, that is, after the aforementioned S160, the anti-inflammatory diet knowledge question answering method based on the fusion of triples and the large model may further include the following steps: S170. The answer corresponding to the user input question is formatted to bold and emphasize the conclusion, food name, and suggestion parts of the answer to obtain the first text information.
[0052] Understandably, this application formats the answers generated by the large language model that correspond to the user's input question, and bolds and emphasizes the conclusion, food name, and suggestion parts of the answer. This significantly highlights the core content and key information in the answer, allowing users to quickly grasp the key points when reading the answer, improving the readability and information acquisition efficiency of the answer, avoiding the need for users to sift through key content sentence by sentence in the complete text, and optimizing the user experience of looking up knowledge related to anti-inflammatory diets.
[0053] S180. Add a knowledge source section to the end of the first text information to enhance the readability and credibility of the result, and obtain and output the second text information; wherein, the knowledge source section includes the triplet referenced in the answer.
[0054] Understandably, this application adds a section containing the knowledge source of the referenced triples to the end of the first text information after bolding and emphasis. On the one hand, this clearly demonstrates the structured knowledge base on which the answer is based, intuitively reflects the factual basis of the answer content, enhances the authority and credibility of the output results, and reduces users' doubts about the accuracy of the answer. On the other hand, by clearly presenting the knowledge source, it further standardizes the answer output format, improves the completeness and standardization of the overall output content, and the final second text information, while taking into account readability, also strengthens the reliability and persuasiveness of the anti-inflammatory diet knowledge Q&A results.
[0055] In some embodiments, the triple includes a first entity, a relation, and a second entity; the first entity and the second entity are entities in the anti-inflammatory diet domain, and the relation is used to characterize the semantic association between the first entity and the second entity.
[0056] For example, this application can transform unstructured text into triples through rules or information extraction models. For instance, from the nutritional knowledge that "oysters belong to the fish, shrimp, crab, and shellfish category," structured triple information can be extracted, represented in JSON as: {"Entity Type 1": "Food", "Entity 1": "Oyster", "Entity Type 2": "Food Category", "Entity 2": "Fish, Shrimp, Crab, and Shellfish", "Relation": "Belongs to"}. All triples are stored in JSON format, forming a basic knowledge graph.
[0057] In the embodiments of this application, it is understood that this application uses a triple structure containing a first entity, a relation, and a second entity to represent anti-inflammatory diet knowledge. This structured approach clearly depicts domain knowledge in a fixed and concise manner, avoiding the problems of ambiguity and loose logic present in unstructured text. This makes the expression of anti-inflammatory diet knowledge more rigorous, standardized, and unambiguous. Secondly, by limiting the first and second entities to entities within the anti-inflammatory diet domain, this application ensures that knowledge extraction and representation are focused on the target professional domain, effectively filtering out irrelevant domain information. Thirdly, by explicitly representing the semantic relationship between the first and second entities through the relation, this application accurately reflects the inherent logical connections between various knowledge elements in the anti-inflammatory diet domain. This facilitates efficient system parsing, matching, and calling of knowledge, providing a stable and reliable structured foundation for generating target natural language query sentences, constructing vector index libraries, and accurately recalling relevant knowledge. It also provides clear and logically sound contextual support for large language models, improving the accuracy and professionalism of answer generation.
[0058] In some embodiments, the aforementioned input of triples into a preset large language model, combined with structured prompts, generates a target natural language query sentence that meets a preset quality standard for each triple. Specifically, the aforementioned S120 may include the following steps: S210. Generate 1-N natural language query sentences for each triple using a large language model. The natural language query sentences represent the user's request for advice. Here, N is a positive integer greater than 1.
[0059] Understandably, this application generates 1-N natural language query sentences for each triple using a pre-defined large language model to represent the user's question seeking advice. On the one hand, it can expand multi-dimensional and multi-expression query sentences based on a single structured triple, comprehensively covering the user's potential question scenarios regarding the knowledge of that triple, avoiding semantic matching omissions caused by the limitations of a single query sentence, and improving the recall and comprehensiveness of subsequent semantic retrieval. On the other hand, explicitly limiting the query sentences to represent the user's question seeking advice makes the generated query sentences more in line with the questioning habits and needs of real users, providing more realistic retrieval objects for subsequent semantic similarity matching with the user's input question, and strengthening the effectiveness of retrieval matching.
[0060] S220. Sample and check 1-N natural language query sentences to evaluate the accuracy, naturalness and coverage of the natural language query sentences and obtain the evaluation results.
[0061] Understandably, this application samples and evaluates 1-N generated natural language query sentences from three dimensions: accuracy, naturalness, and coverage. This allows for a systematic verification of the quality of the natural language query sentences. Through accuracy evaluation, this application eliminates invalid query sentences that contain factual biases or do not conform to the semantics of the triples, ensuring the consistency between the natural language query sentences and the core knowledge of the triples. Through naturalness evaluation, this application filters out statements that conform to users' everyday expression habits, avoiding awkward or obscure expressions that could negatively impact subsequent semantic matching. Through coverage evaluation, this application verifies whether the query sentences comprehensively cover the core knowledge and potential questioning angles carried by the triples, ensuring the completeness of the retrieval dimensions.
[0062] S230. Based on the evaluation results, iteratively optimize the structured prompt words to generate a target natural language query sentence that meets the preset quality standards.
[0063] It should be noted that the number of triples is enormous. Relying on manual drafting of corresponding questions for each triple would consume significant human resources and make it difficult to guarantee consistent expression quality. Therefore, this application leverages the generative capabilities of a large language model, designing structured prompts to generate questions in batches and automatically from triples, and then performs sampling quality checks and iterative optimization on the results. This method, while ensuring the accuracy and naturalness of the questions, significantly reduces the complexity of knowledge base construction and maintenance, achieving efficient and scalable knowledge representation transformation.
[0064] Specifically, this application iteratively optimizes the structured prompts based on the evaluation results of S220, ultimately generating target natural language query sentences that meet preset quality standards. It continuously improves the quality of generated natural language query sentences through a closed-loop optimization mechanism: addressing issues such as insufficient accuracy, poor naturalness, and incomplete coverage found in the evaluation, it reversely adjusts the constraint rules and guidance logic of the structured prompts, ensuring that the generated results of the large language model continuously converge towards the preset quality standards. This guarantees both the accurate correspondence between the target natural language query sentences and the triplet knowledge, while also considering naturalness and coverage. This provides high-quality, standardized retrieval objects for subsequent construction of a vector index library and semantic similarity matching, fundamentally improving the retrieval accuracy and user experience of the entire knowledge question answering system.
[0065] In some embodiments, the vector index library is an index collection that associates and stores high-dimensional vectors corresponding to target natural language queries with triples and supports similarity retrieval. The aforementioned mapping of each target natural language query to a high-dimensional vector using a pre-trained semantic encoding model satisfies the expression: ; In the formula, For the target natural language query sentence, It is a high-dimensional vector. This is a pre-trained semantic encoding model.
[0066] In the embodiments of this application, it is understood that, on the one hand, by establishing an association storage between the high-dimensional vector and triplet corresponding to the target natural language query sentence, the vector index library can directly locate and recall the corresponding structured knowledge unit while completing efficient similarity retrieval, thereby achieving a close binding between semantic retrieval and structured knowledge, avoiding the disconnect between retrieval results and factual knowledge, and ensuring the accurate correspondence of subsequent recalled knowledge; moreover, the index set supports similarity retrieval and can achieve fast matching by relying on vector numerical operations, ensuring the efficiency of knowledge retrieval.
[0067] On the other hand, this application uses a unified encoding expression to map the target natural language query into a high-dimensional vector and uses a fixed pre-trained semantic encoding model for encoding conversion. This ensures that all query sentences are vectorized in the same semantic space, ensuring the consistency and comparability of vector representations and avoiding deviations in similarity calculation due to inconsistent encoding methods. This ensures the reliability and accuracy of the entire question-answering retrieval process.
[0068] In one example, the aforementioned large language model is ChatGLM. Understandably, this application uses ChatGLM as the large language model, which, relying on its mature Chinese text generation and instruction-following capabilities, can stably meet the processing requirements of generating natural language query sentences based on triples and generating anti-inflammatory diet answers by combining structured context, ensuring the fluency and reliability of the natural language generation process.
[0069] In one example, the aforementioned pre-trained semantic encoding model BAAI / bge-large-zh-v1.5 is used. It is understood that this application employs BAAI / bge-large-zh-v1.5 as a pre-trained semantic encoding model, leveraging its excellent Chinese semantic encoding and similarity matching performance to accurately map the target natural language query and user input question to a unified semantic space, thereby improving the quality of high-dimensional vector representation and the accuracy of subsequent similarity calculations.
[0070] In one example, the knowledge sources for the aforementioned unstructured text include dietary anti-inflammatory food databases, nutrition guidelines, and expert consensus. Understandably, by using dietary anti-inflammatory food databases, nutrition guidelines, and expert consensus as knowledge sources for unstructured text, this application ensures from the outset that the extracted and transformed anti-inflammatory dietary triad knowledge possesses professionalism, authority, and reliability. This provides authentic and standardized domain knowledge support for the entire question-and-answer process, reduces generation bias caused by invalid or non-authoritative knowledge, and further guarantees the professionalism and credibility of the final output answer.
[0071] In some embodiments, the triples corresponding to the K target natural language queries satisfy the expression: ; in, This represents the triples corresponding to the K target natural language queries that were recalled. For the target natural language query sentence, Enter the question for the user. For pre-trained semantic encoding models; Indicates cosine similarity; This means finding the top K most similar target natural language queries among all calculated similarity scores and recalling the triples corresponding to the top K target natural language queries.
[0072] In the embodiments of this application, it is understood that this application uses a unified expression to achieve knowledge retrieval, enabling the retrieval and recall process to have standardized and quantifiable execution logic, ensuring the standardization and reproducibility of the entire retrieval process, and avoiding the uncertainty caused by manual screening or fuzzy matching. Secondly, please refer to... Figure 2This application uses the same pre-trained semantic coding model to process user input questions separately. With the target natural language query sentence Encoding allows for comparison of the two within the same semantic space, ensuring consistency in feature representation and thus improving the reliability and accuracy of similarity calculation. Subsequently, this application employs cosine similarity as the basis for similarity calculation, which can stably and efficiently quantify the semantic relevance between user questions and candidate queries, providing an objective standard for ranking and filtering, and making the search results more closely match the user's true intent.
[0073] Furthermore, this application is approved The operation selects the top K most similar target natural language query sentences and recalls the corresponding triples. It can quickly filter out highly relevant structured knowledge from massive amounts of knowledge, eliminate irrelevant or low-relevant information, and reduce noise interference. While improving retrieval efficiency, it provides a highly focused and factually accurate structured context for subsequent large language models to generate answers, thereby improving the accuracy and professionalism of the final answer.
[0074] In some embodiments, this application provides an anti-inflammatory diet knowledge question-answering system 300 based on the fusion of triples and large models, such as... Figure 4 As shown, the anti-inflammatory diet knowledge question-answering system 300 based on the fusion of triples and large models may include the following modules: The text processing module 310 is used to acquire unstructured text representing knowledge in the field of anti-inflammatory diet, extract information from the unstructured text and perform structuring processing to convert the unstructured text into triples and store them in JSON format. The query sentence generation module 320 is used to input triples into a preset large language model, combine them with structured prompt words, and generate a target natural language query sentence that meets the preset quality standards for each triple. The mapping and association module 330 is used to map each target natural language query sentence into a high-dimensional vector through a pre-trained semantic coding model, and associate the high-dimensional vector with triples to obtain a vector index library; The similarity matching module 340 is used to obtain the user input question, transform the user input question into a query vector through a pre-trained semantic encoding model, perform similarity matching between the query vector and the high-dimensional vector in the vector index library, and sort them from high to low based on the similarity score to obtain a similarity sequence. The triplet recall module 350 is used to determine the K target natural language query sentences corresponding to the top K similarity scores in the similarity sequence based on the mapping relationship between the high-dimensional vector and the target natural language query sentence, and recall the triplets corresponding to the K target natural language query sentences. The answer generation module 360 is used to organize the triples corresponding to K target natural language query sentences into a structured context according to a preset template. The structured context and the user input question are input into a preset large language model, and the system instructions guide the large language model to generate the answer corresponding to the user input question.
[0075] According to embodiments of this application, any and multiple modules among the text processing module 310, query sentence generation module 320, mapping association module 330, similarity matching module 340, triplet recall module 350, and answer generation module 360 can be merged into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module.
[0076] Figure 4 Each module in the system shown has the function of implementing each step in the aforementioned anti-inflammatory diet knowledge question-answering method based on the fusion of triples and large models, and can achieve its corresponding technical effect. For the sake of brevity, it will not be elaborated here.
[0077] In some embodiments, this application provides an electronic device, the structural schematic of which is shown below. Figure 5 As shown.
[0078] The electronic device may include a processor 410 and a memory 420 storing computer program instructions.
[0079] Specifically, the processor 410 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0080] Memory 420 may include mass storage for data or instructions. For example, and not limitingly, memory 420 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 420 may include removable or non-removable (or fixed) media. Where appropriate, memory 420 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 420 is non-volatile solid-state memory.
[0081] Memory 420 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, typically, memory 420 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it can perform the operations described in any of the above embodiments of the anti-inflammatory diet knowledge question-answering method based on triplet and large model fusion.
[0082] The processor 410 reads and executes computer program instructions stored in the memory 420 to implement any of the anti-inflammatory diet knowledge question-and-answer methods based on the fusion of triples and large models in the above embodiments.
[0083] In one example, the electronic device may also include a communication interface 430 and a bus 400. For example, Figure 5 As shown, the processor 410, memory 420, and communication interface 430 are connected via bus 400 and communicate with each other.
[0084] The communication interface 430 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application. Bus 400 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 400 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0085] Furthermore, in conjunction with the anti-inflammatory diet knowledge question-answering method based on the fusion of triples and large models in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the anti-inflammatory diet knowledge question-answering methods based on the fusion of triples and large models in the above embodiments.
[0086] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0087] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0088] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0089] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in 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, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0090] In summary, compared with the prior art, this application has the following beneficial effects: 1. This application transforms knowledge in the field of anti-inflammatory diets into structured triples, which can accurately represent the complex relationships between entities. This application uses triples as knowledge atoms, which not only makes the knowledge itself easier to maintain and expand, but also provides the model with discrete fact units that can be directly used for reasoning, thereby significantly improving the accuracy and interpretability of knowledge representation.
[0091] 2. This application employs a dynamic mapping and semantic retrieval mechanism of "triples-target natural language query sentences" to bridge the semantic gap between users' natural questions and structured knowledge. This application generates target natural language query sentences that fit everyday expressions and meet preset quality standards for each triple using a large language model, enabling similarity calculation at the "user question-generated question" level. This method is more closely aligned with real-world question-and-answer scenarios, ensuring that the recalled knowledge highly matches user intent, thus providing the large language model with more accurate and concise contextual evidence and suppressing the generation of "illusions" from the source.
[0092] 3. This application realizes a fully automated, batch generation process from structured knowledge to searchable questions, reducing the complexity and cost of system construction and maintenance. This application drives a large language model to automatically complete the transformation and quality optimization of massive triples into questions, achieving efficient construction and sustainable iteration of the knowledge base while ensuring semantic accuracy and natural expression.
[0093] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A question-and-answer method for anti-inflammatory diet knowledge based on the fusion of triples and large models, characterized in that, include: Unstructured text representing knowledge in the field of anti-inflammatory diet is obtained, and information is extracted and structured from the unstructured text to convert it into triples and store it in JSON format. The triples are input into a preset large language model, and combined with structured prompt words, a target natural language query sentence that meets the preset quality standards is generated for each triple. Each target natural language query sentence is mapped to a high-dimensional vector by a pre-trained semantic coding model, and the high-dimensional vector is associated with the triple to obtain a vector index library; The user input question is obtained, and the user input question is transformed into a query vector through the pre-trained semantic encoding model. The query vector is matched with high-dimensional vectors in the vector index library for similarity, and sorted from high to low based on the similarity score to obtain a similarity sequence. Based on the mapping relationship between the high-dimensional vector and the target natural language query, determine the K target natural language query corresponding to the top K similarity scores in the similarity sequence, and recall the triples corresponding to the K target natural language query; The triples corresponding to the K target natural language query sentences are organized into a structured context according to a preset template. The structured context and the user input question are input into a preset large language model. System instructions are then used to guide the large language model to generate an answer corresponding to the user input question.
2. The anti-inflammatory diet knowledge question-answering method based on the fusion of triples and large models as described in claim 1, characterized in that, After organizing the triples corresponding to the K target natural language query sentences into a structured context according to a preset template, inputting the structured context and the user input question into a preset large language model, and constructing system instructions to guide the large language model to generate an answer corresponding to the user input question, the anti-inflammatory diet knowledge question answering method based on the fusion of triples and the large model further includes: The answer corresponding to the user input question is formatted to bold and emphasize the conclusion, food name, and suggestion parts of the answer to obtain the first text information; A knowledge source section is added to the end of the first text information to enhance the readability and credibility of the result, and the second text information is obtained and output; wherein, the knowledge source section includes the triplet referenced in the answer.
3. The anti-inflammatory diet knowledge question-answering method based on the fusion of triples and large models as described in claim 1, characterized in that, The triple includes a first entity, a relation, and a second entity; the first entity and the second entity are entities in the anti-inflammatory diet domain, and the relation is used to characterize the semantic association between the first entity and the second entity.
4. The anti-inflammatory diet knowledge question-answering method based on the fusion of triples and large models as described in claim 1, characterized in that, The process of inputting the triples into a preset large language model, combining them with structured prompts, and generating a target natural language query sentence that meets preset quality standards for each triple includes: One to N natural language query sentences are generated for each triple using a large language model. These natural language query sentences are used to represent the user's request for advice. The 1-N natural language query sentences are sampled and checked to evaluate their accuracy, naturalness, and coverage, and the evaluation results are obtained. Based on the evaluation results, the structured prompt words are iteratively optimized to generate target natural language query sentences that meet preset quality standards.
5. The anti-inflammatory diet knowledge question-answering method based on triplet and large model fusion as described in any one of claims 1-4, characterized in that, The pre-trained semantic encoding model maps each target natural language query into a high-dimensional vector, satisfying the expression: ; In the formula, The target natural language query sentence, For the high-dimensional vector, The pre-trained semantic encoding model; The vector index library is a collection of indexes that associates and stores high-dimensional vectors and triples corresponding to target natural language queries and supports similarity retrieval.
6. The anti-inflammatory diet knowledge question-answering method based on the fusion of triples and large models as described in claim 5, characterized in that, The large language model is ChatGLM; the pre-trained semantic encoding model is BAAI / bge-large-zh-v1.5; the knowledge sources for the unstructured text include a dietary anti-inflammatory food database, nutrition guidelines, and expert consensus.
7. The anti-inflammatory diet knowledge question-answering method based on triplet and large model fusion as described in any one of claims 1-4, characterized in that, The triples corresponding to the K target natural language queries satisfy the expression: ; in, This represents the triples corresponding to the K target natural language queries that were recalled. For the target natural language query sentence, Enter the question for the user. For pre-trained semantic encoding models; Indicates cosine similarity; This means finding the top K most similar target natural language queries among all calculated similarity scores and recalling the triples corresponding to the top K target natural language queries.
8. A question-and-answer system for anti-inflammatory diet knowledge based on the fusion of triples and large models, characterized in that, include: The text processing module is used to acquire unstructured text representing knowledge in the field of anti-inflammatory diets, extract information from the unstructured text and perform structuring processing to convert the unstructured text into triples and store them in JSON format. The query sentence generation module is used to input the triples into a preset large language model, combine them with structured prompt words, and generate a target natural language query sentence that meets the preset quality standards for each triple. The mapping and association module is used to map each target natural language query sentence into a high-dimensional vector through a pre-trained semantic coding model, and associate the high-dimensional vector with the triple to obtain a vector index library; The similarity matching module is used to obtain the user input question, transform the user input question into a query vector through the pre-trained semantic encoding model, perform similarity matching between the query vector and high-dimensional vectors in the vector index library, and sort them from high to low based on the similarity score to obtain a similarity sequence. The triplet recall module is used to determine the K target natural language query sentences corresponding to the top K similarity scores in the similarity sequence based on the mapping relationship between the high-dimensional vector and the target natural language query sentence, and recall the triplets corresponding to the K target natural language query sentences. The answer generation module is used to organize the triples corresponding to the K target natural language query sentences into a structured context according to a preset template, input the structured context and the user input question into a preset large language model, and construct system instructions to guide the large language model to generate an answer corresponding to the user input question.
9. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the anti-inflammatory diet knowledge question-and-answer method based on triplet and large model fusion as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program or instructions that, when executed by a processor, implement the anti-inflammatory diet knowledge question-and-answer method based on triplet and large model fusion as described in any one of claims 1 to 7.