Method and system for enhancing ability of large language model to answer questions of specific field

By constructing the knowledge graph in the field of GPCRs and combining the query capabilities of large language models, the problem of large language models providing incorrect or insufficient domain knowledge in the field of GPCRs is solved, and the accuracy of large language models in the field of G protein coupled receptors is achieved. Q&A ability.

WO2025030425A1PCT designated stage expired Publication Date: 2025-02-13ALPHAMOL SCIENCE LTD (SHANGHAI)

Patent Information

Application Number
PCT/CN2023/111963
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-08-09
Publication Date
2025-02-13

AI Technical Summary

Technical Problem

Existing large language models often provide incorrect or insufficient domain knowledge when answering questions related to GPCRs.

Method used

By using a large language model to extract relational triplets from the dataset, a knowledge graph of G protein coupled receptors is constructed and stored in the graph database. The pre-trained large language model is used to search for information related to specific fields in the graph database. Get prompt information, thereby enhancing the Q&A ability of large language models in the field of G protein coupled receptors.

Benefits of technology

By constructing a high-quality GPCRs domain knowledge graph, the knowledge graph gives large language models accurate and real-time GPCRs domain knowledge, enhancing their ability to answer questions in the G protein-coupled receptor field, and overcoming the large language model's generation of incorrect answers in the GPCRs field. shortcoming.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023111963_13022025_PF_FP_ABST
    Figure CN2023111963_13022025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of drug screening, and in particular to a method and system for enhancing the ability of a large language model to answer questions of a specific field. The method comprises the following steps: using a large language model to extract a relation triple from a data set, wherein the data set comprises structured data and unstructured data; on the basis of the relation triple, constructing a knowledge graph of G protein coupled receptors (GPCRs), and storing the knowledge graph in a form of a graph database, wherein the knowledge graph comprises a GPCR entity and a relation thereof; using a pre-trained large language model to search the graph database for related information of a specific field to obtain prompt information, wherein the specific field is the field of GPCRs; and on the basis of the prompt information and the pre-trained large language model, obtaining an answer result, wherein the answer result is returned to a user by the pre-trained large language model. In the present application, by constructing a knowledge graph, the large language model is endowed with accurate and real-time field knowledge of GPCRs, and the ability of the large language model to answer questions of the field of GPCRs is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

A method and system for enhancing the ability of large language models to answer questions in specific fields Technical Field

[0001] The present application relates to the field of drug screening technology, and in particular to a method and system for enhancing the ability of a large language model to answer questions in a specific field. Background Art

[0002] The G protein-coupled receptor (GPCR) superfamily is one of the most important protein families in humans and other organisms, encompassing over 800 seven-transmembrane (7TM) proteins. The primary function of GPCRs is to detect signaling molecules (such as serotonin and acetylcholine) and activate intracellular responses through conformational changes, further transmitting signals from the extracellular to the intracellular compartment. Due to their crucial functions, GPCRs have become one of the most popular drug targets, with approximately 40% of marketed drugs targeting these receptors. However, the complex signaling networks formed by GPCRs make the design of drugs targeting GPCRs challenging. The extracellular and transmembrane domains of GPCRs can bind a variety of signaling molecules to sense changes in the external environment. Their downstream partners, such as G proteins and G protein-coupled receptor kinases (GRKs), bind to the intracellular domains of GPCRs. Based on the sequence of their Gα subunits, G proteins can be further classified into four categories: Gs, Gi / o, Gq / 11, and G12 / 13. Therefore, elucidating the signaling networks of GPCRs will help understand their functions and facilitate drug discovery.

[0003] In recent years, large language models (LLMs), also known as pre-trained language models (PLMs), have achieved significant breakthroughs in natural language processing. Models such as BERT, GPT-3, and ChatGPT have significantly advanced NLP capabilities. However, LLMs also have limitations, including generating biased or misleading content, raising concerns about their use in various applications. Furthermore, large language models like ChatGPT often provide incorrect or insufficient domain knowledge when answering questions related to GPCRs.

[0004] Summary of the Invention

[0005] To address the deficiencies in the existing technology, this application aims to provide a method and system for enhancing the ability of large language models to answer questions in specific fields. This application leverages the ability of knowledge graphs to accurately query information, using the information retrieved by users in the knowledge graph as prompts to enhance the large language model's ability to answer questions in the field of G protein-coupled receptors.

