Response method and device, equipment and storage medium

By performing knowledge base judgment and feedback correction mechanism before the generative model, the illusion problem of the generative model in intelligent question and answer is solved, the accuracy of the response and the efficiency of resource utilization are improved, and the reliability of the output is ensured.

CN118708776APending Publication Date: 2024-09-27THE FOURTH PARADIGM BEIJING TECH CO LTD

Patent Information

Application Number
CN202310981218.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-04
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

Generative models have hallucination problems in intelligent question answering, resulting in inaccurate output results, and the accuracy of the improved model is limited by its black-box nature and the uncertainty of the fine-tuning scheme, resulting in poor performance.

Method used

After the user inputs the question information, it is first judged whether the knowledge base can satisfy the question information. If it is satisfied, the generative model is used to generate the response information; if it is not satisfied, the prompt information is output or the response information is obtained through manual annotation, and the feedback and correction mechanism is used. Improve model performance.

Benefits of technology

While reducing the unreliable answers output by the model, it saves computing resources and power consumption, improves the accuracy and reliability of the responses, and avoids the erroneous output of the generative model in unknown situations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708776A
    Figure CN118708776A
Patent Text Reader

Abstract

The invention relates to a response method and device, equipment and a storage medium. Responding to questioning information input by the user, and judging whether the knowledge base can meet the questioning information or not; and in response to the judgment result that the knowledge base can meet the questioning information, generating first response information for the questioning information by utilizing a first generative model based on the questioning information and the knowledge base, and outputting the first response information. Therefore, in response to the question information input by the user, the method does not directly utilize the generative model to generate the response information aiming at the question information, but firstly judges whether the knowledge base can meet the question information or not, and then utilizes the generative model to generate the response information aiming at the question information under the condition that the knowledge base can meet the question information. Therefore, while unreliable answers output by the model are reduced, computing power resources can be greatly saved, and power consumption can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a response method, device, equipment and storage medium. Background Art

[0002] With the promotion and application of intelligent question and answer in various fields, intelligent question and answer technology has attracted much attention.

[0003] Intelligent question answering is generally achieved by training a generative model using preset data, and then the trained generative model processes the question data to directly output the results.

[0004] A major flaw of generative models is their hallucination problem, which means that they may output content that is inconsistent with the facts. This means that although generative models can interact in natural language and output answers in real time, they cannot guarantee the accuracy of the output results.

[0005] Due to the black-box nature of the generative model itself, it is very difficult to correct the erroneous output of the generative model, which makes it very difficult to improve the accuracy of the model. For example, traditional model fine-tuning solutions will improve the performance of some specific scenarios, but at the same time may cause the performance of other scenarios to deteriorate.

[0006] Therefore, how to improve the poor performance and output hallucination problems of generative models is a technical problem that needs to be solved urgently. Summary of the invention

[0007] A technical problem to be solved by the present disclosure is how to improve the problem of poor performance and output hallucination of generative models.

[0008] According to the first aspect of the present disclosure, a response method is provided, including: in response to question information input by a user, determining whether a knowledge base can satisfy the question information; in response to a determination result that the knowledge base can satisfy the question information, based on the question information and the knowledge base, using a first generative model, generating first response information for the question information, and outputting the first response information.

[0009] Optionally, the method also includes: in response to a determination that the knowledge base cannot satisfy the question information, outputting a first prompt information and / or a second prompt information, wherein the first prompt information is used to prompt that the knowledge base information is insufficient, and the second prompt information is used to prompt that a second response information of the question information will be obtained through manual annotation.

[0010] Optionally, determining whether the knowledge base can satisfy the question information includes: determining whether the knowledge base can satisfy the question information based on a first preset rule; and / or determining whether the knowledge base can satisfy the question information using a first prediction model, wherein the first prediction model is a binary classification model created for the knowledge base, the input of the first prediction model is the question information, and the output of the first prediction model is a probability value used to characterize that the knowledge base can satisfy the question information; and / or determining whether the knowledge base can satisfy the question information using a second generative model, the parameter amount of the second generative model being smaller than that of the first generative model.

[0011] Optionally, the knowledge base includes a first knowledge base and a second knowledge base, and the method further includes: in response to receiving evaluation information characterizing a negative evaluation fed back by a user in response to the first response information, generating correction information for the first response information; and adding the correction information to the second knowledge base.

[0012] Optionally, the correction information includes: a standard answer to the question information; and / or a standard processing flow for the question information; and / or an information reference range when the first generative model generates response information for the question information.

[0013] Optionally, based on the question information and the knowledge base, a first generative model is used to generate first response information for the question information, including: searching the second knowledge base for information related to the question information; in response to finding information related to the question information, based on the question information and the found information, using the first generative model to generate first response information for the question information; in response to not finding information related to the question information, based on the question information and the first knowledge base, using the first generative model to generate first response information for the question information.

[0014] Optionally, based on the question information and the knowledge base, a first generative model is used to generate first response information for the question information, including: performing correlation matching on the question information and the information in the knowledge base to obtain at least part of the candidate information; selecting a target usage policy from a pre-set usage policy set, the target usage policy being used to indicate a range of information in the at least part of the candidate information that the first generative model needs to refer to; based on the question information, the at least part of the candidate information and the target usage policy, the first generative model is used to generate first response information for the question information.

