Man-machine interaction method and device based on large model

By building an expanded knowledge base and combining coarse and fine ranking models, the shortcomings of the intelligent question-answering system in context utilization and anthropomorphic interaction are addressed, more accurate and anthropomorphic responses are achieved, and the user experience is improved.

CN120821789APending Publication Date: 2025-10-21BEIHAI QIANG INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311451577.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-02
Publication Date
2025-10-21

AI Technical Summary

Technical Problem

Existing intelligent question-answering systems lack the ability to utilize context and anthropomorphic interactions, resulting in low response accuracy and poor user experience. In particular, systems based on large models are prone to generating specious responses.

Method used

By building an expanded knowledge base, using coarse and fine ranking models combined with a large question-answering model, we preprocess user questions, extract similarities, splice and evaluate confidence, and generate personalized responses.

Benefits of technology

It improves the accuracy of responses and user satisfaction, enhances the system's anthropomorphic interaction capabilities, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120821789A_ABST
    Figure CN120821789A_ABST
Patent Text Reader

Abstract

The invention relates to a man-machine interaction method and device based on a large model, electronic equipment and a computer readable medium. The method comprises the following steps: constructing an expansion knowledge base containing a plurality of question and answer pairs according to a question and answer large model; preprocessing user questions and inputting the user questions into a rough arrangement model so as to extract a plurality of question and answer pairs in the expansion knowledge base according to similarity; splicing the plurality of question and answer pairs and the user question, and inputting the spliced question and answer pairs and the user question into a fine ranking model to obtain a confidence score of each question and answer pair; generating a judgment question through the plurality of question and answer pairs, and inputting the judgment question into a question and answer large model to generate a judgment result of each question and answer pair; and determining a question reply corresponding to the user question based on the confidence score of each question and answer pair and the judgment result. According to the method, the calculation advantages of various machine learning models can be combined, the user problem can be accurately replied in a personification mode, the reply accuracy is improved, and the user satisfaction degree is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer information processing, and more specifically, to a large-scale model-based human-computer interaction method, device, electronic device, and computer-readable medium. Background Art

[0002] Recommendation algorithms are a type of computer science that use mathematical algorithms to infer content that users may like. Recommendation algorithms generally use content-based methods and collaborative filtering recommendation methods to generate a recommendation prediction, and then combine these results using a specific method. While there are many theoretically available recommendation combination methods, not all are necessarily effective for a specific problem. A key principle of combined recommendation is to avoid or compensate for the weaknesses of each recommendation technique through combination.

[0003] Currently, recommendation algorithms have been applied to question-answering within knowledge bases. In a knowledge-based question-answering recommendation system, the best answer to a user's question can be searched within the knowledge base and recommended to the user. Current intelligent question-answering system architectures are generally divided into two types: one is based on model-based retrieval of question-answer pairs. While model-based retrieval is fast and provides accurate responses, it relies solely on the user's current question-answer pair, making it difficult to leverage context. Furthermore, the interaction lacks humanization, resulting in stiff and sometimes difficult-to-understand responses, resulting in a poor user experience. Another type of intelligent question-answering is based on vector retrieval and large models, such as Langchain. Vector retrieval methods can effectively leverage context to provide users with personalized responses. However, large models can create illusions of responses in some scenarios, causing confusion for users. For example, they can generate seemingly plausible responses, such as, "For specific product usage conditions and rules, please check the XX page or our official website www.XXXXX.com.cn. Thank you for your use and understanding, and wish you a happy life!" The large model "virtually" constructs the XX webpage and XXXX URL name based on a large amount of data learning, even though there is no XX page or XXXX URL.

[0004] The above information disclosed in this Background section is only for enhancement of understanding of the background of the application and therefore it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art. Summary of the Invention

[0005] In view of this, the present application provides a human-computer interaction method, device, electronic device and computer-readable medium based on a large model, which can combine the computing advantages of multiple machine learning models, accurately respond to user questions in an anthropomorphic manner, improve response accuracy, and increase user satisfaction.

[0006] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by practice of the present application.