[0006] To achieve the above objectives, the technical solutions adopted in this application are:

[0007] In the first aspect, the present application provides a method for enhancing the ability of a large language model to answer questions in a specific field, comprising the following steps: first, using a large language model, extracting relation triplets from a data set; the data set includes structured data and unstructured data; then, based on the relation triplets, constructing a knowledge graph of G protein coupled receptors, and storing the knowledge graph in the form of a graph database; the knowledge graph includes G protein coupled receptor entities and their relationships with G protein coupled receptor entities; next, using a pre-trained large language model, searching for relevant information in a specific field in the graph database to obtain prompt information; the specific field is the G protein coupled receptor field; finally, based on the prompt information and the pre-trained large language model, obtaining an answer result; the answer result is returned to the user by the pre-trained large language model.

[0008] In some exemplary embodiments, a large language model is used to extract relation triplets from a data set, including: using a large language model to extract structured relation triplets from the unstructured data of the data set, and converting the information related to G protein coupled receptors stored in the structured data of the data set into relation triplets; wherein the unstructured data and the structured data are obtained by extracting data from unstructured text and structured databases, respectively; unstructured text includes paragraphs in journals, patents, web pages, books, and text information in pictures; structured databases include G protein coupled receptor-specific databases and non-G protein coupled receptor-specific databases; wherein the G protein coupled receptor-specific database is a database specially constructed for storing G protein coupled receptor information; the non-G protein coupled receptor-specific database is a database not constructed for storing G protein coupled receptor information.

[0009] In some exemplary embodiments, the structured data includes: UniProt code, ChEMBL code, receptor name, classification information, downstream messenger, related diseases, endogenous ligands and marketed drugs; the relationship triples include the properties of G protein-coupled receptors in terms of function, signaling pathway, ligand, disease and attributes.

[0010] In some exemplary embodiments, the large language model and the pre-trained large language model are both language models that have been designed and trained and are fully aligned with human feedback; the large language model is the same as the pre-trained large language model, or the large language model is different from the pre-trained large language model; the large language model is one or more of an open source large language model and a non-open source large language model.

[0011] In some exemplary embodiments, the knowledge graph is stored in the form of a graph database using NEO4J software.

[0012] In some exemplary embodiments, the large language model and the pre-trained large language model both use a generative pre-trained transformer ChatGPT.

[0013] In some exemplary embodiments, a pre-trained large language model is used to directly query the graph database for relevant information in a specific field through the Cypher language to obtain prompt information; or Python or Java programming languages ​​are used to interact with the graph database; the prompt information is the information returned by the knowledge graph based on the search content.

[0014] On the second aspect, the present application also provides a system for enhancing the ability of a large language model to ask and answer questions in specific fields, including a data acquisition module, a knowledge graph construction module and an interaction module connected in sequence; the data acquisition module is used to use a large language model to extract relationship triplets from a data set; the data set includes structured data and unstructured data; the knowledge graph construction module is used to construct a knowledge graph of G protein coupled receptors based on the relationship triplets, and store the knowledge graph in the form of a graph database; the knowledge graph includes G protein coupled receptor entities and their relationships with G protein coupled receptor entities; the interaction module is used to use a pre-trained large language model to search for relevant information in a specific field in the graph database to obtain prompt information; the specific field is the G protein coupled receptor field; and based on the prompt information and the pre-trained large language model, an answer result is obtained; the answer result is returned to the user by the pre-trained large language model.

[0015] In some exemplary embodiments, the data acquisition module includes a relation triple extraction unit and a relation triple conversion unit; wherein the relation triple extraction unit is used to extract structured relation triples from the unstructured data of the data set using a large language model; the relation triple conversion unit is used to convert the information related to G protein coupled receptors stored in the structured data of the data set into relation triples using a large language model; wherein the unstructured data and the structured data are obtained by extracting data from unstructured text and structured databases respectively; unstructured text includes paragraphs in journals, patents, web pages, books, and text information in pictures; structured databases include G protein coupled receptor-specific databases and non-G protein coupled receptor-specific databases; wherein the G protein coupled receptor-specific database is a database specially constructed for storing G protein coupled receptor information; the non-G protein coupled receptor-specific database is a database not constructed for storing G protein coupled receptor information.

[0016] In some exemplary embodiments, a large language model is used to extract data from a structured database to obtain structured data; the structured data includes: UniProt code, ChEMBL code, receptor name, classification information, downstream messenger, related diseases, endogenous ligands and marketed drugs.