[0015] Optionally, selecting a target usage strategy from a preset set of usage strategies includes: selecting a target usage strategy from a preset set of usage strategies based on a second preset rule; inputting the question information and at least part of the candidate information into a second prediction model, obtaining a probability distribution output by the second prediction model to characterize that each usage strategy in the preset set of usage strategies is suitable as a target usage strategy, and determining the target usage strategy based on the probability distribution; based on the question information and at least part of the candidate information, generating the target usage strategy using a third generative model, the parameter amount of the third generative model being smaller than that of the first generative model.

[0016] Optionally, based on the question information, the at least part of the candidate information and the target usage strategy, the first generative model is used to generate first response information for the question information, including: based on the question information, the at least part of the candidate information and the target usage strategy, generating input information of the first generative model; inputting the input information into the first generative model to obtain response information generated by the first generative model.

[0017] According to the second aspect of the present disclosure, a response device is provided, including: a judgment module, used to judge whether the knowledge base can satisfy the question information in response to the question information input by the user; a first generation module, used to generate first response information for the question information based on the question information and the knowledge base using a first generative model in response to a judgment result that the knowledge base can satisfy the question information; and an output module, used to output the first response information.

[0018] Optionally, the output module outputs a first prompt message and / or a second prompt message in response to a determination that the knowledge base cannot satisfy the question information, wherein the first prompt message is used to prompt that the knowledge base information is insufficient, and the second prompt message is used to prompt that a second response information to the question information will be obtained through manual annotation.

[0019] Optionally, the judgment module judges whether the knowledge base can satisfy the question information based on a first preset rule; and / or the judgment module uses a first prediction model to judge whether the knowledge base can satisfy the question information, wherein the first prediction model is a binary classification model created for the knowledge base, the input of the first prediction model is the question information, and the output of the first prediction model is a probability value used to characterize that the knowledge base can satisfy the question information; and / or the judgment module uses a second generative model to judge whether the knowledge base can satisfy the question information, and the parameter amount of the second generative model is smaller than that of the first generative model.

[0020] Optionally, the knowledge base includes a first knowledge base and a second knowledge base, and the device also includes: a second generation module, used to generate correction information for the first response information in response to receiving evaluation information characterizing a negative evaluation fed back by a user for the first response information; and an adding module, used to add the correction information to the second knowledge base.

[0021] Optionally, the correction information includes: a standard answer to the question information; and / or a standard processing flow for the question information; and / or an information reference range when the first generative model generates response information for the question information.

[0022] Optionally, the first generation module searches for information related to the question information in the second knowledge base; in response to finding information related to the question information, the first generation module generates first response information for the question information based on the question information and the found information using the first generative model; in response to not finding information related to the question information, the first generation module generates first response information for the question information based on the question information and the first knowledge base using the first generative model.

[0023] Optionally, the first generation module includes: a matching module, used to match the question information with the information in the knowledge base for relevance to obtain at least part of the candidate information; a selection module, used to select a target usage strategy from a pre-set set of usage strategies, the target usage strategy being used to indicate a range of information in the at least part of the candidate information that the first generative model needs to refer to; a generation sub-module, used to generate first response information for the question information using the first generative model based on the question information, the at least part of the candidate information and the target usage strategy.

[0024] Optionally, the selection module selects a target usage strategy from a preset usage strategy set based on a second preset rule; the selection module inputs the question information and at least part of the candidate information into a second prediction model, obtains the probability distribution output by the second prediction model to characterize that each usage strategy in the preset usage strategy set is suitable as a target usage strategy, and determines the target usage strategy based on the probability distribution; the selection module generates the target usage strategy based on the question information and at least part of the candidate information using a third generative model, and the parameter amount of the third generative model is smaller than that of the first generative model.

[0025] Optionally, the generation submodule generates input information of the first generative model based on the question information, the at least part of the candidate information and the target usage strategy, inputs the input information into the first generative model, and obtains response information generated by the first generative model.

[0026] According to a third aspect of the present disclosure, a computing device is provided, comprising: a processor; and a memory on which executable codes are stored, and when the executable codes are executed by the processor, the processor executes the method described in the first aspect above.

[0027] According to a fourth aspect of the present disclosure, a computer program product is provided, comprising an executable code, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as described in the first aspect above.

[0028] According to a fifth aspect of the present disclosure, a non-transitory machine-readable storage medium is provided, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor executes the method described in the first aspect above.

[0029] Therefore, in response to the question information input by the user, the present disclosure does not directly use the generative model to generate the answer information for the question information, but first determines whether the knowledge base can satisfy the question information, and then uses the generative model to generate the answer information for the question information when the knowledge base can satisfy the question information. In this way, while reducing the unreliable answers output by the model, it can greatly save computing resources and reduce power consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components in the exemplary embodiments of the present disclosure.

[0031] Figure 1 A schematic flow chart of a response method according to an embodiment of the present disclosure is shown.

[0032] Figure 2 A schematic structural diagram of a response device according to an embodiment of the present disclosure is shown.

[0033] Figure 3 A schematic diagram of the structure of a computing device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0034] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0035] The present disclosure provides a response method, which can be applied to any scenario where a response to a question is required.