[0007] According to one aspect of the present application, a human-computer interaction method based on a large model is proposed, which includes: constructing an expanded knowledge base containing question-answer pairs based on the question-answer large model; pre-processing the user question and inputting it into the coarse ranking model, so as to extract question-answer pairs according to similarity in the expanded knowledge base; splicing the extracted question-answer pairs with the user question, and inputting them into the fine ranking model to obtain the confidence score of the question-answer pair; generating a judgment question through the question-answer pair, and inputting it into the question-answer large model to generate a judgment result of the question-answer pair; determining the question reply corresponding to the user question based on the confidence score of the question-answer pair and the judgment result.

[0008] Optionally, it also includes: generating sample data through conversation data with history fields; generating training data through sample data and general corpus data; training the natural language big model through the training data to generate a question-answering big model.

[0009] Optionally, generating sample data through conversation data with history fields includes: obtaining user questions and their corresponding question replies; obtaining historical conversation records of the questions; using the historical conversation records as history fields; and generating the sample data through user questions and question replies with history fields.

[0010] Optionally, generating training data using sample data and general corpus data includes: correcting misleading problems in the sample data using a classifier model; extracting sampling data from the general corpus data; and combining the sample data and the sampling data to generate the training data.

[0011] Optionally, an expanded knowledge base containing question-answer pairs is constructed based on the question-answer big model, including: obtaining initial question-answer pairs in the initial knowledge base; constructing an expanded template; combining each initial question-answer pair with the expanded template to generate an expanded question; inputting the expanded question into the question-answer big model to generate a question-answer pair for the initial question-answer pair.

[0012] Optionally, the user question is pre-processed and then input into the coarse-grained ranking model so as to extract question-answer pairs in the expanded knowledge base based on similarity, including: converting the questions in the question-answer pairs in the expanded knowledge base into question-answer vectors; converting the user question into a question vector; inputting the question vector into the coarse-grained ranking model; and extracting the question-answer pairs in the expanded knowledge base based on the similarity based on vector retrieval.

[0013] Optionally, the extracted question-answer pairs and the user questions are spliced ​​together and input into a refined ranking model to obtain a confidence score for the question-answer pairs, including: splicing the questions in the extracted question-answer pairs and the user questions to generate spliced ​​data; inputting the spliced ​​data into a refined ranking model; and the refined ranking model obtains a confidence score for the question-answer pairs through calculation.

[0014] Optionally, a judgment question is generated through the question-answer pair and input into the question-answer big model to generate a judgment result of the question-answer pair, including: constructing a judgment template; combining the question-answer pair and the judgment template to generate a judgment question; inputting the judgment question into the question-answer big model to generate a judgment result of the question-answer pair.

[0015] Optionally, the reply data corresponding to the user question is determined based on the confidence score and judgment result of the question-answer pair, including: comparing the confidence score with a preset confidence threshold; when the confidence score is higher than the confidence threshold, using the question-answer pair corresponding to the confidence score as the reply data corresponding to the user question; when the confidence scores are all lower than the confidence threshold, generating the reply data corresponding to the user question for the valid question-answer pair and the question-answer big model through a preset number of judgment results.

[0016] Optionally, response data corresponding to the user question is generated by using a preset number of valid question-answer pairs and a question-answer big model, including: arranging the question-answer pairs whose judgment results are valid from high to low according to their corresponding confidence scores; extracting a preset number of question-answer pairs from high to low based on the arrangement; generating an input question by splicing the preset number of question-answer pairs and the user question; inputting the input question into the question-answer big model to generate response data corresponding to the user question.

[0017] According to one aspect of the present application, a human-computer interaction device based on a large model is proposed, which includes: a knowledge base module for constructing an expanded knowledge base containing question-answer pairs based on a question-answer large model; a coarse sorting module for inputting user questions into the coarse sorting model after pre-processing, so as to extract question-answer pairs according to similarity in the expanded knowledge base; a fine sorting module for splicing the question-answer pairs and the user questions, and inputting them into the fine sorting model to obtain a confidence score of the question-answer pairs; a large model module for generating a judgment question through the question-answer pairs, and inputting them into the question-answer large model to generate a judgment result of the question-answer pair; a reply module for determining the question reply corresponding to the user question based on the confidence score of the question-answer pair and the judgment result.