[0017] The above technical solution has the following advantages or beneficial effects:

[0018] The present application provides a method and system for enhancing the ability of a large language model to answer questions in a specific field. The method includes the following steps: first, using a large language model to extract relation triplets from a data set; the data set includes structured data and unstructured data; then, based on the relation triplets, a knowledge graph of G protein coupled receptors is constructed, and the knowledge graph is stored in the form of a graph database; the knowledge graph includes G protein coupled receptor entities and their relationships with G protein coupled receptor entities; next, using a pre-trained large language model, the graph database is searched for relevant information related to a specific field to obtain prompt information; the specific field is the G protein coupled receptor field; finally, based on the prompt information and the pre-trained large language model, an answer result is obtained; the answer result is returned to the user by the pre-trained large language model.

[0019] This application addresses the technical problem that "existing large language models often provide incorrect or insufficient domain knowledge when answering questions related to GPCRs" and provides a method and system for enhancing the ability of large language models to answer questions in specific fields. The method first uses a large language model to extract structured relationship triplets from unstructured data, and converts the relevant information of GPCRs stored in the structured data into relationship triplets, and combines the two to construct a knowledge graph, and then stores the constructed knowledge graph in a graph database. In a production environment, questions raised by users are used to search for relevant knowledge in the knowledge graph, and this knowledge is used as prompt statements to enhance the ability of large language models to answer questions in the field of G protein-coupled receptors. This application fully utilizes the ability of knowledge graphs to store and query accurate information, the advantages of large language models in text summarization and reasoning, and the characteristics of large language models that are fully aligned with humans to generate accurate answers that can be understood and read by humans. This application constructs a high-quality GPCRs field knowledge graph. The knowledge graph gives the large language model accurate and real-time GPCRs field knowledge, enhances its ability to answer questions in the G protein-coupled receptor field and produce accurate responses in professional fields, overcomes the shortcomings of the large language model in generating incorrect answers in the GPCRs field, and helps users quickly understand specific GPCRs. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] FIG1 is a flow chart of a method for enhancing the ability of a large language model to answer questions in a specific domain, provided by an embodiment of the present application;

[0021] FIG2 is a flowchart of a method for enhancing the ability of a large language model to answer questions in a specific domain, provided by an embodiment of the present application;

[0022] FIG3 is a schematic diagram of the structure of a system for enhancing the ability of a large language model to answer questions in specific fields, provided by an embodiment of the present application;

[0023] FIG4 is a diagram comparing the advantages and disadvantages of a large language model and a knowledge graph technology provided in one embodiment of the present application;

[0024] FIG5 is a schematic diagram comparing the results of ChatGPT provided in one embodiment of the present application and the present application;

[0025] FIG6 is a schematic diagram of the data flow and front-end interface of a program provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] As can be seen from the background technology, existing large-scale language models (such as LLMs, PLMs, and ChatGPT) have some problems, including generating biased or misleading content, raising concerns about their use in various applications, and technical issues such as often providing incorrect or insufficient domain knowledge when answering questions related to GPCRs.

[0027] Knowledge graphs (KGs) provide a structured representation of real-world entities and their relationships through graph databases. KG technology has been applied in various fields, including social networks and search engines. Extracting knowledge from unstructured data to build KGs is defined as the task of relation triple extraction, which involves identifying subjects, objects, and their relationships from natural language or images. GPT models have been used for this purpose, leveraging hinting and fine-tuning to improve performance.

[0028] In this context, knowledge graphs focused on GPCRs will be of great value. To construct a knowledge graph for GPCRs, this application extracts data through multiple channels: (1) extracting knowledge directly from large language models (LLMs); (2) using LLMs to collect information from articles; and (3) obtaining structured data from existing GPCRs-specific / non-specific databases. The final knowledge graph will contain comprehensive information about GPCRs in human knowledge databases, and use this information to enhance the ability of these large language models to answer GPCR-related questions. Overall, using knowledge graphs to enhance the question-answering capabilities of large language models in the field of GPCRs has significant potential in advancing drug discovery and research in this important field of biology, providing valuable insights for this application and helping to develop new treatments and drugs.