[0036] Exemplarily, the method provided by the present disclosure can be applied to an intelligent answering scenario, and in this scenario, answers and replies are given to questions raised by users, for example, intelligent customer service scenarios, answering assistant services (or applications, applets, etc.) within an enterprise; in addition, the method provided by the present disclosure can also be applied to an intelligent retrieval scenario, and in this scenario, responsive retrieval feedback is given to questions raised by users, for example, this solution can be applied to a search engine or service system. Exemplarily, the method provided by the present disclosure can also be applied to a teaching scenario, in which a user can use a question as question information, and the method provided by the present disclosure can be used to generate a solution to the question to answer the user. Exemplarily, the method provided by the present disclosure can be applied to serious question-and-answer scenarios that require high accuracy of the question-and-answer results, such as enterprise information query scenarios. This is not exhaustive.

[0037] In order to improve the problem of poor performance and output hallucinations of generative models, the present disclosure proposes that after the user inputs the question information, the generative model is not directly used to generate the response information for the question information, but it is first determined whether the knowledge base can satisfy the question information. When the result of the determination is that the knowledge base can satisfy the question information, the generative model is used to generate the response information for the question information; conversely, when the result of the determination is that the knowledge base cannot satisfy the question information, the generative model is refused to be used for answering. In this way, the generative model can achieve "knowing what it knows and not knowing what it does not know", which can greatly save computing resources and reduce electricity consumption while reducing the output of unreliable answers by the model.

[0038] Considering that after the generative model has selected candidate information to refer to in the knowledge base, the generative model may still work outside the candidate information, or the range of candidate information selected is too narrow or too wide. In response to this problem, the present disclosure proposes that after matching the candidate information, the candidate information can be further processed in combination with the question information to determine the model's use strategy for the candidate information, such as whether to dig deep into one or several key contents, or to include as many reference contents as possible to comprehensively generate responses with wider coverage, thereby significantly improving the content pertinence and reliability of subsequent generation links.

[0039] Taking into account that the response information output by the generative model may not properly meet the user's request (including but not limited to incorrect reference content, missing content, misunderstanding of intent, factual errors, etc.), the present disclosure also proposes a complete feedback and correction mechanism, which can quickly improve the performance of the generative model under such requests and will not affect the performance of the model for other requests.

[0040] The details of the present disclosure are further described below in conjunction with the accompanying drawings.

[0041] Figure 1 A schematic flow chart of a response method according to an embodiment of the present disclosure is shown. Figure 1 The method shown can be implemented in software via a computer program, and can also be executed via a specifically configured computing device.

[0042] As an example, Figure 1 The method shown can be executed by a question-answering system, which can include a terminal and a server. The terminal and the server provide answering services to users through data interaction. Figure 1 The part of the method shown that involves interaction with the user front end (such as input of question information and output of response information) can be executed on the terminal, and the part involving data processing (such as judgment operation and generation process of response information) can be executed on the server.

[0043] See also Figure 1 In step S110, in response to the question information input by the user, it is determined whether the knowledge base can satisfy the question information.

[0044] The present disclosure has no particular restrictions on the form of expression of question information and the input method of question information. Based on the different application scenarios of the technical solution provided by the present disclosure, question information can be obtained in different ways. Exemplarily, the form of question information can include but is not limited to: text form, audio form, image form, video form, etc., without exhaustive enumeration.

[0045] Exemplarily, a question control can be displayed on the display interface of the terminal, so that the user can input question information by triggering the question control, that is, the question information can be obtained based on the data input by the user when triggering the question control. Exemplarily, the question control can be displayed on any display interface of the electronic device, that is, the technical solution provided by the present disclosure can be applied to any human-computer interaction scenario; or, the question control can be displayed only on a specified interface, such as a preset question-and-answer interface. The present disclosure has no special restrictions on the type of display interface and the way in which the question control is displayed. The display interface may include but is not limited to at least one of the following: an application interface, a desktop display interface, a web browsing interface, a document display interface, etc., and the question control display method can be custom designed, for example, it can be displayed in the sidebar of the application interface, or it can be displayed in the taskbar of the desktop, etc., without exhausting them.

[0046] In one possible embodiment, the user can input question information in text form by triggering a text question control, that is, the text data input by the user when triggering the text question control can be obtained to obtain the question information. Alternatively, in another possible embodiment, the user can input question information in voice form by triggering a voice question control, that is, the voice data input by the user when triggering the voice question control can be obtained to obtain the question information. Alternatively, in another possible embodiment, the user can input image data by triggering an image question control, in which case the image data input by the user when triggering the image question control can be obtained, and the image data can be parsed to obtain the question information. Alternatively, in another possible embodiment, the user can input video data by triggering an image question control, in which case the video data input by the user when triggering the video question control can be obtained, and the questions contained in the video data or the specified questions can be parsed to obtain the question information.

[0047] In each of the above possible embodiments, the question control can have different forms of expression. Exemplarily, it can be expressed in the form of an electronic device input box, a voice input button, a picture or video upload (or screenshot) area, etc. It should be understood that when the question information is in audio form, the terminal or the external device of the terminal needs to have audio collection capabilities. In this way, the aforementioned question information can be collected by the terminal itself, or it can be collected through an external input device. For example, when the terminal is connected to a smart wearable device such as a headset or a smart watch with audio collection capabilities, the question information raised by the user can be collected by the smart wearable device.

[0048] Similarly, when the question information is in the form of a video or picture, the terminal (or backend server) needs to have the ability to parse the video (or picture) to parse the user's question information, and the parsing method is not limited here.

[0049] In addition, in an optional embodiment, in order to facilitate subsequent processing, when the user inputs non-text question information, the question information can also be processed into text to obtain text-based question information.

