Knowledge base question and answer method and system based on intention recognition and medium

Through the combination of user intention identification and different search strategies, the problem of quality decline in knowledge base in multiple rounds of Q&A is solved, the efficiency and professionalism of Q&A is improved, and user interaction is enhanced.

CN120045688APending Publication Date: 2025-05-27WUXI APPTEC (SHANGHAI) CO LTD
View PDF 0 Cites 9 Cited by

Patent Information

Application Number
CN202411882396.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

The existing knowledge base is unable to effectively combine historical answers in multiple rounds of Q&A, resulting in a decline in Q&A quality and inability to interact effectively, especially in poor performance in specific Q&A in the professional field.

Method used

Through user intent identification, user questions are initially classified, and different search strategies are adopted for different categories, including knowledge base search Q&A, big model direct Q&A, and rejection of answers by template, enhancing the quality of multiple rounds of conversations and user interaction.

Benefits of technology

It improves the efficiency and professionalism of the knowledge base Q&A, ensures the coverage of Q&A and the quality of multiple rounds of conversations, and reduces the situations in which user questions are not related to the knowledge base.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045688A_ABST
    Figure CN120045688A_ABST
Patent Text Reader

Abstract

The invention discloses a knowledge base question answering method and system based on intention recognition and a medium, and the method comprises the steps: receiving a user question, inputting the user question into a large language model subjected to intention recognition training, and carrying out the preliminary classification; determining a corresponding search strategy according to a classification result obtained by the preliminary classification; if the search strategy is knowledge base search questions and answers, selecting a knowledge base matched with the search strategy for knowledge retrieval, inputting the retrieved reference knowledge and cue word templates into a large language model, and answering the user questions by the large language model; and if the search strategy is large-model direct question answering, selecting a cue word template, inputting the cue word template into the large-language model, and answering the user question by the large-language model. According to the method, user questions can be preliminarily classified through user intention recognition, different search strategies are adopted for different categories, and knowledge base question answering efficiency and accuracy are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and specifically relates to a knowledge base question-answering method, system and medium based on intent recognition. Background Art

[0002] In recent years, with the rise of large language models (LLMs) and the increasing number of knowledge documents, knowledge base-related technologies have been applied in a wide range of fields. Through the rapid retrieval of computers and the analysis and summarization capabilities of large language models, users can quickly locate useful knowledge paragraphs in a vast amount of literature and organize, analyze, and answer questions according to user needs. Compared with traditional document search and manual summarization, knowledge bases can greatly improve the efficiency of manual access and analysis of materials.

[0003] Generally, a knowledge base includes information processing (such as document processing or online information search), knowledge retrieval (such as Elastic Search, Embedding Search, or Hybrid Search), and large language model (LLM) question-answering. Information usually undergoes information processing to form individual knowledge chunks, and then the knowledge chunks will pass through an embedding model and be transformed into N-dimensional high-order vectors (vectors) and placed in a vector database (Vector Database). When a user asks a question, the user's question (Query) will pass through the same embedding model and be transformed into a Query Vector, and the semantic information of the knowledge will be stored in the relevant high-dimensional vectors. The semantic relevance of knowledge can be transformed into the cosine similarity between vectors, calculate the similarity between the knowledge vectors in the knowledge base and the user's question for sorting, and select the top n (n is a natural number) knowledge chunks as the reference results. Finally, the large language model answers the user's question according to a preset prompt template, with the help of the reference knowledge.

[0004] However, the quality of the current knowledge base in single-round question-answering can be enhanced through the search module, but for multi-round question-answering, it cannot well combine historical answers and cannot effectively interact with users. As multi-round question-answering deepens, the performance of the knowledge base may decline. For non-search questions asked by users, the search results may instead cause interference. These problems lead to a significant decline in the comprehensiveness and coverage of question-answering, especially evident in specific question-answering for professional fields.

[0005] Based on the above problems, the applicant proposes the technical solution of this application. Summary of the Invention