[0029] Therefore, in order to address the deficiencies in the prior art, an embodiment of the present application provides a method for enhancing the ability of a large language model to answer questions in a specific field, comprising the following steps: first, using a large language model to extract relation triplets from a data set; the data set includes structured data and unstructured data; then, based on the relation triplets, a knowledge graph of G protein coupled receptors is constructed, and the knowledge graph is stored in the form of a graph database; the knowledge graph includes G protein coupled receptor entities and their relationships with G protein coupled receptor entities; next, using a pre-trained large language model, information related to a specific field is searched in the graph database to obtain prompt information; the specific field is the field of G protein coupled receptors; finally, based on the prompt information and the pre-trained large language model, an answer result is obtained; the answer result is returned to the user by the pre-trained large language model. This application utilizes the ability of the knowledge graph to accurately query information, and uses the information queried by the user in the knowledge graph as a prompt statement to enhance the large language model's question-answering ability in the field of G protein coupled receptors.

[0030] The following detailed description of the various embodiments of the present application is provided in conjunction with the accompanying drawings. However, those skilled in the art will appreciate that many technical details are provided in the various embodiments of the present application to facilitate a better understanding of the present application. However, even without these technical details and the various variations and modifications based on the following embodiments, the technical solutions claimed in the present application can still be implemented.

[0031] The following embodiments are only some of the embodiments of the present application, rather than all of the embodiments. Therefore, the detailed description of the embodiments of the present application provided below is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.

[0032] In this application, unless otherwise specified, all equipment and raw materials are commercially available or commonly used in the industry. The methods in the following examples are all conventional methods in the art unless otherwise specified.

[0033] Referring to FIG1 , this application provides a method for enhancing the ability of a large language model to answer questions in a specific domain, including the following steps:

[0034] Step S1: Using a large language model, extract relation triples from a data set; the data set includes structured data and unstructured data.

[0035] Step S2: Based on the relationship triples, construct a knowledge graph of G protein coupled receptors, and store the knowledge graph in the form of a graph database; the knowledge graph includes G protein coupled receptor entities and their relationships with G protein coupled receptor entities.

[0036] Step S3: Use the pre-trained large language model to search for information related to a specific field in the graph database to obtain prompt information; the specific field is the G protein-coupled receptor field.

[0037] Step S4: Based on the prompt information and the pre-trained large language model, an answer result is obtained; the answer result is returned to the user by the pre-trained large language model.

[0038] Figure 2 shows a flowchart of a method for enhancing the ability of a large language model to answer questions in specific fields, provided by an embodiment of the present application. As shown in Figure 2, the method first extracts relationship triples from a data set (structured data and unstructured data); then, based on the relationship triples, a knowledge graph of G protein-coupled receptors is constructed, and the knowledge graph is stored in the form of a graph database; the knowledge graph is a knowledge graph containing information related to G protein-coupled receptors; next, a pre-trained large language model is used to search for information related to a specific field in the graph database to obtain prompt information; finally, based on the prompt information and the pre-trained large language model, an answer result is obtained; the answer result is returned to the user by the pre-trained large language model.

[0039] Specifically, the method can be implemented by the following steps:

[0040] (1) Select or train a suitable large language model from scratch.

[0041] Preferably, ChatGPT or GPT4 is selected as the benchmark large language model.

[0042] (2) Use large language models to automatically extract relational triples from large amounts of structured data (such as GPCRs-related literature).

[0043] Preferably, GPCRs-related literature refers to publicly published journals and patents.

[0044] (3) Obtain additional information from the structured database and convert it into relation triple format.

[0045] Here, the structured database may be a GPCRs-specific database or a non-GPCRs-specific database.

[0046] (4) Summarize the relationship triplets in steps (2) and (3) to construct a knowledge graph.

[0047] (5) Use Neo4j to organize the knowledge graph into a relational database.

[0048] (6) The pre-trained large language model uses knowledge graph information to return more accurate answers to users.

[0049] Preferably, the pre-trained large language model will respond to the user's query based on the information retrieved from the knowledge graph. The G protein-coupled receptor-related information returned by the knowledge graph is used as a prompt to interact with the pre-trained large language model.

[0050] Here, it should be noted that the pre-trained large language model in step (6) can be the same as or different from the large language model in step (1).

[0051] (7) For questions for which no information is found in the knowledge graph, the pre-trained large language model will answer the user’s questions based on its own knowledge.

[0052] It should be noted that the answers obtained by users are ultimately given by the pre-trained large language model.

[0053] (8) Develop websites, applications, or APIs that can be used by users to interact with knowledge graphs.