[0050] The first generative model can refer to the knowledge base to generate response information for the question information. The knowledge base can limit the "free play" of the first generative model in generating response information, and to a certain extent improve the illusion problem existing in the first generative model. The information in the knowledge base can also be called knowledge or data, and the knowledge base can also be called a data base.

[0051] The knowledge base may include at least one of the following: a public knowledge base and a private knowledge base. The scope of the knowledge base can be customized. A public knowledge base refers to a data set within the public scope, which may include but is not limited to at least one of the following: public web pages, public data sets, public information, etc., without exhaustive list. Accordingly, a private knowledge base refers to a data set within the private scope, which may include but is not limited to at least one of the following: process documents, product information, communication data, customer data, sales data, financial data, human resources data, etc., without exhaustive list.

[0052] For example, a common private knowledge base may be a private knowledge base within an enterprise (or a school or family within a preset scope). These data are generally circulated within the enterprise to support the operation or business promotion of the enterprise. Taking the private knowledge base of an enterprise as an example, the process documents may involve at least one of the following: documents related to the approval process, documents related to the acceptance process, documents related to the product release process, etc.; and product information may include but is not limited to at least one of the following: product introduction information, product code, product acceptance information, product pictures, product patent information, etc., which cannot be exhaustive; and communication data may include but is not limited to: emails, chat software communication records or screenshots, meeting minutes, meeting screen recordings, etc., which cannot be exhaustive.

[0053] Exemplarily, when the knowledge base is a private knowledge base, the response scheme provided by the present disclosure can be used to achieve a rapid response to the private knowledge base, which is conducive to efficiently acquiring any data within the private knowledge base and improving data utilization efficiency. Therefore, the present disclosure can be applied to enterprise-level scenarios, using the private knowledge base within the enterprise to acquire, organize and analyze internal information, which can greatly improve the efficiency of knowledge acquisition and utilization.

[0054] The first generative model is a generative model including a large number of parameters built using machine learning technology, such as a large model.

[0055] The input of the first generative model can be unimodal data (such as one of text, image, audio, and video), or multimodal data (such as at least two of text, image, audio, and video); the output of the first generative model can be unimodal data or multimodal data. In other words, the first generative model can support the processing of one or more modal data to generate one or more modal data. For example, the first generative model can be a large model with multimodal data processing capabilities and multimodal data generation capabilities.

[0056] In the present disclosure, the first generative model can adopt a generative model commonly used in the industry, and of course, a new generative model can also be trained. In addition, it should be noted that considering the high overhead (time overhead and cost overhead) of training a new model, the first generative model can be obtained by fine-tuning the general model, that is, the general model can be adjusted based on the existing general model according to the feature processing scale and computing power requirements, so as to obtain the first generative model used in the present disclosure. This can effectively reduce the model training overhead.

[0057] The first generative model generates response information by referring to the information in the knowledge base. Therefore, judging whether the knowledge base can satisfy the question information is to judge whether the first generative model can obtain enough information from the knowledge base to satisfy the user's request, that is, to judge whether the first generative model is available for the question information.

[0058] As an example, any one or more combinations of the following three methods may be used, but are not limited to, to determine whether the knowledge base can satisfy the question information.

[0059] Method 1: Judgment based on preset rules

[0060] It can be determined whether the knowledge base can satisfy the question information based on the first preset rule.

[0061] The first preset rule may be a preset judgment rule.

[0062] For example, the first preset rule may be configured to determine whether the knowledge base can satisfy the question information by determining whether the question information matches the keywords set for the knowledge base. Thus, based on the first preset rule, it is possible to determine whether the knowledge base can satisfy the question information by calculating the correlation or matching degree between the question information and the keywords. For example, if the calculated correlation or matching degree is poor (e.g., lower than a preset threshold), it may be determined that the knowledge base cannot satisfy the question information.

[0063] When calculating the relevance or matching degree between the question information and the keyword, any means capable of evaluating the relevance or matching degree between the question information and the keyword can be used. For example, the distance between the character string of the question information and the character string of the keyword (such as Levenshtein distance) can be calculated, and the relevance or matching degree between the question information and the keyword is determined based on the calculated distance. Among them, the relevance or matching degree is positively correlated with the distance. For another example, the question information and the keyword can be vectorized respectively, and the similarity between the vectorized representation of the question information and the vectorized representation of the keyword (such as cosine similarity) can be calculated, and the relevance or matching degree between the question information and the keyword can be determined based on the calculated similarity. Among them, the relevance or matching degree is positively correlated with the similarity.

[0064] Method 2: Judgment based on traditional artificial intelligence recognition model

[0065] The first prediction model can be used to determine whether the knowledge base can satisfy the question information.

[0066] The first prediction model is a traditional artificial intelligence recognition model, such as a binary classification model created for a knowledge base. As an example, the first prediction model may be, but is not limited to, a binary classification model obtained by fine-tuning BERT.

[0067] The input of the first prediction model may be question information. The output of the first prediction model may be a probability value used to represent that the knowledge base can satisfy the question information, or may be a probability value used to represent that the knowledge base cannot satisfy the question information.

[0068] The question information is input into the first prediction model, and according to the output of the first prediction model (ie, the probability value), it can be determined whether the knowledge base can satisfy the question information.

[0069] Method 3: Judgment based on small-scale generative models

[0070] The second generative model can be used to determine whether the knowledge base can satisfy the question information.