[0006] In view of the above-mentioned defects of the prior art, the present invention effectively improves the efficiency of knowledge base question-answering by identifying user intent, preliminarily classifying user questions, and adopting different search strategies for different categories.

[0007] To achieve the above object, the present invention discloses a knowledge base question and answer method based on intention recognition, including the following steps:

[0008] Receive a user question, input the user question into a large language model trained for intention recognition, and have the large language model perform a preliminary classification on the user question;

[0009] According to the classification result obtained from the preliminary classification, determine a search strategy corresponding to the classification result;

[0010] If the search strategy is knowledge base search and question answering, select a knowledge base that matches the search strategy for knowledge retrieval, input the retrieved reference knowledge and prompt word template into the large language model, and have the large language model answer the user question;

[0011] If the search strategy is direct question answering by the large model, select a prompt word template and input it into the large language model, and have the large language model answer the user question;

[0012] If the search strategy is to reject answering according to the template, the large language model gives a reason why the user question is not relevant to the knowledge base and rejects answering.

[0013] Preferably, the intention recognition training of the large language model includes the following steps:

[0014] Preset multiple classification categories for classifying user intentions and the corresponding judgment criteria for each classification category, and input the classification categories and the judgment criteria into the large language model in pairs;

[0015] Determine the requirements for parameter fields to be extracted, construct a prompt word engineering according to the parameter field requirements, and input the prompt word engineering into the large language model;

[0016] Train the large language model so that the large language model has the ability of intention recognition.

[0017] Preferably, if the search strategy is knowledge base search and question answering, before the large language model answers the user question, the method further includes:

[0018] Perform document recognition and chunking on the documents in the knowledge base, and convert the documents into a number of separate knowledge base chunks;

[0019] Bind each knowledge base chunk with the current knowledge base and document respectively for label binding to form a label combination composed of chunk labels, knowledge base labels and document labels;

[0020] Input each knowledge base chunk and the combined tags into the search database to complete the data input for document content search.

[0021] Preferably, the knowledge base question - answering method based on intent recognition further includes:

[0022] Use the Embedding model to convert the knowledge base chunk into a high - dimensional vector and input it into the vector library;

[0023] Through the search function of the search engine, output and display a list of documents for the user to select multiple documents;

[0024] After the user selects several documents, list the selected documents in the restricted document list;

[0025] Limit the search scope of the reference knowledge used by the large - language model to answer the user's questions within the restricted document list.

[0026] Preferably, two basic search methods are used for knowledge retrieval in the knowledge base. The two search methods are Elastic search and LLM search. The search results obtained by the two search methods are fused through the RRF function to form a hybrid search, and the sorted result of the obtained reference knowledge is input into the large - language model.

[0027] Preferably, the classification results include new knowledge search, information re - processing, and irrelevant questions;

[0028] For the new knowledge search, the search strategy adopted is knowledge base search and question - answering;

[0029] For the information re - processing, the search strategy adopted is direct question - answering by the large model;

[0030] For the irrelevant questions, the search strategy adopted is that the large model refuses to answer according to the template.

[0031] The present invention also discloses a knowledge base question - answering system based on intent recognition, including the following modules:

[0032] A question receiving module, used to receive the user's question, input the user's question into a large - language model trained for intent recognition, and the large - language model performs a preliminary classification on the user's question;

[0033] A question classification module, used to determine the search strategy corresponding to the classification result according to the classification result obtained from the preliminary classification;

[0034] A knowledge search module, which is used to, if the search strategy is to search for answers in the knowledge base, select a knowledge base that matches the search strategy to perform knowledge retrieval, input the retrieved reference knowledge and prompt word templates into the large language model, and have the large language model answer the user's question;

[0035] A direct processing module, which is used to, if the search strategy is to directly answer questions using the large model, select a prompt word template and input it into the large language model, and have the large language model answer the user's question;

[0036] An irrelevant processing module, which is used to, if the search strategy is to reject answering according to the template, have the large language model output the reason why the user's question is not relevant to the knowledge base and reject answering the question.

[0037] Preferably, the question receiving module is further used to,