[0054] In some embodiments, step S1 uses a large language model to extract relation triplets from a data set, including: using a large language model to extract structured relation triplets from unstructured data in the data set, and converting information related to G protein coupled receptors stored in the structured data of the data set into relation triplets; wherein the unstructured data and the structured data are obtained by extracting data from unstructured text and structured databases, respectively; unstructured text includes paragraphs in journals, patents, web pages, books, and text information in pictures; structured databases include G protein coupled receptor-specific databases and non-G protein coupled receptor-specific databases; wherein the G protein coupled receptor-specific database is a database specially constructed for storing G protein coupled receptor information; the non-G protein coupled receptor-specific database is a database not constructed for storing G protein coupled receptor information.

[0055] In some embodiments, structured data includes: UniProt code, ChEMBL code, receptor name, classification information, downstream messengers, related diseases, endogenous ligands, and marketed drugs; relationship triples include GPCR properties in terms of function, signaling pathway, ligand, disease, and attributes. It should be noted that here, related diseases are diseases related to the field of GPCRs.

[0056] In some embodiments, the large language model and the pre-trained large language model are both language models that have been designed and trained and are fully aligned with human feedback; the large language model is the same as the pre-trained large language model, or the large language model is different from the pre-trained large language model.

[0057] The large language model can be one or more of an open source large language model and a non-open source large language model. A non-open source large language model is a large language model that is not open source but available to academic or commercial users. In other words, large language models and pre-trained large language models can be open source or non-open source large language models that are available to academic or commercial users. Furthermore, the large language model used to extract relation triples from text can be the same as or different from the pre-trained large language model ultimately used to answer user questions.

[0058] Preferably, the open source large language model can be the LLaMA 2 model released by the American Meta company, whose Chinese translation is Large Language Model Meta Artificial Intelligence 2; the non-open source large language model can be the GPT4 model developed by the American OPENAI company, whose Chinese translation is Generative Pre-trained Converter 4.

[0059] In some embodiments, the knowledge graph is stored in the form of a graph database using NEO4J software. Specifically, the knowledge graph can also be stored in one or more of N-Triples, Turtle, RDF, and XML.

[0060] In some embodiments, the large language model and the pre-trained large language model both use the generative pre-trained transformer ChatGPT.

[0061] In some embodiments, a pre-trained large language model is used to directly query the graph database for domain-specific information using the Cypher language to obtain prompt information; or Python or Java programming languages ​​are used to interact with the graph database; the prompt information is the information returned by the knowledge graph based on the search content. Preferably, Python is used to query information in the knowledge graph using the py2neo module.

[0062] Referring to Figure 3, the present application also provides a system for enhancing the ability of a large language model to answer questions in specific fields, including a data acquisition module 101, a knowledge graph construction module 102 and an interaction module 103 connected in sequence; the data acquisition module 101 is used to use a large language model to extract relationship triples from a data set; the data set includes structured data and unstructured data; the knowledge graph construction module 102 is used to construct a knowledge graph of G protein coupled receptors based on the relationship triples, and store the knowledge graph in the form of a graph database; the knowledge graph includes G protein coupled receptor entities and their relationships with G protein coupled receptor entities; the interaction module 103 is used to use a pre-trained large language model to search for relevant information in a specific field in the graph database to obtain prompt information; the specific field is the G protein coupled receptor field; and based on the prompt information and the pre-trained large language model, an answer result is obtained; the answer result is returned to the user by the pre-trained large language model.

[0063] In some embodiments, the data acquisition module 101 includes a relation triple extraction unit and a relation triple conversion unit; wherein the relation triple extraction unit is used to extract structured relation triples from the unstructured data of the data set using a large language model; the relation triple conversion unit is used to convert the information related to G protein coupled receptors stored in the structured data of the data set into relation triples using a large language model; wherein the unstructured data and the structured data are obtained by extracting data from unstructured text and structured databases respectively; unstructured text includes paragraphs in journals, patents, web pages, books, and text information in pictures; structured databases include G protein coupled receptor-specific databases and non-G protein coupled receptor-specific databases; wherein the G protein coupled receptor-specific database is a database specially constructed for storing G protein coupled receptor information; the non-G protein coupled receptor-specific database is a database not constructed for storing G protein coupled receptor information.

[0064] In some embodiments, a large language model is used to extract data from a structured database to obtain structured data; the structured data includes: UniProt code, ChEMBL code, receptor name, classification information, downstream messenger, related diseases, endogenous ligands and marketed drugs.