[0071] The second generative model is a small-scale generative model, and its parameter quantity is smaller (e.g., much smaller) than that of the first generative model. When the second generative model is used for judgment, input information can be generated based on the question information and the knowledge base, for example, input information such as, but not limited to, "please judge whether the knowledge base can satisfy the question information" can be generated, and then the input information can be input into the second generative model, and the judgment result can be obtained according to the output of the second generative model.

[0072] The characteristics of the above three judgment methods are that they do not involve the retrieval of information in the knowledge base, and they are time-consuming, so they can better meet the real-time requirements, and the judgment methods are simple and resource consumption is low.

[0073] In step S120, in response to the determination that the knowledge base can satisfy the question information, first response information for the question information is generated based on the question information and the knowledge base using a first generative model, and the first response information is output.

[0074] If the judgment result is that the knowledge base can satisfy the question information, it means that there is data in the knowledge base that can satisfy the question information, and the first generative model will refer to the information in the knowledge base when generating the response information. Therefore, it can be considered that the first generative model has a certain reliability for the current question information, that is, the first generative model knows the answer to the question information, the first generative model is available for the current question information, and the first generative model can be used to generate the first response information for the question information.

[0075] On the contrary, if the judgment result is that the knowledge base cannot satisfy the question information, it means that there is no information in the knowledge base that can satisfy the question information, and the first generative model cannot generate more reliable response information by referring to the knowledge base. Therefore, it can be considered that the first generative model is not reliable for the current question information, that is, the first generative model does not know the answer to the question information, and the first generative model is unavailable for the current question information. Therefore, it can be refused to use the first generative model to generate the first response information for the question information.

[0076] Therefore, the present disclosure can generate the first response information for the question information using the first generative model only when the judgment result is that the knowledge base can satisfy the question information.

[0077] Exemplarily, the question information and the knowledge base (or at least part of the information in the knowledge base) can be used as inputs to the text generation model. In fact, the instructions input to the generative model can be "please read the knowledge base and then answer the question information", "please read the knowledge in the knowledge base and then answer the question information". After receiving the input, the generative model will perform calculations according to the instructions to output the processing results. The processing results can be directly output to the user as the first response information, or the processing results can be further processed to form the first response information and output to the user. Specifically, the first response information can include response text, one or more of images, videos, and audio.

[0078] In the case where the result of the determination is that the knowledge base cannot satisfy the question information, the response information for the question information can be obtained by manual annotation. For example, the question information can be organized into tasks that need to be manually processed and sent to one or more clients. Each client can correspond to a human expert. The human expert can answer the question information through the client and generate second response information for the question information. The present disclosure can also receive the second response information sent by the client and output the second response information.

[0079] The present disclosure may output prompt information for indicating the information source of the response information while outputting the response information (including the first response information and the second response information).

[0080] Outputting response information means outputting response information to the user in a manner that can be perceived by the user. The present disclosure does not impose strict restrictions on the output method of response information and prompt information. For example, the response information and prompt information can be output in the form of, but not limited to, text, voice, image, or video.

[0081] It should be noted that step S110 can be regarded as a preliminary determination step. The characteristics of step S110 are fast processing speed and certain accuracy, but the determination result of step S110 may not be 100% accurate.

[0082] That is, when the determination result is that the knowledge base can satisfy the question information, the first response information obtained by executing step S120 may still not satisfy the user's demands, that is, the user may not be satisfied with the first response information.

[0083] In response to such situations, the present disclosure has designed the following complete feedback and correction mechanism.

[0084] Evaluation information fed back by the user for the first response information may be received. The received evaluation information may be a positive evaluation or a negative evaluation. In response to receiving the evaluation information used to characterize the negative evaluation fed back by the user for the first response information, correction information for the first response information may be generated (i.e., obtained). The correction information may be obtained by manual annotation. For example, the question information and the first response information may be sent in the form of a task to a terminal used by relevant human experts, and the relevant human experts may generate highly reliable correction information based on their own professional knowledge. The correction information may include, but is not limited to, one or more combinations: a standard answer to the question information; a standard processing procedure for the question information; and an information reference range when the first generative model generates the response information for the question information.

[0085] The present disclosure may also maintain a knowledge base specifically used to store correction information. After the correction information is obtained, the correction information may be added to the knowledge base. For the sake of distinction, the knowledge base may be referred to as a second knowledge base. For the correction information that belongs to the standard answer, the standard answer and the question information may be stored in the second knowledge base in the form of a FAQ library.

[0086] Therefore, the present disclosure involves two knowledge bases, namely, a first knowledge base and a second knowledge base. The first knowledge base can be a knowledge base created based on public knowledge and / or private knowledge, such as a database of an enterprise itself. The second knowledge base is a knowledge base accumulated based on correction information, such as a database of an editing and review system.

[0087] Since the second knowledge base contains information for this type of question information (such as standard answers, standard processing procedures, information reference range (i.e. data focus), etc.), when faced with similar question information in the future, response information that meets the user's request can be obtained. In other words, through the feedback and correction mechanism, the performance that the user is not satisfied with can be corrected in a short time, and this mechanism does not involve retraining or fine-tuning of the underlying model, and thus does not affect the performance of the model in other scenarios.

[0088] There may be a predetermined priority relationship between the first knowledge base and the second knowledge base. For example, the second knowledge base may have a higher, equal or lower priority than the first knowledge base. The priority relationship between the two knowledge bases may be set according to a specific business scenario to suit the specific business scenario.