[0038] Preset multiple classification categories for classifying user intentions and the corresponding judgment criteria for each classification category, and input the classification categories and the judgment criteria into the large language model in pairs;

[0039] Determine the requirements for parameter fields to be extracted, construct a prompt word project according to the requirements of the parameter fields, and input the prompt word project into the large language model;

[0040] Train the large language model so that the large language model has the ability of intention recognition.

[0041] Preferably, the knowledge search module is further used to,

[0042] Perform document recognition and chunking on the documents in the knowledge base, and convert the documents into several separate knowledge base chunks;

[0043] Bind each knowledge base chunk with the current knowledge base and document respectively to form a label combination composed of chunk labels, knowledge base labels and document labels;

[0044] Input each knowledge base chunk and the label combination into the search database together to complete the data input for document content search.

[0045] The present invention also discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned knowledge base question-answering method based on intention recognition is implemented.

[0046] Compared with the prior art, the present invention has the following beneficial effects:

[0047] The knowledge base question-answering method and system based on intent recognition provided by the present invention utilize the large language model (LLM) itself to set up a user intent recognition before question-answering, and combine different search strategies and question-answering prompt templates to enhance the quality of multi-round conversations and user interactivity. At the same time, it also combines the Elastic Search knowledge document search and the general large model question-answering (Embedding) to enable users to manually search for documents through ES and add restrictions. After restricting the documents, the knowledge base question-answering will be limited to the restricted documents, ensuring the professionalism and coverage of the question-answering.

[0048] The following will further illustrate the concept, specific structure and technical effects of the present invention in conjunction with the attached drawings to fully understand the purpose, features and effects of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 is a schematic flowchart of the knowledge base question-answering based on intent recognition of the present invention.

[0050] Figure 2a and Figure 2b is the effect diagram of the knowledge base question-answering without intent recognition in the experiment of the first embodiment of the present invention.

[0051] Figure 3a and Figure 3b is the effect diagram of the knowledge base question-answering with intent recognition in the experiment of the first embodiment of the present invention.

[0052] Figure 4 is the effect diagram of the knowledge base question-answering without document restriction in the experiment of the first embodiment of the present invention.

[0053] Figure 5 is the effect diagram of the knowledge base question-answering with document restriction in the experiment of the first embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0054] In order to make the technical means, creative features, achieved purposes and effects of the invention easy to understand, the present invention will be further described below in conjunction with specific illustrations. However, the present invention is not limited to the following implemented cases.

[0055] It should be noted that the structures, ratios, sizes, etc. shown in the drawings of this specification are only used to cooperate with the content disclosed in the specification for those skilled in this technology to understand and read, and are not used to limit the limited conditions under which the present invention can be implemented. Therefore, they do not have any technical substance. Any modification of the structure, change of the proportional relationship or adjustment of the size, without affecting the effects that the present invention can produce and the purposes that can be achieved, should still fall within the scope that the technical content disclosed by the present invention can cover.

[0056] Such as Figure 1As shown in the figure, the first embodiment of the present invention discloses a knowledge base question-answering method based on intention recognition, including the following steps:

[0057] Step S1, receive the user's question, input the user's question into a large language model trained for intention recognition, and the large language model preliminarily classifies the user's question.

[0058] Specifically, first, it is necessary to train the large language model for intention recognition. In this embodiment, the following training method is adopted:

[0059] First, pre-set multiple classification categories for classifying user intentions and the corresponding judgment criteria for each classification category, and input the classification categories and the judgment criteria into the large language model in pairs.

[0060] Secondly, determine the requirements for parameter fields to be extracted, construct a prompt engineering according to the requirements of the parameter fields, and input the prompt engineering into the large language model.

[0061] Finally, train the large language model so that the large language model has the ability of intention recognition.