[0065] Figure 4 shows a comparison of the advantages and disadvantages of the large language model and knowledge graph technology provided in one embodiment of the present application. Based on this, the present invention utilizes the ability of the knowledge graph to accurately query information, uses the information retrieved by the user in the knowledge graph as a prompt statement, and enhances the question-answering ability of the large language model in the field of G protein-coupled receptors.

[0066] This application provides a method for enhancing the ability of large language models to answer questions in specific areas. This method extracts information from scientific literature to construct a high-quality, comprehensive knowledge graph in the field of GPCRs. The data comes from both structured databases and unstructured text. Furthermore, this application leverages the knowledge graph to enable large language models to produce accurate responses in specialized fields, employing the knowledge graph to improve the accuracy of large language models in answering questions related to GPCRs. This method overcomes the shortcomings of large language models in generating incorrect answers in the field of GPCRs, helping users quickly understand specific GPCRs. Specifically, this application uses the generative pre-trained transformer ChatGPT to extract relation triplets from 37,000 GPCR-related abstracts in the PubMed database. Furthermore, GPCR-related information stored in structured databases can also be converted into relation triplets and used to construct the knowledge graph. Through this process, this application obtained over 32,000 relation triplets, detailing the properties of G protein-coupled receptors in terms of function, signaling pathways, ligands, diseases, and other related attributes. In summary, the present invention proposes an effective strategy in which the knowledge graph endows the ChatGPT model with accurate and real-time GPCRs domain knowledge, enhancing its ability to answer questions in the field of G protein-coupled receptors (GPCRs).

[0067] The following describes in detail the method and system for enhancing the ability of a large language model to answer questions in specific fields provided by this application through specific embodiments.

[0068] Example 1

[0069] This example actually constructs a knowledge graph that can be used to enhance the ability of a large language model to answer questions in the field of G protein-coupled receptors, thereby detailing the method provided in this application to enhance the ability of a large language model to answer questions in a specific field. The detailed steps are as follows:

[0070] (1) ChatGPT is selected as the large language model for answering questions and extracting relation triples from the dataset.

[0071] (2) Use the ChatGPT model selected in step (1) to automatically extract relation triplets from a large number of GPCRs-related literature.

[0072] In this test case, 371 common G protein-coupled receptors were selected for a journal database search. Ultimately, 37,000 scientific articles were downloaded, and 113,619 relationship triplets were extracted. After subsequent processing and filtering, 113,619 valid relationship triplets were retained.

[0073] (3) Structured databases are also used to extract knowledge related to GPCRs. This is because some coding information may not be easily mentioned in scientific literature abstracts, such as protein UniProt codes. In addition, these databases store data in a specific structure in which entities and relationships are clearly defined, so that they can be easily converted into the format of relational triples. This application collected eight types of knowledge from the GPCR database, including UniProt codes, ChEMBL codes, receptor names, classification information, downstream messengers, related diseases, endogenous ligands, and marketed drugs. This information was also used to construct the GPCR knowledge graph.

[0074] (4) Summarize the relationship triplets in steps (2) and (3) to construct a knowledge graph.

[0075] (5) Import the relationship graph into the graph database and store it.

[0076] (6) In the production stage, the ChatGPT model uses the information in the knowledge graph to return more accurate answers to users.

[0077] (7) For questions for which no information is found in the knowledge graph, the large language model will answer the user’s questions based on its own knowledge.

[0078] Figure 5 shows a schematic diagram comparing the results of ChatGPT and the present application, wherein A and B are the results of the existing ChatGPT and the present application, respectively. It can be seen from Figure 5 that the method provided by the present application, by constructing a comprehensive knowledge graph of GPCRs, can endow the ChatGPT model with accurate and real-time GPCRs domain knowledge, thereby enhancing ChatGPT's ability to answer questions in the field of G protein-coupled receptors.

[0079] (8) In order to demonstrate the effectiveness of this application, this application constructs a web program that can be used to interact with the knowledge graph and ChatGPT model. Figure 6 shows the data flow and front-end interface diagram of the program.