[0018] According to one aspect of the present application, an electronic device is proposed, which includes: an OR processor; a storage device for storing an OR program; when the OR program is executed by the OR processor, the OR processor implements the method as described above.

[0019] According to one aspect of the present application, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described above is implemented.

[0020] According to the large-model-based human-computer interaction method, device, electronic device and computer-readable medium of the present application, an expanded knowledge base containing question-answer pairs is constructed according to the question-answer large model; user questions are pre-processed and then input into the coarse ranking model, so that question-answer pairs are extracted according to similarity in the expanded knowledge base; the question-answer pairs and the user questions are spliced ​​and input into the fine ranking model to obtain the confidence score of the question-answer pair; a judgment question is generated by the question-answer pair, and it is input into the question-answer large model to generate a judgment result of the question-answer pair; based on the confidence score of the question-answer pair and the judgment result, a method of answering the question corresponding to the user question is determined, which can combine the computational advantages of multiple machine learning models, accurately answer user questions in an anthropomorphic way, improve the accuracy of the response, and increase user satisfaction and usage experience.

[0021] It should be understood that the foregoing general description and the following detailed description are merely illustrative and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The above and other objects, features, and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the accompanying drawings. The drawings described below are merely some embodiments of the present application, and it is apparent to those skilled in the art that other drawings can be derived from these drawings without inventive effort.

[0023] Figure 1 The figure is a flowchart of a human-computer interaction method based on a large model according to an exemplary embodiment.

[0024] Figure 2 is a schematic diagram showing a large model-based human-computer interaction method according to another exemplary embodiment.

[0025] Figure 3 The figure is a flowchart of a human-computer interaction method based on a large model according to another exemplary embodiment.

[0026] Figure 4 The figure is a block diagram of a human-computer interaction device based on a large model according to an exemplary embodiment.

[0027] Figure 5The figure is a block diagram of a human-computer interaction device based on a large model according to another exemplary embodiment.

[0028] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0029] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. Like reference numerals in the drawings represent like or similar parts, and thus repetitive description thereof will be omitted.

[0030] Figure 1 FIG1 is a flowchart of a large-model-based human-computer interaction method according to an exemplary embodiment. The large-model-based human-computer interaction method 10 at least includes steps S102 to S108.

[0031] like Figure 1 As shown, in S102, an expanded knowledge base containing multiple question-answer pairs is constructed based on the question-answer model. The knowledge base can be constructed based on information such as product functions, features, models, etc., and multiple sets of question-answer pairs are set in the knowledge base. The form of the question-answer pair can be, for example:

[0032] Q: What is the power of XX product?

[0033] Answer: 2000W.

[0034] The original knowledge base is a set of question-and-answer pairs built for various product information. By analyzing user questions, new question-and-answer pairs can be extracted and added to the original knowledge base.

[0035] Furthermore, the question-answer pairs in the original knowledge base can be expanded through the question-answering big model to generate an expanded knowledge base containing more question-answer pairs.

[0036] Furthermore, the details of "building an extended knowledge base containing multiple question-answer pairs based on the question-answer model" will be discussed in Figure 4 The corresponding embodiments are described in detail.

[0037] In S104, the user question is pre-processed and then input into a coarse-grained ranking model, so that multiple question-answer pairs are extracted from the expanded knowledge base based on similarity. For example, the questions in the multiple question-answer pairs in the expanded knowledge base are converted into multiple question-answer vectors; the user question is converted into a question vector; the question vector is input into the coarse-grained ranking model; and the multiple question-answer pairs are extracted from the expanded knowledge base based on similarity using a vector search method.

[0038] In practical applications, all questions from the expanded knowledge base can be extracted in advance and converted into question-answer vectors using the vector-to-text conversion model described in this paper. For example, the text-to-vector conversion model can be the text2vec-large-chinese model. More specifically, the question-answer vectors corresponding to the questions in the question-answer pairs can be associated and stored in the expanded knowledge base with the corresponding questions and answers, allowing for direct access to the question-answer vectors later.

[0039] When receiving a user question, the user question is converted into a question vector in real time. More specifically, the user question can be converted into a question vector through a text vector conversion model.