[0062] In this embodiment, the large language model is trained by few-shot learning. Collect data related to the classification categories for classifying user intentions. For example, set 3 classification categories. The search for new knowledge is classified into the new knowledge search category, the search related to the context that has appeared in multiple rounds of question-answering is classified into the information reprocessing category, and the search weakly associated with the current knowledge base is classified into the irrelevant processing category. Continuously adjust the prompt of the large language model through these classification data until the large language model has the preliminary classification ability of intention recognition.

[0063] For example, when performing few-shot training on the large language model, it is necessary to prepare few-shot training data of different classifications and the subsequent measures for the relevant classifications.

[0064] First, prepare the few-shot training materials, including the knowledge scope description of the example knowledge base, the search-type questions of the example knowledge base, the sample questions of the reprocessing type questions and the irrelevant type questions.

[0065] Taking an example of a toxicology knowledge base based on FDA as an example, first prepare the knowledge scope description. The knowledge scope description mainly briefly expounds the knowledge content scope of the knowledge base. Taking the FDA toxicology knowledge base as an example, the knowledge scope description of this knowledge base is "the relevant toxicology knowledge of clinical trial drugs based on FDA, including the drugs listed on FDA, the applying institutions and the toxicological properties".

[0066] Example search questions in the toxicology knowledge base include: What are the drugs based on EGFR? What are the long-term toxicities of drugs based on EGFR? What is the toxicology experiment design of drugs based on EFGR?

[0067] Example reprocessing questions in the toxicology knowledge base include: Please translate the above content into Chinese. Please summarize the toxicology experiment design found above and return it in tabular form.

[0068] Example irrelevant questions in the toxicology knowledge base include: How is Sanofi's recent financing situation? What are the most popular drugs on the market now?

[0069] After preparing such examples, input them into GPT through prompt engineering for Few-shot Learning, which is used for the classification of new user questions.

[0070] Step S2, according to the classification result obtained from the preliminary classification, determine the search strategy corresponding to the classification result.

[0071] Through the preliminary classification of the large language model, user questions are classified into different categories. For different categories, different search strategies are adopted for knowledge base Q&A, making the knowledge base Q&A more targeted and improving the Q&A efficiency.

[0072] In this embodiment, the classification results include new knowledge search, information reprocessing, and irrelevant questions. For the new knowledge search, the adopted search strategy is knowledge base search Q&A; for the information reprocessing, the adopted search strategy is direct Q&A with the large model; for the irrelevant questions, the adopted search strategy is to reject the answer according to the template.

[0073] Step S3, if the search strategy is knowledge base search Q&A, select the knowledge base that matches the search strategy for knowledge retrieval, and input the retrieved reference knowledge and prompt template into the large language model, and the large language model answers the user question.

[0074] Specifically, before the large language model answers the user question, identify and segment the documents in the knowledge base, and convert the documents into several individual knowledge base chunks; bind labels to each knowledge base chunk with the current knowledge base and documents respectively to form a label combination composed of chunk labels, knowledge base labels, and document labels; input each knowledge base chunk and the label combination into the search database to complete the data input for document content search.

[0075] Under normal circumstances, the knowledge base search is selected to be carried out in a specific knowledge base. In this embodiment, the tag binding adopts the form of identity ID binding. For example, through information processing, the document is converted into separate knowledge chunks content, and then each knowledge chunk is tag-bound with the current knowledge base and the document to form a knowledge combination of content-kb_id-doc_id, where kb_id represents the identity ID of the current knowledge base, and doc_id represents the identity ID of the current document. Then, each knowledge combination is input into the Elastic Search search database to complete the data input for document content search.

[0076] In one example, the search scope of the document content is also limited. Specifically, using the Embedding model, the knowledge base chunks are converted into high-dimensional vectors and input into the vector library; through the search function (Elastic Search) of the search engine, knowledge chunks containing user keywords or phrases are searched, and then through the previous binding relationship of content-kb_id-doc_id, after merging and removing duplicates, a list of displayed documents is output for the user to select multiple documents; after the user selects several documents, the selected documents are listed in the limited document list; the search scope of the reference knowledge used by the large language model to answer user questions is limited within the limited document list.