[0080] When receiving a user's question, the program first extracts key entities from the question by keyword matching. Then, it locates relevant knowledge in the Graph database and feeds it back to the user. To ensure that the application of this application can understand the names of GPCRs provided by the user, this application collected 4007 names of 371 GPCRs from scientific literature and databases. For questions that the system cannot solve, it forwards the question to the ChatGPT model and provides the user with a response in the ChatGPT model. The program of this application follows a classic client-server architecture, where the client provides the user interface and the server handles data processing. The server side is further subdivided into application components and graph database components. The front end of the website is built using HTML, CSS and JavaScript, providing a visually attractive and interactive user interface. On the other hand, the back end of the website is implemented in Python, specifically utilizing the Flask website framework, which communicates with the neo4j database to obtain application data. The web application supports two types of queries: (1) users can directly enter the name of the protein to retrieve relevant information. (2) query the property information of the corresponding GPCR. This allows users to query a specific GPCR and its related G protein, or explore which G proteins are compatible with a specific GPPR. However, it is important to acknowledge certain limitations on this application's website, particularly the limited coverage of receptor-related properties, such as disease and tissue distribution. This limitation may present challenges for users seeking to query these specific properties of proteins. Therefore, this application recommends that users seeking information related to such properties first consult the standard nomenclature for diseases, tissue distribution, classification, and other relevant characteristics provided on this application's website to better understand possible corresponding names. Users can then proceed with their query using the application.

[0081] Based on the above technical solution, the present application provides a method and system for enhancing the ability of a large language model to answer questions in a specific field. The method includes the following steps: first, using a large language model, extracting relationship triples from a data set; the data set includes structured data and unstructured data; the relationship triples are structured relationship triples; then, based on the relationship triples, constructing a knowledge graph of G protein coupled receptors, and storing the knowledge graph in the form of a graph database; the knowledge graph includes G protein coupled receptor entities and their relationships with G protein coupled receptor entities; next, using a pre-trained large language model, searching for relevant information in a specific field in the graph database to obtain prompt information; the specific field is the G protein coupled receptor field; finally, based on the prompt information and the pre-trained large language model, obtaining an answer result; the answer result is returned to the user by the pre-trained large language model.

[0082] This application addresses the technical problem that "existing large language models often provide incorrect or insufficient domain knowledge when answering questions related to GPCRs" and provides a method and system for enhancing the ability of large language models to answer questions in specific fields. The method first uses a large language model to extract structured relationship triplets from unstructured data, and converts the relevant information of GPCRs stored in the structured data into relationship triplets, and combines the two to construct a knowledge graph, and then stores the constructed knowledge graph in a graph database. In a production environment, questions raised by users are used to search for relevant knowledge in the knowledge graph, and this knowledge is used as prompt statements to enhance the ability of large language models to answer questions in the field of G protein-coupled receptors. This application fully utilizes the ability of knowledge graphs to store and query accurate information, the advantages of large language models in text summarization and reasoning, and the characteristics of large language models that are fully aligned with humans to generate accurate answers that can be understood and read by humans. This application constructs a high-quality GPCRs field knowledge graph. The knowledge graph gives the large language model accurate and real-time GPCRs field knowledge, enhances its ability to answer questions in the G protein-coupled receptor field and produce accurate responses in professional fields, overcomes the shortcomings of the large language model in generating incorrect answers in the GPCRs field, and helps users quickly understand specific GPCRs.

[0083] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for enhancing the ability of a large language model to answer questions in a specific domain, characterized in that: The following steps are involved: A large language model is used to extract relation triples from a data set; the data set includes structured data and unstructured data; Based on the relationship triples, a knowledge graph of G protein coupled receptors is constructed, and the knowledge graph is stored in the form of a graph database; the knowledge graph includes G protein coupled receptor entities and their relationships with G protein coupled receptor entities; Using a pre-trained large language model, searching for relevant information in a specific field in the graph database to obtain prompt information; the specific field is the G protein coupled receptor field; Based on the prompt information and the pre-trained large language model, an answer result is obtained; the answer result is returned to the user by the pre-trained large language model.

2. The method for enhancing the ability of a large language model to answer questions in a specific field according to claim 1, characterized in that: A large language model is used to extract relation triplets from the dataset, including: A large language model is used to extract structured relational triples from the unstructured data in the data set, and the information related to G protein coupled receptors stored in the structured data of the data set is converted into relational triples; wherein, The unstructured data and the structured data are obtained by extracting data from unstructured text and structured database respectively; The unstructured text includes paragraphs in journals, patents, web pages, books, and text information in pictures; The structured database includes a G protein coupled receptor-specific database and a non-G protein coupled receptor-specific database; wherein, The G protein coupled receptor-specific database is a database specially constructed to store G protein coupled receptor information; The non-G protein coupled receptor-specific database is a database not constructed for storing G protein coupled receptor information.