[0040] Based on the question vector, vector retrieval is performed to compare the similarity between each question vector and the question-answer vectors of multiple question-answer pairs in the expanded knowledge base. After obtaining the similarity comparison results, the similarity comparison results between the question-answer vector and the question vector are sorted from highest to lowest. Based on pre-set parameters, the top N question-answer pairs in the knowledge base are extracted and returned as the top N question-answer pairs.

[0041] In S106, the multiple question-answer pairs and the user question are concatenated and input into a refined ranking model to obtain a confidence score for each question-answer pair. For example, the questions in the multiple question-answer pairs and the user question are concatenated to generate a plurality of concatenated data; the plurality of concatenated data are input into the refined ranking model; and the refined ranking model calculates a confidence score for each question-answer pair.

[0042] Coarse ranking is a module between recall and fine ranking. It retrieves tens of thousands of candidate items from recall and outputs hundreds or thousands of items for fine ranking, representing a typical trade-off between accuracy and performance. Fine ranking is a precise ranking process that assigns specific, precise scores to the candidate answers returned by the recall module of the question-answering system. These scores typically range from 0 to 1, with higher scores indicating a closer match between the candidate and the query. The goal of the fine ranking model is to assign higher scores to the most appropriate candidate answers and higher scores to candidate answers that match the query. If no candidate answers match the query at all, they are assigned lower scores, allowing subsequent modules to invoke appropriate fallback strategies.

[0043] In actual applications, the questions in the extracted TopN question-answer pairs can be concatenated with the user's questions, and the concatenated results can be input into the refined ranking model to obtain a confidence score.

[0044] In S108, judgment questions are generated from the multiple question-answer pairs and input into the question-answer macromodel to generate judgment results for each question-answer pair. For example, a judgment template may be constructed; each question-answer pair is combined with the judgment template to generate a judgment question; the judgment question is input into the question-answer macromodel to generate a judgment result for each question-answer pair.

[0045] The judgment template may be, for example, a prompt template, and the format of the judgment template may be "Judge whether the following content is correct." A judgment question may be generated by the judgment template. In the question-answer pair described above, the judgment question constructed may be, for example:

[0046] Determine whether the following is true:

[0047] “Q: What is the power of XX product?

[0048] A: The product power is 2000W.

[0049] A judgment question is input into the Q&A model, which responds according to the question's requirements. The response is either "yes" or "no," or similar answers such as "correct" or "incorrect." Another example is "valid" or "invalid." All judgment questions that are correct are considered valid question-answer pairs.

[0050] In S110, a response to the user's question is determined based on the confidence score and judgment result of each question-answer pair. For example, the confidence score can be compared with a preset confidence threshold; if the confidence score is higher than the confidence threshold, the question-answer pair corresponding to the confidence score is used as the response data corresponding to the user's question; if the confidence scores are all lower than the confidence threshold, the response data corresponding to the user's question is generated based on a preset number of judgment results for valid question-answer pairs and the question-answer macro model.

[0051] More specifically, the question-answer pairs judged to be valid can be arranged from high to low according to their corresponding confidence scores; a preset number of question-answer pairs can be extracted from high to low based on the arrangement; an input question can be generated by splicing the preset number of question-answer pairs and the user question; the input question can be input into the question-answer model to generate reply data corresponding to the user question.

[0052] like Figure 2As described above, the user's questions are initially screened using a coarse ranking model to obtain multiple question-answer pairs. These pairs are then input into a refined ranking model to obtain confidence scores. Question-answer pairs with confidence scores above a confidence threshold are directly returned to the user as return data. If there are no question-answer pairs with confidence scores above the confidence threshold, the multiple question-answer scores are input into the large question-answer model to determine whether they are correct or not, thereby obtaining a judgment result.

[0053] In a real-world application, a confidence threshold can be derived by combining precision and recall, typically set at 0.70. First, the confidence scores output by the refined ranking model are filtered, and the responses to the questions and answers in question-and-answer pairs with confidence scores greater than the confidence threshold are directly output as the response data.

[0054] In another practical application, when the confidence scores output by the refined ranking model are all less than the confidence threshold, response data corresponding to the user question can be generated through some question-answer pairs and the large question-answer model.