[0077] Specifically, when searching for limited documents, the knowledge chunk content is converted into high-dimensional vectors and input into the Milvus Database vector library. Then, the corresponding search module of Elastic Search is developed. Through ES search, a list of relevant document ids is obtained by merging, and the duplicate document ids in the list are removed, and each document id is only displayed once. Manually, multiple required document ids can be selected by checking on the user interface. In subsequent knowledge base question answering, according to the document ids selected by the user, when searching in the Milvus Database, the scope of knowledge (knowledge chunks bound by doc_id) is limited in advance, and then using the vector search function of Milvus, combined with the user query generated by intent recognition, top n knowledge search is returned.

[0078] It should be noted that in this embodiment, specific documents are not pre-limited through filters, but... through a general search engine, content matching is performed based on the keywords (Keyword) or key phrases (Phrase) provided by the user. This example is for a more general document-level knowledge base, including but not limited to various forms of document data such as external literature, internal literature, PPT, Excel, etc., so characteristic filters biased towards literature (such as publication time, publisher, etc.) are not adopted.

[0079] Step S4, if the search strategy is direct question and answer by the large model, select a prompt template and input it into the large language model, and the large language model answers the user's question.

[0080] Specifically, in the case of multi-round question and answer, for similar questions that have already been involved in the context, there is no need to search the knowledge base again, and the large model can directly form the question answer after connecting the context. For this search strategy, the user's question and the prompt template are input into the large language model for answering.

[0081] Step S5, if the search strategy is to reject the answer according to the template, the large model gives the basis for the irrelevance of the user's question to the knowledge base and rejects answering the user's question.

[0082] Specifically, questions that are completely irrelevant to a specific knowledge base are classified as irrelevant questions. For such questions, the large language model only needs to give the basis for judging irrelevant questions and then reject answering.

[0083] In this embodiment, a user intention recognition before question and answer is set by using the large language model LLM itself. Combining different search strategies and question and answer prompt templates enhances the quality of multi-round conversations and the interactivity with users. At the same time, a double combination of ElasticSearch knowledge document search and Embedding is also carried out, enabling users to manually search for documents through ES and add restrictions. After restricting the documents, the knowledge base question and answer will be limited to the restricted documents, ensuring the professionalism and coverage of the question and answer.

[0084] The following is illustrated by a knowledge base question and answer experiment with enhanced intention recognition. In this experiment, more than 8,000 toxicology-related literature materials were imported into the knowledge base, and a comparison of the results of multi-round question and answer in two modes of without intention recognition and with intention recognition was carried out.

[0085] Each of the two modes carried out 3 rounds of conversations. The first round was a search for new knowledge (disease information of MEK3), the second round was the processing and processing of the knowledge in the first round, and the third round was the question and answer of questions not related to the current database.

[0086] As Figure 2a and Figure 2b show the knowledge base question and answer effect without intention recognition, as Figure 3a and Figure 3bThe question-answering effect of the knowledge base with intent recognition is shown. In the first round of conversation, both modes can perform well in searching and answering questions about documents based on the user's question. However, in the second round of question-answering, the answers from the knowledge base start to diverge. The reason is that in the mode without intent recognition, the knowledge base will still search for new answers based on the user's question and refer to the answers. Although the large model itself has context judgment, the new knowledge will still affect the targeted answer of the large model in the second round. But the knowledge base with enhanced intent recognition can well judge the user's second-round behavior and directly refer to the reference answer in the first round to answer the user's question specifically. In the comparison of the last round, in the mode without intent recognition, only an answer indicating that no relevant reference can be found can be given. But after the intent recognition is enhanced, the knowledge base will analyze the relevance between the question and the knowledge base and give the reason for being unable to answer and relevant guidance.

[0087] The following experiment uses the same knowledge base as the above intent recognition experiment to compare the question-answering effect of the knowledge base under artificially restricted documents.