3. The method for enhancing the ability of a large language model to answer questions in a specific field according to claim 1 or 2, characterized in that: The structured data include: UniProt code, ChEMBL code, receptor name, classification information, downstream messenger, related diseases, endogenous ligands and marketed drugs; The relationship triplets include properties of G protein coupled receptors in terms of function, signaling pathway, ligand, disease, and attributes.

4. The method for enhancing the ability of a large language model to answer questions in a specific field according to claim 1, characterized in that: The large language model and the pre-trained large language model are both language models that have been designed and trained and are fully aligned with human feedback; The large language model is the same as the pre-trained large language model, or the large language model is different from the pre-trained large language model; The large language model is one or more of an open source large language model and a non-open source large language model.

5. The method for enhancing the ability of a large language model to answer questions in a specific field according to claim 1, characterized in that: The knowledge graph is stored in the form of a graph database through NEO4J software.

6. The method for enhancing the ability of a large language model to answer questions in a specific field according to claim 1, characterized in that: The large language model and the pre-trained large language model both use the generative pre-trained transformer ChatGPT.

7. The method for enhancing the ability of a large language model to answer questions in a specific field according to claim 1, characterized in that: Use a pre-trained large language model to directly query the graph database for relevant information in a specific field through the Cypher language to obtain prompt information; or interact with the graph database through Python or Java programming languages; The prompt information is the information returned by the knowledge graph based on the search content.

8. A system for enhancing the ability of a large language model to answer questions in a specific domain, characterized in that: It includes a data acquisition module, a knowledge graph construction module and an interaction module connected in sequence; among them, The data acquisition module is used to extract relation triples from a data set using a large language model; the data set includes structured data and unstructured data; The knowledge graph construction module is used to construct a knowledge graph of G protein coupled receptors according to the relationship triples, and store the knowledge graph in the form of a graph database; the knowledge graph includes G protein coupled receptor entities and their relationships with G protein coupled receptor entities; The interaction module is used to use a pre-trained large language model to search for relevant information in a specific field in the graph database to obtain prompt information; the specific field is the G protein coupled receptor field; and based on the prompt information and the pre-trained large language model, an answer result is obtained; the answer result is returned to the user by the pre-trained large language model.

9. The system for enhancing the ability of a large language model to answer questions in a specific field according to claim 8, characterized in that: The data acquisition module includes a relation triple extraction unit and a relation triple conversion unit; wherein, The relation triple extraction unit is used to extract structured relation triples from unstructured data in the data set using a large language model; The relation triple conversion unit is used to convert the information related to G protein coupled receptors stored in the structured data of the data set into relation triples using a large language model; wherein, The unstructured data and the structured data are obtained by extracting data from unstructured text and structured database respectively; The unstructured text includes paragraphs in journals, patents, web pages, books, and text information in pictures; The structured database includes a G protein coupled receptor-specific database and a non-G protein coupled receptor-specific database; wherein, The G protein coupled receptor-specific database is a database specially constructed to store G protein coupled receptor information; The non-G protein coupled receptor-specific database is a database not constructed for storing G protein coupled receptor information.

10. The system for enhancing the ability of a large language model to answer questions in a specific field according to claim 9, characterized in that: Using a large language model, data is extracted from a structured database to obtain structured data; The structured data include: UniProt code, ChEMBL code, receptor name, classification information, downstream messenger, related diseases, endogenous ligands and marketed drugs.

Citation Information

Patent Citations

  • Information extraction method based on artificial intelligence, storage medium and related device

    CN111143536A

  • Intelligent question and answer method, device and equipment and storage medium

    CN111143540A

  • Protein family maps

    CN115244623A

  • System and Method for Universal Translating From Natural Language Questions to Structured Queries

    US20130226846A1

Cited By

  • NL2SQL problem enhancement method driven by multivariate knowledge link

    CN119739837A

  • System, method, computer readable storage medium, and computer program product for crop breeding questions and answers

    CN120104811A

  • Activity assessment method for factual knowledge question, product, equipment and medium

    CN120180060A

  • Large-model-oriented multi-agent information processing and auxiliary analysis system

    CN120181125A

  • Question and answer model training method and device, answer generation method and device, equipment and medium

    CN120234621A