[0055] More specifically, multiple question-answer pairs can be sorted from high to low according to their corresponding confidence scores; some question-answer pairs are extracted based on this sorting order; the input question is generated by concatenating these partial question-answer pairs with the user question; and the input question is input into the question-answering model to generate response data corresponding to the user question. In other words, the question-answer pairs with relatively high confidence scores are used as reference answers and input into the question-answering model together with the user question to generate the final answer as the response to the user question.

[0056] In another scenario, the input question may be:

[0057] "You will be acting as an official customer service representative. Please answer users' questions based on the reference materials and relevant information provided. Ensure your answers are concise and clear, and do not add false or redundant information. If you cannot get the answer from the information, please answer the user's question directly in Chinese.

[0058] References:

[0059] {context}

[0060] The following is the user's request:

[0061] {question}".

[0062] Based on the splicing results, the final answer is generated as a response to the question.

[0063] According to the large-model-based human-computer interaction method of the present application, an expanded knowledge base containing multiple question-answer pairs is constructed based on the question-answer large model; the user questions are pre-processed and then input into the coarse ranking model, so as to extract multiple question-answer pairs according to similarity in the expanded knowledge base; the multiple question-answer pairs and the user questions are spliced ​​and input into the fine ranking model to obtain the confidence score of each question-answer pair; judgment questions are generated through the multiple question-answer pairs, and are input into the question-answer large model to generate the judgment result of each question-answer pair; the method of answering the question corresponding to the user question is determined based on the confidence score and judgment result of each question-answer pair, which can combine the computational advantages of multiple machine learning models, accurately answer user questions in an anthropomorphic way, improve the accuracy of the response, and increase user satisfaction.

[0064] It should be clearly understood that this application describes how to form and use specific examples, but the principles of this application are not limited to any details of these examples. On the contrary, based on the teaching of the content disclosed in this application, these principles can be applied to many other embodiments.

[0065] Figure 3 The figure is a flowchart of a human-computer interaction method based on a large model according to another exemplary embodiment. Figure 3 The process 30 shown is Figure 1 Supplemental description shown.

[0066] like Figure 3 As shown, in S302, sample data is generated from the conversation data with the history field. For example, the user question and its corresponding question reply are obtained; the historical conversation record of the question is obtained; the historical conversation record is used as the history field; and the sample data is generated from the user question and the question reply with the history field.

[0067] For example, training data can be generated based on enterprise micro-conversation data.

[0068] In the prior art, standard question-and-answer pairs in the knowledge base generally only focus on the current question, ignoring the user's historical conversation records. Therefore, in this application, a "history" field is added to the training data. The "history" field can store multiple records. For example, the "history" field can store the most recent 10 records related to the user. By introducing historical records through the "history" field, historical information can be incorporated into the current conversation. This allows the machine learning model to better learn contextual information during subsequent model training.

[0069] In S304, training data is generated from the sample data and the general corpus data. For example, misleading problems in the sample data can be corrected using a classifier model; sampling data can be extracted from the general corpus data; and the sample data and the sampling data can be combined to generate the training data.

[0070] Conversational data can also be cleaned to remove function-related question-and-answer pairs, such as those that require querying backend interfaces. This is because many responses in the training corpus are obtained by manually querying the backend system, but this system is not currently available for bots to use online. For example, a user might ask, "Can you help me apply for another XXXX?" Obviously, without backend system support, a bot cannot answer this question. In actual applications, regular expressions and keywords can be used to remove these responses.

[0071] In practical applications, a hallucination question classifier can also be trained. This classifier can identify misleading question-answer pairs (hallucination questions) and generate corresponding correct answers for these hallucination questions in order to correct incorrect questions and avoid mistakes in model training.

[0072] For example, a robot might easily respond with "yes" to a question like "Is it also the case for subsequent calculations? Calculated according to XXXX." However, the answer to this question should vary depending on the situation: some cases are yes, others are not. In practice, we would mark this type of data as "yes." We would also randomly sample some non-classified samples as global negative samples and mark them as "no." We then train a binary classifier.