[0088] As Figure 4 shows the question-answering effect of the knowledge base without document restriction, Figure 5 shows the question-answering effect of the knowledge base with restricted documents. It can be seen that after artificially restricting the documents, the entire knowledge scope is limited to the selected documents, and the answers will be more concentrated. For documents in the field, this artificial intervention can effectively prevent the knowledge dilution of overly similar documents.

[0089] The second embodiment of the present invention discloses a knowledge base question-answering system based on intent recognition, including the following modules:

[0090] A question receiving module for receiving a user's question, inputting the user's question into a large language model trained with intent recognition, and preliminarily classifying the user's question by the large language model;

[0091] A question classification module for determining a search strategy corresponding to the classification result according to the classification result obtained from the preliminary classification;

[0092] A knowledge search module for, if the search strategy is knowledge base search and question answering, selecting a knowledge base that matches the search strategy for knowledge retrieval, inputting the retrieved reference knowledge and prompt word template into the large language model, and answering the user's question by the large language model;

[0093] A direct processing module for, if the search strategy is direct question answering by the large model, selecting a prompt word template, inputting it into the large language model, and answering the user's question by the large language model;

[0094] An irrelevant processing module for, if the search strategy is to reject answering according to the template, not requiring the large language model to answer the question.

[0095] In one example, the problem receiving module is further configured to

[0096] Preset multiple classification categories for classifying user intentions, as well as judgment criteria corresponding to each classification category, and input the classification categories and the judgment criteria into the large language model in pairs;

[0097] Determine the parameter field requirements to be extracted, construct a prompt engineering according to the parameter field requirements, and input the prompt engineering into the large language model;

[0098] Train the large language model so that the large language model has the ability of intention recognition.

[0099] In one example, the knowledge search module is further configured to

[0100] Perform document recognition and chunking on the documents in the knowledge base, and convert the documents into several separate knowledge base chunks;

[0101] Bind each knowledge base chunk with the current knowledge base and documents respectively to form a label combination consisting of chunk labels, knowledge base labels and document labels;

[0102] Input each knowledge base chunk and the label combination into the search database together to complete the data input for document content search.

[0103] Since the first embodiment corresponds to this embodiment, this embodiment can be implemented in cooperation with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in this embodiment, and the technical effects achievable in the first embodiment can also be achieved in this embodiment. To avoid repetition, they will not be elaborated here. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied in the first embodiment.

[0104] The third embodiment of the present invention relates to a computer-readable storage medium, on which a computer program / instructions are stored, characterized in that when the computer program / instructions are executed by a processor, the steps of the method in the first embodiment are implemented.

[0105] The preferred specific embodiments of the present invention have been described in detail above. It should be understood that those of ordinary skill in the art can make many modifications and variations according to the concept of the present invention without creative labor. Therefore, all technical solutions that can be obtained by those skilled in the art in the technical field of the present invention through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should fall within the protection scope determined by the claims.

Claims

1. A knowledge base question answering method based on intent recognition, characterized in that: The following steps are involved: Receive a user question, input the user question into a large language model trained for intent recognition, and use the large language model to preliminarily classify the user question; Determining a search strategy corresponding to the classification result according to the classification result obtained by the preliminary classification; If the search strategy is a knowledge base search question and answer, then a knowledge base matching the search strategy is selected for knowledge retrieval, and the retrieved reference knowledge and prompt word template are input into the large language model, so that the large language model can answer the user question; If the search strategy is large model direct question and answer, a prompt word template is selected and input into the large language model, and the large language model answers the user question; If the search strategy is to refuse to answer according to the template, the large language model outputs the reason why the user question is irrelevant to the knowledge base and refuses to answer the question.

2. The knowledge base question answering method based on intention recognition according to claim 1 is characterized in that: The intention recognition training of the large language model comprises the following steps: Presetting a plurality of classification categories for classifying user intentions and a judgment criterion corresponding to each classification category, and inputting the classification categories and the judgment criterion into the large language model in pairs; Determine the parameter field requirements to be extracted, construct a prompt word project according to the parameter field requirements, and input the prompt word project into the large language model; The large language model is trained so that the large language model has the capability of intent recognition.