[0089] The information in the second knowledge base can also be added to the first knowledge base. After the information in the second knowledge base is added to the first knowledge base, the information can be deleted from the second knowledge base.

[0090] Taking the knowledge base including the first knowledge base and the second knowledge base mentioned above as an example, when the first response information for the question information is generated using the first generative model based on the question information and the knowledge base, information related to the question information can be first searched from a knowledge base with a higher priority (such as the second knowledge base). If no information related to the question information can be found in the knowledge base with a higher priority, information can be searched from a knowledge base with a lower priority (such as the first knowledge base). If the first knowledge base and the second knowledge base are of equal level, information can be searched in the two knowledge bases in no particular order.

[0091] Considering that the data in the second knowledge base is the correction information for the response information previously output by the generative model, and the data in the second knowledge base is generated by human experts, it is more authoritative. Therefore, when the first response information for the question information is generated using the first generative model based on the question information and the knowledge base: the information related to the question information can be searched in the second knowledge base first; in response to finding the information related to the question information, the first response information for the question information is generated using the first generative model based on the question information and the found information; in response to not finding the information related to the question information, the first response information for the question information is generated based on the question information and the first knowledge base using the first generative model. Based on the question information and the first knowledge base, the first response information for the question information is generated using the first generative model, that is, the information related to the question information can be searched in the first knowledge base, and then based on the question information and the found information, the first response information for the question information is generated using the first generative model.

[0092] Exemplarily, based on preset rules (such as priority selection rules), traditional artificial intelligence recognition models or another small-scale generative model, the question information, the first knowledge base, and the second knowledge base can be comprehensively analyzed to determine how to select information to respond to the question information; when the generative model is subsequently used to generate response information for the question information, the input information used as the input of the first generative model can be generated based on the determined information selection strategy (such as completely extracting FAQ from the original text, handling in accordance with standard processing procedures, selecting in accordance with the emphasis set by authoritative users, etc.), the question information, and the candidate information; then the input information is input into the first generative model to obtain the response information output by the first generative model. This can significantly improve the content pertinence and reliability of the subsequent generation links.

[0093] After selecting candidate information to be referenced, the generative model may still work outside the candidate information, or the range of candidate information selected by the model is too narrow or too wide. In view of this problem, the present disclosure also proposes a corresponding solution.

[0094] Specifically, when generating the first response information for the question information using the first generative model based on the question information and the knowledge base, the question information can be first matched with the data in the knowledge base for correlation to obtain at least part of the candidate information. At least part of the candidate information can refer to data in the knowledge base that is helpful in answering the question information. For example, data in the knowledge base whose correlation with the question information is greater than a predetermined threshold can be used as candidate information.

[0095] Before matching the question information with the data in the knowledge base, the knowledge base can be split into more fine-grained segments to split a piece of data into multiple segments, which can further improve the relevance of the matched candidate information with the question information. For example, the documents in the knowledge base can be split into paragraphs and / or sentences.

[0096] After obtaining at least part of the candidate information, a target usage strategy can be selected from a preset usage strategy set, and the target usage strategy is used to indicate the range of information in at least part of the candidate information that the first generative model needs to refer to (or focus on referring to). The usage strategy set may include multiple usage strategies. Exemplarily, the usage strategies in the usage strategy set can be divided into two types: the first usage strategy can be called a deep digging strategy, that is, the key content of one or several articles in at least part of the candidate information should be deeply mined to summarize and generate response information; the second usage strategy can be called a broad reference strategy, that is, as much reference content as possible in at least part of the candidate information should be widely included to comprehensively generate response information with wider coverage.

[0097] Exemplarily, the target usage strategy may be selected in any of the following three ways.

[0098] Method 1: Selection based on preset rules

[0099] The target usage policy may be selected from a preset usage policy set based on a second preset rule.

[0100] The second preset rule may be a preset selection rule.

[0101] Taking the usage strategy set including the first usage strategy and the second usage strategy mentioned above as an example, the second preset rule can be configured to determine whether to select the first usage strategy or the second usage strategy based on the matching degree between at least part of the candidate information and the question information.

[0102] For example, if at least part of the candidate information contains information that matches the question information to a particularly high degree (such as higher than a predetermined threshold), the first usage strategy may be selected; conversely, if at least part of the candidate information does not contain information that matches the question information to a particularly high degree, the second usage strategy may be selected.

[0103] Method 2: Selection based on traditional artificial intelligence recognition model

[0104] The second prediction model may be used to select a target usage strategy from a preset usage strategy set.

[0105] The second prediction model is a traditional artificial intelligence recognition model, such as a multi-classification model. As an example, the second prediction model can be, but is not limited to, a multi-class model obtained by fine-tuning BERT.

[0106] The input of the second prediction model may be question information and at least part of the candidate information. The output of the second prediction model may be a probability distribution, which is used to characterize the probability that each usage strategy in the preset usage strategy set is suitable as the target usage strategy.

[0107] The question information and at least part of the candidate information are input into the second prediction model, and the target usage strategy to be selected can be determined according to the output of the second prediction model. For example, the usage strategy corresponding to the maximum probability value can be used as the target usage strategy.