[0073] The problem of catastrophic forgetting can be corrected by using general corpus. Catastrophic forgetting is a common problem in machine learning. In a conversation scenario, the model usually only responds well to questions similar to those in the training data, but it has a hard time answering questions that have not appeared in the training data. For example, the input "dizzy" is rarely seen in enterprise scenarios. If only the professional language of the field is trained, the model will easily forget general knowledge during the machine learning process. But this is very common in general corpus. Therefore, general corpus data is introduced in the training data of this application.

[0074] The general corpus data can be sampled at a certain ratio and combined with the sample data. More specifically, the ratio of the general corpus data to the sample data can be 1:1.

[0075] In S306, the natural language model is trained using the training data to generate a question-answering model. The natural language model may be, for example, a ChatGPT model.

[0076] ChatGPT (Chat Generative Pre-trained Transformer) is a chatbot program. ChatGPT is a natural language processing tool driven by artificial intelligence technology. It can generate answers based on the patterns and statistical laws seen in the pre-training phase. It can also interact according to the context of the chat and truly chat and communicate like a human.

[0077] Figure 4 The figure is a flowchart of a human-computer interaction method based on a large model according to another exemplary embodiment. Figure 4 The process 40 shown is for Figure 1 A detailed description of S102 "constructing an expanded knowledge base containing multiple question-answer pairs based on the question-answer big model" in the process shown.

[0078] like Figure 4 As shown, in S402, a plurality of initial question-answer pairs in the initial knowledge base are obtained.

[0079] In S404, an expansion template is constructed. The expansion template may be, for example, "Please generate 10 questions similar to the following questions."

[0080] In S406, each initial question-answer pair is combined with the expansion template to generate an expansion question. The expansion question may be in the following form:

[0081] Please generate 10 questions similar to the following:

[0082] “Q: What is the power of XX product?

[0083] A: The product power is 2000W.

[0084] In S408, the expanded question is input into the question-answering macromodel to generate multiple question-answer pairs for the initial question-answer pair. By inputting the expanded question into the question-answering macromodel, the question-answering macromodel uses natural language technology to construct multiple similar questions. These similar questions can simulate the user's speaking and writing habits, thereby enriching the question-answer pairs in the original knowledge base.

[0085] The newly constructed question-answer pair can be as follows:

[0086] Q: Does XX product consume a lot of electricity?

[0087] Answer: The product power is 2000W

[0088] Those skilled in the art will appreciate that all or part of the steps implementing the above embodiments can be implemented as a computer program executed by a CPU. When executed by the CPU, the computer program performs the functions defined in the above method provided herein. The program can be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk.

[0089] Furthermore, it should be noted that the aforementioned figures are merely illustrative of the processes included in the methods according to exemplary embodiments of the present application and are not intended to be limiting. It is readily understood that the processes illustrated in the aforementioned figures do not indicate or limit the temporal order of these processes. Furthermore, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0090] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0091] Figure 5 FIG. 1 is a block diagram of a human-computer interaction device based on a large model according to another exemplary embodiment. Figure 5 As shown, the large model-based human-computer interaction device 50 includes: a knowledge base module 502 , a rough sorting module 504 , a fine sorting module 506 , a large model module 508 , and a reply module 510 . The large model-based human-computer interaction device 50 may also include: a training module 512 .

[0092] The knowledge base module 502 is used to construct an expanded knowledge base containing multiple question-answer pairs based on the question-answer big model; the knowledge base module 502 is also used to obtain multiple initial question-answer pairs in the initial knowledge base; construct an expanded template; combine each initial question-answer pair with the expanded template to generate an expanded question; input the expanded question into the question-answer big model to generate multiple question-answer pairs for the expanded question-answer pair.

[0093] The coarse sorting module 504 is used to pre-process the user questions and then input them into the coarse sorting model, so as to extract multiple question-answer pairs in the expanded knowledge base according to similarity; the coarse sorting module 504 is also used to convert the questions in the multiple question-answer pairs in the expanded knowledge base into multiple question-answer vectors; convert the user questions into question vectors; input the question vectors into the coarse sorting model; and extract the multiple question-answer pairs in the expanded knowledge base according to the similarity based on the vector retrieval method.