3. The knowledge base question answering method based on intention recognition according to claim 1 is characterized in that: If the search strategy is knowledge base search question and answer, before the large language model answers the user question, the method further includes: Performing document recognition and segmentation on documents in the knowledge base, and converting the documents into a number of separate knowledge base blocks; Bind each knowledge base chunk to the current knowledge base and document respectively to form a tag combination consisting of chunk tag, knowledge base tag and document tag; Each knowledge base block and the tag combination are input into the search database to complete the data input for document content search.

4. The knowledge base question answering method based on intention recognition according to claim 3 is characterized in that: The method further comprises: Using the Embedding model, the knowledge base blocks are converted into high-dimensional vectors and input into the vector library; Through the search function of the search engine, a list of displayed documents is output for users to select multiple documents; After the user selects a number of documents, the selected documents are included in the limited document list; The search scope of the reference knowledge used by the large language model when answering user questions is limited to the limited document list.

5. The knowledge base question answering method based on intention recognition according to claim 1 is characterized in that: Two basic search methods are used for knowledge retrieval in the knowledge base, namely, Elastic search and LLMsearch. The search results obtained by the two search methods are fused through the RRF function to form a hybrid search, and the ranking results of the obtained reference knowledge are input into the large language model.

6. The knowledge base question answering method based on intention recognition according to claim 1 is characterized in that: The classification results include new knowledge search, information reprocessing and irrelevant issues; For the new knowledge search, the search strategy adopted is knowledge base search question and answer; For the information reprocessing described, the search strategy adopted is direct question answering with a large model; For the irrelevant questions, the search strategy adopted is that the large model gives irrelevant reasons according to the template and refuses to answer.

7. A knowledge base question answering system based on intent recognition, characterized in that: Includes the following modules: A question receiving module, used for receiving user questions, inputting the user questions into a large language model trained for intent recognition, and having the large language model preliminarily classify the user questions; A question classification module, used to determine a search strategy corresponding to the classification result according to the classification result obtained by the preliminary classification; A knowledge search module, for selecting a knowledge base matching the search strategy for knowledge retrieval if the search strategy is a knowledge base search question and answer, inputting the retrieved reference knowledge and prompt word template into the large language model, and having the large language model answer the user question; A direct processing module, for selecting a prompt word template and inputting it into a large language model if the search strategy is a large model direct question and answer, so that the large language model can answer the user question; The irrelevant processing module is used for, if the search strategy is to refuse to answer according to the template, the large language model outputs the reason why the user question is irrelevant to the knowledge base and refuses to answer the question.

8. The knowledge base question answering system based on intention recognition according to claim 7 is characterized in that: The question receiving module is also used for: Presetting a plurality of classification categories for classifying user intentions and a judgment criterion corresponding to each classification category, and inputting the classification categories and the judgment criterion into the large language model in pairs; Determine the parameter field requirements to be extracted, construct a prompt word project according to the parameter field requirements, and input the prompt word project into the large language model; The large language model is trained so that the large language model has the capability of intent recognition.

9. The knowledge base question answering system based on intention recognition according to claim 7, characterized in that: The knowledge search module is also used to: Performing document recognition and segmentation on documents in the knowledge base, and converting the documents into a number of separate knowledge base blocks; Bind each knowledge base chunk to the current knowledge base and document respectively to form a tag combination consisting of chunk tag, knowledge base tag and document tag; Each knowledge base block and the tag combination are input into the search database to complete the data input for document content search.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the knowledge base question-answering method based on intent recognition as described in any one of claims 1 to 6.

Citation Information

Cited By

  • Retrieval question and answer method and device for table, medium, equipment and program product

    CN120429310A

  • Game question and answer method and device based on large language model

    CN120632051A

  • Semantic interaction method and device based on library business, electronic equipment and medium

    CN121146051A

  • Library business-based semantic interaction method and device, electronic equipment and medium

    CN121146051B

  • Large-model multi-path retrieval question and answer parameter and data source tuning method under multi-round question and answer

    CN121146095A