[0108] Taking the usage strategy set including the first usage strategy and the second usage strategy mentioned above as an example, the second prediction model can be a binary classification model. The output of the second prediction model can be a probability value, which can represent the probability of selecting the first usage strategy instead of the second usage strategy, or the probability of selecting the second usage strategy instead of the first usage strategy.

[0109] Method 3: Selection based on small-scale generative models

[0110] The third generative model may be used to select a target usage strategy from a preset usage strategy set.

[0111] The third generative model is a small-scale generative model, and its parameter quantity is smaller (e.g., much smaller) than that of the first generative model. When the third generative model is used for judgment, input information can be generated based on the question information and at least part of the candidate information, for example, input information such as, but not limited to, "please select a target usage strategy based on the question information and these candidate information" can be generated, and then the input information can be input into the third generative model, and the target usage strategy can be obtained according to the output of the third generative model.

[0112] The characteristics of the above three selection methods are that they all select target usage strategies based on question information and candidate information, so the accuracy of the selected target usage strategy can be improved, and then the content pertinence and reliability of subsequent generation links can be significantly improved.

[0113] After determining the target usage strategy, the first generative model may be used to generate first response information for the question information based on the question information, at least part of the candidate information, and the target usage strategy. For example, input information (i.e., prompt) used as input to the first generative model may be generated based on the question information, at least part of the candidate information, and the target usage strategy, and the input information may be input into the first generative model to obtain first response information output by the first generative model.

[0114] A specific application scenario of the present disclosure is a data query scenario in a vertical industry scenario. For the data query scenario, the present disclosure proposes a comprehensive solution that can improve the accuracy of the generative model in data query.

[0115] This solution can use a pre-model to analyze whether the generative model can obtain enough information from the database to meet the user's request. If not, it will refuse to answer, allowing the generative model to "know what it knows and know what it doesn't know"; this solution can also use another pre-model to analyze the document fragments searched from the database to determine whether it should dig deep into a few fragments or refer to a large number of fragments for summary; when the answer is not accurate enough or the content of the database is not sufficient to support the generative model, this solution can also give accurate answers in the future through human intervention.

[0116] The response method disclosed in the present invention may also be implemented as a response device. Figure 2 FIG. 1 is a schematic diagram showing the structure of a response device according to an embodiment of the present disclosure. The functional units of the response device can be implemented by hardware, software, or a combination of hardware and software that implements the principles of the present disclosure. It can be understood by those skilled in the art that Figure 2 The functional units described can be combined or divided into sub-units to implement the principles of the above invention. Therefore, the description herein can support any possible combination, division, or further limitation of the functional units described herein. The following is a brief description of the functional units that the response device can have and the operations that each functional unit can perform. For the details involved, please refer to the relevant description above, which will not be repeated here.

[0117] See also Figure 2 The response device 200 may include a determination module 210 , a first generation module 220 and an output module 230 .

[0118] The judgment module 210 is used to respond to the question information input by the user and judge whether the knowledge base can meet the question information. Exemplarily, the judgment module 210 can judge whether the knowledge base can meet the question information based on the first preset rule; and / or the judgment module 210 can use the first prediction model to judge whether the knowledge base can meet the question information, wherein the first prediction model is a binary classification model created for the knowledge base, the input of the first prediction model is the question information, and the output of the first prediction model is a probability value used to characterize that the knowledge base can meet the question information; and / or the judgment module 210 can use the second generative model to judge whether the knowledge base can meet the question information, and the parameter amount of the second generative model is smaller than that of the first generative model.

[0119] When the judgment module 210 uses the above-mentioned multiple judgment methods to make judgments, it can be determined that the knowledge base can satisfy the question information only when the judgment results of all judgment methods are that the knowledge base can satisfy the question information.

[0120] The first generating module 220 is used for generating first response information for the question information based on the question information and the knowledge base using a first generating model in response to the determination result that the knowledge base can satisfy the question information.

[0121] The output module 230 is used to output the first response information.

[0122] The output module 230 also outputs a first prompt message and / or a second prompt message in response to the determination result that the knowledge base cannot satisfy the question information. The first prompt message is used to prompt that the knowledge base information is insufficient, and the second prompt message is used to prompt that the second response information of the question information will be obtained through manual annotation.

[0123] The knowledge base may include the first knowledge base and the second knowledge base mentioned above. The response device 200 may also include a second generation module and an addition module. The second generation module is used to generate correction information for the first response information in response to receiving evaluation information for characterizing negative evaluations fed back by the user for the first response information. The second generation module may send the question information and / or the first response information to one or more clients, and receive the correction information for the first response information sent by the client. The addition module is used to add the correction information to the second knowledge base.

[0124] Exemplarily, the first generation module may first search for information related to the question information in the second knowledge base; in response to finding information related to the question information, the first generation module generates first response information for the question information based on the question information and the found information using the first generative model; in response to not finding information related to the question information, the first generation module generates first response information for the question information based on the question information and the first knowledge base using the first generative model.

[0125] The first generation module may include a matching module, a selection module, and a generation submodule. The matching module is used to match the question information with the information in the knowledge base for relevance, and obtain at least part of the candidate information; the selection module is used to select a target usage strategy from a preset usage strategy set, and the target usage strategy is used to indicate the information range that the first generation model needs to refer to in at least part of the candidate information; the generation submodule is used to generate first response information for the question information using the first generation model based on the question information, at least part of the candidate information, and the target usage strategy.