[0094] The refined ranking module 506 is used to splice the multiple question-answer pairs and the user questions, and input them into the refined ranking model to obtain the confidence score of each question-answer pair; the refined ranking module 506 is also used to splice the questions in the multiple question-answer pairs and the user questions to generate multiple spliced ​​data; input the multiple spliced ​​data into the refined ranking model; the refined ranking model obtains the confidence score of each question-answer pair through calculation.

[0095] The large model module 508 is used to generate judgment questions through the multiple question-answer pairs, and input them into the question-answer large model to generate a judgment result for each question-answer pair; the large model module 508 is also used to construct a judgment template; combine each question-answer pair with the judgment template to generate a judgment question; input the judgment question into the question-answer large model to generate a judgment result for each question-answer pair.

[0096] The response module 510 is used to determine the response to the user question based on the confidence score and judgment result of each question-answer pair. The response module 510 is also used to compare the confidence score with a preset confidence threshold; when the confidence score is higher than the confidence threshold, the question-answer pair corresponding to the confidence score is used as the response data corresponding to the user question; when the confidence scores are all lower than the confidence threshold, the response data corresponding to the user question is generated based on a preset number of judgment results for valid question-answer pairs and the question-answer macro model.

[0097] The training module 512 is used to generate sample data through conversation data with history fields; generate training data through sample data and general corpus data; and train the natural language model through the training data to generate a question-answering model.

[0098] According to the large-model-based human-computer interaction device of the present application, an expanded knowledge base containing multiple question-answer pairs is constructed based on the question-answer large model; the user question is pre-processed and then input into the coarse ranking model, so as to extract multiple question-answer pairs according to similarity in the expanded knowledge base; the multiple question-answer pairs and the user question are spliced ​​and input into the fine ranking model to obtain the confidence score of each question-answer pair; judgment questions are generated through the multiple question-answer pairs, and are input into the question-answer large model to generate the judgment result of each question-answer pair; the method of answering the question corresponding to the user question is determined based on the confidence score and judgment result of each question-answer pair, which can combine the computational advantages of multiple machine learning models, accurately answer user questions in an anthropomorphic way, improve the accuracy of the response, and increase user satisfaction.

[0099] like Figure 6As shown, an embodiment of the present application provides an electronic device, including a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other through the communication bus 640;

[0100] Memory 630, for storing computer programs;

[0101] The processor 610 is configured to implement the large model-based human-computer interaction method of any of the above embodiments when executing the program stored in the memory 630 .

[0102] The communication interface 620 is used for communication between the electronic device and other devices.

[0103] The memory 630 may include a random access memory 630 (RAM) or a non-volatile memory 630, such as at least one disk storage 630. Alternatively, the memory 630 may be at least one storage device located away from the processor 610.

[0104] The embodiment of the present application provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the human-computer interaction method based on the large model of any of the above embodiments. For example, an expanded knowledge base containing multiple question-answer pairs can be constructed based on the question-answer large model; the user question is pre-processed and then input into the coarse sorting model to extract multiple question-answer pairs based on similarity in the expanded knowledge base; the multiple question-answer pairs and the user question are spliced ​​and input into the fine sorting model to obtain the confidence score of each question-answer pair; a judgment question is generated based on the multiple question-answer pairs, and it is input into the question-answer large model to generate a judgment result for each question-answer pair; the question reply corresponding to the user question is determined based on the confidence score and judgment result of each question-answer pair. For example, sample data can be generated through conversation data with a history field; training data can be generated through sample data and general corpus data; the natural language large model is trained through the training data to generate a question-answer large model.

[0105] While the exemplary embodiments of the present application have been specifically illustrated and described above, it should be understood that the present application is not limited to the detailed structures, configurations, or implementations described herein; rather, the present application is intended to encompass various modifications and equivalent configurations within the spirit and scope of the appended claims.

Claims

1. A human-computer interaction method based on a large model, characterized in that: include: Build an expanded knowledge base containing question-answer pairs based on the question-answer model; After pre-processing, the user question is input into the coarse sorting model so as to extract question-answer pairs based on similarity in the expanded knowledge base; The extracted question-answer pairs are concatenated with the user questions and input into the refined ranking model to obtain the confidence score of the question-answer pairs; Generate a judgment question through the question-answer pair, and input it into the question-answer big model to generate a judgment result of the question-answer pair; The question reply corresponding to the user question is determined based on the confidence score of the question-answer pair and the judgment result.

