Intelligent question answering system and method based on large model and knowledge graph
By building an intelligent question and answer system with large models and knowledge graphs, combining semantic recognition and domain classification, and selecting an appropriate question and answer system for answering, the problem of poor accuracy of existing intelligent question and answer systems in professional fields is solved, and the accuracy and targeting of question and answer are improved. sex, providing a better user experience.
Patent Information
- Application Number
- CN202410722219.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-09-20
AI Technical Summary
Existing intelligent question and answer systems have poor accuracy in professional fields, especially in factual, highly customized or real-time questions and answers. They may give answers that are inconsistent with the facts or the requirements of the question, leading to misleading users.
Adopt an intelligent question and answer system based on large models and knowledge graphs, build a large model question and answer system and a knowledge graph question and answer system in a customized field through building modules, combine the semantic recognition module, domain classification module and result generation module to select the appropriate one according to the domain nature of the problem The question and answer system answers and obtains the final result by replying to the prompt.
It improves the pertinence and accuracy of Q&A, enables users to obtain a better service experience, and ensures the accuracy and specificity of answers, especially in Q&A applications in customized and non-customized fields.
Smart Images

Figure CN118673113A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of natural language processing, and specifically to an intelligent question-answering system and method based on a large model and a knowledge graph. Background Art
[0002] There are several main types of existing intelligent question-and-answer systems: a question-and-answer system based on customized specifications, which can implement simple pre-planned question-based dialogues, and is commonly seen in electronic signboards or number-taking systems in hospitals and airports; an intelligent dialogue system based on knowledge graphs or databases, which can implement slightly more complex logical-level dialogues, and is suitable for areas such as intelligent dialogue robots at the system level in software, and IoT butlers; an AI dialogue model based on large models such as NLP natural language processing and deep learning algorithms. This question-and-answer system is based on a neural network algorithm in its design model and can give fairly accurate responses with logical thinking. At this stage, many large companies have their own large model systems.
[0003] The question-and-answer system based on the big model can provide accurate and intelligent responses in most scenarios. However, in some factual, highly customized or real-time questions and answers, such as the legal provisions of a certain code, the functional characteristics and contraindications of a certain drug, the factual logic of a certain hot event, etc., the big model may not be able to give accurate answers. In fact, because the basic logic of the big model is based on the neural network to calculate and predict the probability of the next reply content, and output the content with the highest probability, the big model question-and-answer system will give answers that are inconsistent with the facts or the requirements of the question. In serious cases, it will mislead users and have poor accuracy. Summary of the invention
[0004] This application aims to solve the problem of poor accuracy of existing intelligent question-answering systems in professional fields, and proposes an intelligent question-answering system and method based on a large model and knowledge graph.
[0005] The technical solution adopted by this application to solve the above technical problems is:
[0006] In a first aspect, the present application provides an intelligent question-answering system based on a large model and a knowledge graph, the system comprising:
[0007] A construction module is used to construct a large-model question-answering system, a knowledge graph question-answering system in a customized field, and a reply prompt in a customized field. The knowledge graph question-answering system is used to generate a first reply result after receiving a question text, and the large-model question-answering system is used to generate a second reply result after receiving a question text.
[0008] A semantic recognition module is used to receive a question text in natural language, perform semantic recognition on the question text after preprocessing, and extract key information from the question text;
[0009] A domain classification module is used to determine the domain of the question text according to the key information, and judge whether the domain of the question text belongs to a customized domain. If so, the question text is input into the knowledge graph question answering system; if not, the question text is input into the large model question answering system;
[0010] The result generation module is used to determine whether the first reply result is a direct reply when there is a first reply result. If so, the first reply result is used as the question and answer result; if not, the question text is input into the large model question and answer system; and when there is a second reply result, the reply prompt is called to obtain the second reply result to generate a question and answer result.
[0011] Further, the question text is preprocessed, specifically including: text cleaning, word segmentation and stop word filtering of the question text;
[0012] The semantic recognition specifically includes: extracting key information from the preprocessed text based on a feature extraction model of a word vector, and converting the key information into a word vector representation.
[0013] Furthermore, the knowledge graph question and answer system includes a language processing algorithm model and a knowledge graph of a customized field. The language processing algorithm model is used to extract key information in the question text and understand the intention after receiving the question text, retrieve relevant information from the knowledge graph, and convert the retrieved relevant information into natural language text to generate a first reply result.
[0014] Furthermore, the language processing algorithm model is constructed using an NLP natural language processing algorithm and a deep learning algorithm, and the knowledge graph includes structured or semi-structured storage data in a customized domain constructed using a knowledge graph tool.
[0015] Furthermore, the large model question and answer system includes a Web application framework and a large model server. The Web application framework is integrated with a large model server key. The Web application framework is used to send the question text to the large model server after receiving it, and receive the second reply result returned by the large model server.
[0016] In a second aspect, the present application provides an intelligent question-answering method based on a large model and a knowledge graph, which is applied to the intelligent question-answering system based on a large model and a knowledge graph as described in the first aspect, and the method comprises:
[0017] Step 1: Build a large-model question-answering system, a knowledge graph question-answering system for customized fields, and a reply prompt for customized fields;
[0018] Step 2: receiving a question text in natural language, preprocessing the question text, performing semantic recognition, and extracting key information from the question text;
[0019] Step 3: Determine the field of the question text according to the key information, and judge whether the field of the question text belongs to the customized field. If so, input the question text into the knowledge graph question answering system and proceed to step 4. If not, input the question text into the large model question answering system and proceed to step 5.
[0020] Step 4: After receiving the question text, the knowledge graph question answering system generates a first reply result, and determines whether the first reply result is a direct reply. If so, the first reply result is used as the question answering result. If not, the question text is input into the large model question answering system, and the process proceeds to step 5.
[0021] Step 5: After receiving the question text, the large model question and answer system generates a second reply result, calls the reply prompt to obtain the second reply result, and generates a question and answer result.
[0022] Further, the question text is preprocessed, specifically including: text cleaning, word segmentation and stop word filtering of the question text;
[0023] The semantic recognition specifically includes: extracting key information from the preprocessed text based on a feature extraction model of a word vector, and converting the key information into a word vector representation.
[0024] Furthermore, the knowledge graph question and answer system includes a language processing algorithm model and a knowledge graph of a customized field. After receiving the question text, the language processing algorithm model extracts key information in the question text and understands the intention, retrieves relevant information from the knowledge graph, and converts the retrieved relevant information into natural language text to generate a first reply result.
[0025] Furthermore, the language processing algorithm model is constructed using an NLP natural language processing algorithm and a deep learning algorithm, and the knowledge graph includes structured or semi-structured storage data in a customized domain constructed using a knowledge graph tool.
[0026] Furthermore, the large model question and answer system includes a Web application framework and a large model server. The Web application framework is integrated with a large model server key. After receiving the question text, the Web application framework sends it to the large model server and receives a second reply result returned by the large model server.
[0027] The beneficial effects of the present application are as follows: the intelligent question-and-answer system and method based on a big model and a knowledge graph provided by the present application, by respectively constructing a big model question-and-answer system for a general field and a knowledge graph question-and-answer system for a customized field, and dividing the fields based on the semantic recognition results of the user's questions, when the field belongs to a customized field, the knowledge graph question-and-answer system of the customized field answers the user's questions, thereby improving the pertinence and accuracy of the answers; when the field belongs to a non-customized field or the knowledge graph question-and-answer system does not give a direct reply, the big model question-and-answer system answers the user's questions, and calls the reply prompt of the customized field to obtain the answer results, thereby generating question-and-answer results for specific fields, thereby improving the pertinence and accuracy of the answers, and enabling users to obtain a better service experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A schematic diagram of the structure of an intelligent question-answering system based on a large model and a knowledge graph provided in an embodiment of the present application;
[0029] Figure 2 A flowchart of an intelligent question-answering method based on a large model and a knowledge graph is provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0031] The technical solution of the embodiment of the present application is applicable to factual, highly customized or real-time question-and-answer application scenarios. Since the basic logic of the current large-model-based question-and-answer system is based on the characteristics of calculating and predicting the probability of the next reply content based on a neural network and outputting the content with the highest probability, in highly professional question-and-answer application scenarios, answers that are inconsistent with the facts or the requirements of the question may be given, which may mislead users in serious cases.
[0032] Based on this, the technical solution of the present application is proposed. In the embodiment of the present application, a large model question and answer system, a knowledge graph question and answer system in a customized field, and a reply prompt in a customized field are constructed by a construction module. The knowledge graph question and answer system is used to generate a first reply result after receiving a question text, and the large model question and answer system is used to generate a second reply result after receiving the question text; a natural language question text is received by a semantic recognition module, and after preprocessing the question text, semantic recognition is performed to extract key information in the question text; the field of the question text is determined according to the key information by a field classification module, and it is judged whether the field of the question text belongs to a customized field. If so, the question text is input into the knowledge graph question and answer system, and if not, the question text is input into the large model question and answer system; when there is a first reply result, the result generation module is used to judge whether the first reply result is a direct reply, and if so, the first reply result is used as the question and answer result, and if not, the question text is input into the large model question and answer system; and when there is a second reply result, the reply prompt is called to obtain the second reply result to generate a question and answer result.
[0033] Specifically, when the content of the user's question belongs to a customized field, the knowledge graph question and answer system in the customized field will answer the user's question, thereby improving the pertinence and accuracy of the answer; when the content of the user's question belongs to a non-customized field or the knowledge graph question and answer system does not give a direct reply, the large model question and answer system will answer the user's question, and call the reply prompt of the customized field to obtain the answer result, generate the question and answer result in the specific field, thereby improving the pertinence and accuracy of the answer, so that users can get a better service experience.
[0034] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0035] See also Figure 1 The intelligent question-answering system based on a large model and a knowledge graph provided in an embodiment of the present application includes a construction module, a semantic recognition module, a domain classification module and a result generation module.
[0036] Among them, the construction module is used to build a large-model question-answering system, a knowledge graph question-answering system in a customized field, and a reply prompt in a customized field.
[0037] In an embodiment of the present application, the large model question-answering system is used to generate a second reply result after receiving the question text. Specifically, the large model question-answering system includes a Web application framework and a large model server, wherein the Web application framework is integrated with a large model server key, and the Web application framework sends the question text to the large model server after receiving it, and receives the second reply result returned by the large model server.
[0038] In actual applications, you can choose a big model that is suitable for a specific field, contact related companies or service providers to obtain the key to access the big model server, and then integrate the big model server key into the Web application framework of the application. The Web application framework interacts with the big model server through network data transmission, and when it receives the question text asked by the user, it sends it to the big model server and obtains the reply data returned by the big model server. Finally, the reply data is customized, including semantic recognition, logical reasoning, correction of ambiguity and polysemous words, etc., to generate a second reply result.
[0039] The big model can provide better contextual understanding through deep learning technology, and can better understand the user's questions and provide relevant answers. It can capture the nuances and semantic information in the question, and can reason and answer questions based on the context. At the same time, the question-answering system based on the big model can obtain more extensive and comprehensive knowledge by training massive data, enabling it to answer questions of various types and fields. In contrast, traditional question-answering systems are usually based on predefined rules and templates, and the knowledge coverage is relatively limited. Moreover, the big model can train multilingual models, so that the question-answering system can support questions and answers in multiple languages. This allows users to ask questions in a language they are familiar with, improving the applicability of the system and user experience.
[0040] In an embodiment of the present application, the knowledge graph question-answering system is used to generate a first reply result after receiving a question text. Specifically, the knowledge graph question-answering system includes a language processing algorithm model and a knowledge graph of a customized field. After receiving the question text, the language processing algorithm model extracts key information from the question text and understands the intent, retrieves relevant information from the knowledge graph, and converts the retrieved relevant information into natural language text to generate a first reply result.
[0041] In practical applications, we first use NLP natural language processing algorithms and deep learning algorithms to build a language processing algorithm model to process user question data, and build a knowledge graph based on the corresponding tools. The knowledge graph contains structured or semi-structured storage data in a customized field for storing and managing domain knowledge. After the knowledge graph question-answering system receives the question text from the user, the language processing algorithm model extracts keywords and understands the intent of the question text to determine the user's needs, and then uses information retrieval technology to find relevant entities, attributes and relationships from the knowledge graph. Finally, the obtained information is processed by natural language processing to convert the structured knowledge into text that conforms to natural language habits and generate the first reply result.
[0042] In the embodiment of the present application, the reply prompt is a reply prompt word, which can be a piece of text related to the customized field or a parameter description in a certain format. Its function is to clarify the question requirements and standardize the answer content, so as to better understand and answer questions in specific fields and further improve the accuracy of questions and answers.
[0043] The semantic recognition module is used to receive a question text in natural language, perform semantic recognition on the question text after preprocessing, and extract key information from the question text.
[0044] In the present application embodiment, pre-processing specifically includes: text cleaning, word segmentation and stop word filtering are carried out to the problem text.In actual application, in the text cleaning process, in addition to removing special symbols and punctuation marks, NLP tool library can also be used to carry out stemming (stemming) or word form restoration (lemmatization) processing, to further standardize text.In the word segmentation process, in addition to using Chinese or English word segmentation tools to carry out word segmentation processing, it is also possible to combine named entity recognition (NER) technology, identify and retain the proper nouns in the text, to improve the recognition and comprehension of entities.In the process of stop word filtering, it is possible to combine the specific stop word list of the field, filter out common words unrelated to the field, to improve the accuracy of semantic recognition.
[0045] In an embodiment of the present application, semantic recognition specifically includes: extracting key information from the preprocessed text based on a word vector feature extraction model, and converting the key information into a word vector representation. In the feature extraction stage, in addition to using a pre-trained word vector model, the entity and relationship information in the domain knowledge graph can also be combined to perform a more in-depth semantic representation of the text. In addition to using a deep learning model for semantic modeling, it is also possible to combine traditional rule-based or statistical methods to perform a more comprehensive semantic understanding of the text. In the process of similarity calculation, the distance calculation between domain knowledge and semantic vectors can be combined to perform a more accurate similarity measurement on the text.
[0046] In practical applications, after receiving a natural language question text sent by a user, the key information in the question text can be obtained by preprocessing and semantically recognizing the question text, and the key information is used to determine the question domain.
[0047] The domain classification module is used to determine the domain of the question text based on the key information, and to judge whether the domain of the question text belongs to a customized domain. If so, the question text is input into the knowledge graph question answering system; if not, the question text is input into the large model question answering system.
[0048] In actual application, after obtaining the key information in the question text, the domain classification module determines whether the domain of the question text belongs to a customized domain. If so, the question text is input into the knowledge graph question and answer system, and the knowledge graph question and answer system generates a first reply result after receiving the question text; if not, the question text is input into the large model question and answer system, and the large model question and answer system generates a second reply result after receiving the question text.
[0049] The result generation module is used to determine whether the first reply result is a direct reply when there is a first reply result. If so, the first reply result is used as the question and answer result; if not, the question text is input into the large model question and answer system; and when there is a second reply result, the reply prompt is called to obtain the second reply result to generate a question and answer result.
[0050] In actual application, when the knowledge graph question-answering system receives the question text and generates the first reply result, the result generation module determines whether the first reply result is a direct reply. If so, the first reply result is used as the question-answering result. If not, the question text is input into the large model question-answering system. When the large model question-answering system receives the question text and generates the second reply result, the result generation module calls the reply prompt to obtain the second reply result and generates the question-answering result. After the question-answering result is generated, the results of semantic recognition and reasoning are combined to generate an automated reply that meets the user's intention and is presented to the user in the form of text, voice or image.
[0051] In the embodiment of the present application, user feedback information can also be collected and the system can be continuously optimized, including updating the knowledge graph, adjusting the semantic model parameters, improving the reply generation algorithm, etc., to improve the accuracy of the system and user satisfaction. And for specific fields, the knowledge of field experts, industry specifications, and customized semantic recognition models and reply generation models can be added to better meet the needs of specific fields.
[0052] In summary, the intelligent question-and-answer system based on a large model and a knowledge graph provided in the embodiment of the present application, by respectively constructing a large model question-and-answer system for a general field and a knowledge graph question-and-answer system for a customized field, and dividing the fields based on the semantic recognition results of the user's questions, when the field belongs to a customized field, the knowledge graph question-and-answer system of the customized field answers the user's questions, thereby improving the pertinence and accuracy of the answers; when the field belongs to a non-customized field or the knowledge graph question-and-answer system does not give a direct reply, the large model question-and-answer system answers the user's questions, and calls the reply prompt of the customized field to obtain the answer result. By constructing a reply prompt for a customized field, it is possible to answer questions in a specific field, thereby improving the pertinence and accuracy of the answers. Since each field has its own specific expertise and terminology, a customized reply prompt can better understand and answer questions in a specific field.
[0053] See also Figure 2 Based on the above technical solution, the embodiment of the present application further proposes an intelligent question answering method based on a large model and a knowledge graph, which is applied to the intelligent question answering system based on a large model and a knowledge graph as described in the embodiment of the present application, and includes the following steps:
[0054] Step 1: Build a large-model question-answering system, a knowledge graph question-answering system for customized fields, and a reply prompt for customized fields;
[0055] Step 2: receiving a question text in natural language, preprocessing the question text, performing semantic recognition, and extracting key information from the question text;
[0056] Step 3: Determine the field of the question text according to the key information, and judge whether the field of the question text belongs to the customized field. If so, input the question text into the knowledge graph question answering system and proceed to step 4. If not, input the question text into the large model question answering system and proceed to step 5.
[0057] Step 4: After receiving the question text, the knowledge graph question answering system generates a first reply result, and determines whether the first reply result is a direct reply. If so, the first reply result is used as the question answering result. If not, the question text is input into the large model question answering system, and the process proceeds to step 5.
[0058] Step 5: After receiving the question text, the large model question and answer system generates a second reply result, calls the reply prompt to obtain the second reply result, and generates a question and answer result.
[0059] It can be understood that since the intelligent question and answer method based on a big model and a knowledge graph described in the embodiment of the present application is a method implemented based on the intelligent question and answer system based on a big model and a knowledge graph described in the embodiment, for the method disclosed in the embodiment, since it corresponds to the system disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the system.
Claims
1. An intelligent question-answering system based on a large model and knowledge graph, characterized in that: The system comprises: A construction module is used to construct a large-model question-answering system, a knowledge graph question-answering system in a customized field, and a reply prompt in a customized field. The knowledge graph question-answering system is used to generate a first reply result after receiving a question text, and the large-model question-answering system is used to generate a second reply result after receiving a question text. A semantic recognition module is used to receive a question text in natural language, perform semantic recognition on the question text after preprocessing, and extract key information from the question text; A domain classification module is used to determine the domain of the question text according to the key information, and judge whether the domain of the question text belongs to a customized domain. If so, the question text is input into the knowledge graph question answering system; if not, the question text is input into the large model question answering system; The result generation module is used to determine whether the first reply result is a direct reply when there is a first reply result. If so, the first reply result is used as the question and answer result; if not, the question text is input into the large model question and answer system; and when there is a second reply result, the reply prompt is called to obtain the second reply result to generate a question and answer result.
2. The intelligent question-answering system based on a large model and a knowledge graph according to claim 1, characterized in that: Preprocessing the question text, specifically including: text cleaning, word segmentation and stop word filtering of the question text; The semantic recognition specifically includes: extracting key information from the preprocessed text based on a feature extraction model of a word vector, and converting the key information into a word vector representation.
3. The intelligent question-answering system based on a large model and a knowledge graph according to claim 1, characterized in that: The knowledge graph question-answering system includes a language processing algorithm model and a knowledge graph in a customized field. The language processing algorithm model is used to extract key information in the question text and understand the intent after receiving the question text, retrieve relevant information from the knowledge graph, and convert the retrieved relevant information into natural language text to generate a first reply result.
4. The intelligent question-answering system based on a large model and a knowledge graph according to claim 3, characterized in that: The language processing algorithm model is constructed using an NLP natural language processing algorithm and a deep learning algorithm, and the knowledge graph includes structured or semi-structured storage data in a customized domain constructed using a knowledge graph tool.
5. The intelligent question-answering system based on a large model and a knowledge graph according to claim 1, characterized in that: The large model question-answering system includes a Web application framework and a large model server. The Web application framework is integrated with a large model server key. The Web application framework is used to send the question text to the large model server after receiving it, and receive the second reply result returned by the large model server.
6. An intelligent question-answering method based on a large model and knowledge graph, characterized in that: Applied to the intelligent question answering system based on a large model and a knowledge graph as claimed in any one of claims 1 to 5, the method comprising: Step 1: Build a large-model question-answering system, a knowledge graph question-answering system for customized fields, and a reply prompt for customized fields; Step 2: receiving a question text in natural language, preprocessing the question text, performing semantic recognition, and extracting key information from the question text; Step 3: Determine the field of the question text according to the key information, and judge whether the field of the question text belongs to the customized field. If so, input the question text into the knowledge graph question answering system and proceed to step 4. If not, input the question text into the large model question answering system and proceed to step 5. Step 4: After receiving the question text, the knowledge graph question answering system generates a first reply result, and determines whether the first reply result is a direct reply. If so, the first reply result is used as the question answering result. If not, the question text is input into the large model question answering system, and the process proceeds to step 5. Step 5: After receiving the question text, the large model question and answer system generates a second reply result, calls the reply prompt to obtain the second reply result, and generates a question and answer result.
7. The intelligent question-answering method based on a large model and a knowledge graph according to claim 6, characterized in that: Preprocessing the question text, specifically including: text cleaning, word segmentation and stop word filtering of the question text; The semantic recognition specifically includes: extracting key information from the preprocessed text based on a feature extraction model of a word vector, and converting the key information into a word vector representation.
8. The intelligent question-answering method based on a large model and a knowledge graph according to claim 6, characterized in that: The knowledge graph question-answering system includes a language processing algorithm model and a knowledge graph in a customized field. After receiving a question text, the language processing algorithm model extracts key information from the question text and understands the intent, retrieves relevant information from the knowledge graph, and converts the retrieved relevant information into natural language text to generate a first reply result.
9. The intelligent question-answering method based on a large model and a knowledge graph according to claim 8, characterized in that: The language processing algorithm model is constructed using an NLP natural language processing algorithm and a deep learning algorithm, and the knowledge graph includes structured or semi-structured storage data in a customized domain constructed using a knowledge graph tool.
10. The intelligent question-answering method based on a large model and a knowledge graph according to claim 6, characterized in that: The large model question-answering system includes a Web application framework and a large model server. The Web application framework is integrated with a large model server key. After receiving the question text, the Web application framework sends it to the large model server and receives a second reply result returned by the large model server.
Citation Information
Patent Citations
Knowledge question-answering system construction method and system
CN117033571A
Method and device for constructing enterprise internal knowledge base question-answering system
CN117743541A
Cited By
Question processing method and device based on large language model, equipment and medium
CN119202195A
Intelligent question answering method, device and system based on cognitive reasoning
CN119691139A
Intelligent Question Answering Method, Device and System Based on Cognitive Reasoning
CN119691139B
Intelligent question answering method, device and equipment based on combination of large model and knowledge graph
CN119807386A
Question and answer processing method, system and device, electronic equipment and computer storage medium
CN120725138A