[0126] The selection module can select a target usage strategy from a preset usage strategy set based on a second preset rule; the selection module inputs the question information and at least part of the candidate information into a second prediction model, obtains the probability distribution output by the second prediction model to characterize that each usage strategy in the preset usage strategy set is suitable as a target usage strategy, and determines the target usage strategy based on the probability distribution; the selection module generates the target usage strategy using a third generative model based on the question information and at least part of the candidate information, and the parameter amount of the third generative model is smaller than that of the first generative model.

[0127] The generation submodule may generate input information of the first generative model based on the question information, at least part of the candidate information and the target usage strategy, input the input information into the first generative model, and obtain response information generated by the first generative model.

[0128] Figure 3 A schematic diagram of the structure of a computing device that can be used to implement the above-mentioned response method according to an embodiment of the present invention is shown.

[0129] See also Figure 3 , the computing device 300 includes a memory 310 and a processor 320 .

[0130] The processor 320 may be a multi-core processor or may include multiple processors. In some embodiments, the processor 320 may include a general-purpose main processor and one or more special coprocessors, such as a graphics processing unit (GPU), a digital signal processor (DSP), etc. In some embodiments, the processor 320 may be implemented using a customized circuit, such as an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).

[0131] The memory 310 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 320 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 310 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 310 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.

[0132] The memory 310 stores executable codes, and when the executable codes are processed by the processor 320 , the processor 320 can execute the response method mentioned above.

[0133] The answering method, device and apparatus according to the present invention have been described above in detail with reference to the accompanying drawings.

[0134] In addition, the method according to the present invention may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing the above steps defined in the above method of the present invention.

[0135] Alternatively, the present invention may also be implemented as a non-temporary machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) on which executable code (or computer program, or computer instruction code) is stored. When the executable code (or computer program, or computer instruction code) is executed by a processor of an electronic device (or computing device, server, etc.), the processor executes the various steps of the above-mentioned method according to the present invention.

[0136] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or a combination of both.

[0137] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system and method according to multiple embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or code, and the part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0138] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein are selected to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A response method, characterized in that: include: In response to the question information input by the user, determining whether the knowledge base can satisfy the question information; In response to a determination that the knowledge base can satisfy the question information, first response information for the question information is generated based on the question information and the knowledge base using a first generative model, and the first response information is output.

2. The method according to claim 1, characterized in that Also includes: In response to the determination that the knowledge base cannot satisfy the question information, a first prompt information and / or a second prompt information is output, wherein the first prompt information is used to prompt that the knowledge base information is insufficient, and the second prompt information is used to prompt that a second response information to the question information will be obtained through manual annotation.

3. The method according to claim 1, characterized in that Determining whether the knowledge base can satisfy the question information includes: Determine whether the knowledge base can satisfy the question information based on the first preset rule; and / or Using a first prediction model to determine whether the knowledge base can satisfy the question information, wherein the first prediction model is a binary classification model created for the knowledge base, the input of the first prediction model is the question information, and the output of the first prediction model is a probability value used to characterize whether the knowledge base can satisfy the question information; and / or A second generative model is used to determine whether the knowledge base can satisfy the question information, wherein the second generative model has a smaller number of parameters than the first generative model.

4. The method according to claim 1, characterized in that: The knowledge base includes a first knowledge base and a second knowledge base, and the method further includes: In response to receiving evaluation information indicating a negative evaluation fed back by a user in response to the first response information, generating correction information for the first response information; The correction information is added to the second knowledge base.

5. The method according to claim 1, characterized in that Based on the question information and the knowledge base, using a first generative model, generating first response information for the question information, including: Perform correlation matching between the question information and the information in the knowledge base to obtain at least part of the candidate information; Selecting a target usage strategy from a preset usage strategy set, the target usage strategy being used to indicate a range of information in the at least part of the candidate information that the first generative model needs to refer to; Based on the question information, the at least part of the candidate information, and the target usage policy, the first generative model is used to generate first response information for the question information.

6. The method according to claim 5, characterized in that Select a target usage policy from a set of pre-defined usage policies, including: Selecting a target usage policy from a preset usage policy set based on a second preset rule; Inputting the question information and at least part of the candidate information into a second prediction model, obtaining a probability distribution output by the second prediction model for characterizing that each usage strategy in a preset usage strategy set is suitable as a target usage strategy, and determining the target usage strategy based on the probability distribution; Based on the question information and at least part of the candidate information, a target usage strategy is generated using a third generative model, wherein the third generative model has a smaller number of parameters than the first generative model.

7. A response device, characterized in that: include: A judgment module, used to judge whether the knowledge base can satisfy the question information in response to the question information input by the user; A first generating module, configured to generate first response information for the question information based on the question information and the knowledge base using a first generating model in response to a determination result that the knowledge base can satisfy the question information; An output module is used to output the first response information.

8. A computing device comprising: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 6.

9. A computer program product, comprising executable codes, which, when executed by a processor of an electronic device, causes the processor to perform the method according to any one of claims 1 to 6.

10. A non-transitory machine-readable storage medium having executable codes stored thereon, which, when executed by a processor of an electronic device, causes the processor to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for generating agent dialogue statement in man-machine dialogues

    CN112860862A

  • Intelligent question and answer method and system for electricity transaction

    CN114997180A

  • Method for detecting ambiguity of customer service robot knowledge base, storage medium, and computer device

    WO2020010930A1

Cited By

  • Interaction method and apparatus, and computer-readable storage medium

    WO2026091011A1