2. The method according to claim 1, wherein Based on the large question-answer model, an expanded knowledge base containing question-answer pairs is constructed, including: Obtain initial question-answer pairs from the initial knowledge base; Build expansion templates; Combining each initial question-answer pair with the expanded template to generate an expanded question; The expansion question is input into the large question-answer model to generate a question-answer pair for the initial question-answer pair.

3. The method according to claim 1, wherein After pre-processing, the user questions are input into the coarse sorting model to extract question-answer pairs based on similarity in the expanded knowledge base, including: Converting questions in question-answer pairs in the expanded knowledge base into question-answer vectors; Convert the user question into a question vector; Inputting the problem vector into the coarse sorting model; Based on a vector retrieval method, the question-answer pairs are extracted from the expanded knowledge base according to the similarity.

4. The method according to claim 1, wherein The extracted question-answer pairs are concatenated with the user questions and input into the refined ranking model to obtain the confidence scores of the question-answer pairs, including: Splicing the questions in the extracted question-answer pairs with the user questions to generate spliced ​​data; Inputting the spliced ​​data into a refined arrangement model; The refined ranking model calculates the confidence score of the question-answer pair.

5. The method according to claim 1, wherein The judgment question is generated by the question-answer pair and input into the question-answer big model to generate the judgment result of the question-answer pair, including: Build a judgment template; combining the question-answer pair with the judgment template to generate a judgment question; The judgment question is input into the question-answering model to generate a judgment result of the question-answer pair.

6. The method according to claim 1, wherein Determining the response data corresponding to the user question based on the confidence score of the question-answer pair and the judgment result includes: Comparing the confidence score with a preset confidence threshold; When the confidence score is higher than the confidence threshold, the question-answer pair corresponding to the confidence score is used as the response data corresponding to the user question; When the confidence scores are all lower than the confidence threshold, a preset number of judgment results are used to generate response data corresponding to the user question for valid question-answer pairs and the question-answer model.

7. The method according to claim 6, wherein Generate response data corresponding to the user's question based on a preset number of judgment results for valid question-answer pairs and the question-answer model, including: Arrange the question-answer pairs that are judged to be valid from high to low according to their corresponding confidence scores; Extracting a preset number of question-answer pairs according to the arrangement from high to low; Generate an input question by splicing the preset number of question-answer pairs and the user question; The input question is input into the question-answering model to generate response data corresponding to the user question.

8. The method according to claim 1, wherein Also includes: Generate sample data through conversation data with history fields; Generate training data through sample data and general corpus data; The natural language model is trained using training data to generate a large question-answering model.

9. The method according to claim 8, wherein Generate sample data from conversation data with history fields, including: Get user questions and their corresponding responses; Obtain historical conversation records of the issue; Using the historical conversation record as a history field; The sample data is generated through user questions and responses with a history field.

10. The method according to claim 8, wherein Generate training data through sample data and general corpus data, including: Correcting misleading issues in the sample data using a classifier model; Extract sampling data from general corpus data; The sample data and the sampling data are combined to generate the training data.

11. A human-computer interaction device based on a large model, characterized in that: include: The knowledge base module is used to build an expanded knowledge base containing question-answer pairs based on the question-answer model; A coarse sorting module is used to pre-process user questions and then input them into a coarse sorting model, so as to extract question-answer pairs based on similarity in the expanded knowledge base; A refined ranking module, configured to concatenate the question-answer pair and the user question, and input the concatenated pair into a refined ranking model to obtain a confidence score for the question-answer pair; A large model module is used to generate judgment questions based on the question-answer pairs, and input the questions into the large question-answer model to generate judgment results for the question-answer pairs; The reply module is used to determine the reply corresponding to the user's question based on the confidence score of the question-answer pair and the judgment result.

12. An electronic device, characterized in that: include: an or processor; a storage device for storing a program; When the program is executed by the processor, the processor implements the method according to any one of claims 1 to 10.

13. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.