Intelligent question and answer processing method and device, electronic equipment, computer readable storage medium and computer program product
By analyzing and disassembling the target question text in the intelligent question-answer system, multiple sub-questions are formed, and the execution plan and results are determined for each sub-question, the shortcomings of the existing intelligent question-answer system in task execution control are solved, and the accuracy and controllability of processing are improved.
Patent Information
- Application Number
- CN202411869829.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-03-25
AI Technical Summary
The existing intelligent question-and-answer system is not flexible enough in the overall direction of task execution, and is prone to falling into local cycles or lacks timely adjustment capabilities, resulting in low accuracy and controllability.
By conducting intent analysis on the received question-and-answer request, determine whether the target question text meets the problem disassembly condition. If it is met, it will be disassembled into multiple sub-questions. Each sub-question corresponds to a sub-intent, and determines the execution plan and result for each sub-question, and determines the final reply text through finite state transition.
It is realized that the question text is split into multiple sub-questions according to the intention of the question text, and the execution plan is adjusted according to the execution results of each sub-question, controlling the overall direction of the intelligent question-answer processing process, thereby improving the accuracy and controllability of intelligent question-answer processing.
Smart Images

Figure CN119692449A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an intelligent question and answer processing method, device, electronic device, computer-readable storage medium and computer program product. Background Art
[0002] Intelligent Question Answering (QA) is an important research direction in the field of Natural Language Processing (NLP), which involves enabling computers to understand questions in natural language and provide accurate answers. With the rapid development of the Internet and big data technology, the amount of information is growing explosively, and users need more efficient ways to obtain information. Intelligent question answering systems can directly respond to users' information acquisition needs. Intelligent question answering systems can be applied to multiple fields such as education, medical care, and finance to provide intelligent consulting services for professional knowledge. Intelligent question answering systems can also be used as language learning tools to help users improve their language comprehension and expression skills through interaction. The research on intelligent question answering has promoted the development of multiple technical fields such as natural language processing, knowledge representation, and reasoning algorithms.
[0003] Advances in deep learning, knowledge graphs, natural language processing and other technologies have provided technical support for the development of intelligent question-answering systems. In the task analysis process of intelligent question-answering, when only local task planning methods are used, the overall direction of task execution cannot be controlled and it is easy to fall into a local loop; when only global task planning methods are used, there is a lack of ability to adjust task planning in a timely manner, resulting in low accuracy and controllability of intelligent question-answering processing. Summary of the invention
[0004] The embodiments of the present application provide a method, device, electronic device, computer-readable storage medium and computer program product for intelligent question and answer processing, which can improve the accuracy and controllability of intelligent question and answer processing.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] The present application provides an intelligent question-answering processing method, the method comprising:
[0007] In response to the received question-answering request, a target question text is obtained, and an intent analysis is performed on the target question text to obtain an intent analysis result;
[0008] When it is determined based on the intention analysis result that the target question text meets the problem decomposition condition, based on the intention analysis result and the target question text, the target question text is decomposed to obtain a plurality of sub-questions, wherein each of the sub-questions corresponds to a sub-intention;
[0009] For each of the sub-problems, determine a first execution plan corresponding to the sub-intention corresponding to the sub-problem, and determine a first execution result corresponding to the sub-problem based on the first execution plan;
[0010] Based on the first execution results corresponding to each of the sub-questions, a finite state transfer is performed to determine the answer text corresponding to the target question text.
[0011] The present application embodiment provides an intelligent question-answering processing device, including:
[0012] A question analysis module is used to obtain a target question text in response to a received question-answering request, and perform intent analysis on the target question text to obtain an intent analysis result;
[0013] A question decomposition module is used for, when it is determined based on the intention analysis result that the target question text meets the question decomposition condition, decomposing the target question text based on the intention analysis result and the target question text to obtain a plurality of sub-questions, wherein each of the sub-questions corresponds to a sub-intention;
[0014] A first determination module is used to determine, for each of the sub-problems, a first execution plan corresponding to the sub-intention corresponding to the sub-problem, and determine a first execution result corresponding to the sub-problem based on the first execution plan;
[0015] The second determination module is used to perform finite state transfer based on the first execution results corresponding to each of the sub-questions, and determine the answer text corresponding to the target question text.
[0016] An embodiment of the present application provides an electronic device, the electronic device comprising:
[0017] A memory for storing computer executable instructions or computer programs;
[0018] The processor is used to implement the intelligent question and answer processing method provided in the embodiment of the present application when executing the computer executable instructions or computer programs stored in the memory.
[0019] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions or a computer program for implementing the intelligent question-answering processing method provided in the embodiment of the present application when executed by a processor.
[0020] An embodiment of the present application provides a computer program product, including computer executable instructions or a computer program. When the computer executable instructions or the computer program are executed by a processor, the intelligent question and answer processing method provided in the embodiment of the present application is implemented.
[0021] The embodiments of the present application have the following beneficial effects:
[0022] In the application of the embodiment of the present application, in response to the received question-answering request, the target question text is obtained, and the target question text is analyzed for intent to obtain the intent analysis result. Then, when it is determined based on the intent analysis result that the target question text meets the problem decomposition condition, the target question text is decomposed based on the intent analysis result and the target question text to obtain multiple sub-questions, wherein each sub-question corresponds to a sub-intent, and a question text is split into multiple sub-questions corresponding to different sub-intents according to the intent of the question text. Then, for each sub-question, the first execution plan corresponding to the sub-intent corresponding to the sub-question is determined, and the first execution result corresponding to the sub-question is determined based on the first execution plan, and then based on the first execution result corresponding to each sub-question, a finite state transfer is performed to determine the reply text corresponding to the target question text. In this way, the sub-intent corresponding to each sub-question can be associated with a set of execution plans, and the execution plan corresponding to the sub-question can be adjusted in time based on the execution result corresponding to each sub-question, so as to control the overall direction of the intelligent question-answering processing flow, thereby improving the accuracy and controllability of the intelligent question-answering processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a schematic diagram of an application mode of the intelligent question-answering processing method provided in an embodiment of the present application;
[0024] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0025] Figure 3A It is a first flow chart of the intelligent question-answering processing method provided in an embodiment of the present application;
[0026] Figure 3B It is a second flow chart of the intelligent question-answering processing method provided in an embodiment of the present application;
[0027] Figure 3C 3 is a schematic diagram of a third flow chart of the intelligent question-answering processing method provided in an embodiment of the present application;
[0028] Figure 3D 4 is a schematic diagram of a fourth process flow of the intelligent question-answering processing method provided in an embodiment of the present application;
[0029] Figure 4 It is a schematic diagram of an intelligent agent structure based on a large language model provided in the related art;
[0030] Figure 5 It is a logical flow diagram of the intelligent question-answering processing method provided in the embodiment of the present application;
[0031] Figure 6 It is a schematic diagram of the principle of a high-frequency problem recall module provided in an embodiment of the present application;
[0032] Figure 7 It is a schematic diagram of the principle of the context understanding module provided in the embodiment of the present application;
[0033] Figure 8 It is a structural diagram of a global task planning module provided in an embodiment of the present application;
[0034] Fig. 9 It is a flowchart of the intelligent agent executing the task plan provided in the embodiment of the present application;
[0035] Fig.10 It is a schematic diagram of the task state transfer process provided by an embodiment of the present application;
[0036] Fig.11 It is a flowchart of the thinking module provided in an embodiment of the present application.
[0037] It should be pointed out that the above-mentioned "first" and "second" are only used to distinguish different solutions, and do not represent the degree of superiority or inferiority of the solutions or the priority in the implementation process. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0039] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0040] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0041] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.
[0042] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0043] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0044] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0045] 1) Intelligent agent: An entity that can perceive the environment and make autonomous decisions and actions based on preset goals. It can be a software program, a robot, or any system that can perform a specific task.
[0046] 2) Large Language Model: It is a pre-trained language model that learns language patterns and structures by analyzing large amounts of text data.
[0047] 3) Intelligent question answering: refers to the process of using natural language processing technology to enable computer systems to understand questions raised by users and find appropriate answers in a predefined knowledge base or information source.
[0048] 4) Intent analysis: It is the process of identifying the purpose or intent behind a user’s question.
[0049] 5) Finite state transfer: refers to the change of task status during the problem solving process. When processing questions raised by users, the intelligent question-answering system will go through multiple stages, each of which represents a different state of the task. The transitions between these states constitute finite state transfers.
[0050] 6) Execution plan: refers to the specific steps that the intelligent question-answering system takes to determine how to execute the query to find the answer.
[0051] The commonly used intelligent agents in related technologies include React, AutoGPT, and HuggingGPT. React is a reasoning paradigm based on large language model prompts, which summarizes the analysis process of specific task problems into an alternating combination of reasoning and action. AutoGPT is a task-oriented dialogue and automation agent. According to the task name, role and goal, it determines the task to be performed by the large language model through multiple rounds of iterations, and feeds back the task execution results to the prompt words. HuggingGPT uses the large language model as the core controller, and its workflow consists of four stages: task planning, model selection, task execution, and response generation. React and AutoGPT cannot control the overall direction of the task execution process, and it is difficult to get satisfactory answers to users. They are also prone to fall into a loop of local task execution errors. Iterative execution of the next task will increase the negative impact of task execution errors. HuggingGPT cannot perform correct task planning at one time, and it is difficult to adjust the global task planning in time. It lacks the ability to perceive local information and adjust planning.
[0052] The embodiments of the present application provide a method, device, electronic device, computer-readable storage medium and computer program product for intelligent question and answer processing, which can improve the accuracy and controllability of intelligent question and answer processing.
[0053] The following describes an exemplary application of the electronic device provided by the embodiment of the present application. The electronic device provided by the embodiment of the present application can be implemented as various types of terminals such as a laptop computer, a tablet computer, a desktop computer, a set-top box, a smart phone, a smart speaker, a smart watch, a smart TV, and a vehicle-mounted terminal, and can also be implemented as a server. The following describes an exemplary application when the device is implemented as a server.
[0054] See also Figure 1 , Figure 1 This is a schematic diagram of the application mode of the intelligent question-answering processing method provided in the embodiment of the present application, which is an example. Figure 1 The invention involves a server 200, a network 300 and a terminal 400. The terminal 400 is connected to the server 200 via the network 300, and the network 300 can be a wide area network or a local area network, or a combination of the two.
[0055] During the intelligent question and answer processing, the terminal 400 sends a question and answer request to the server 200. The server 200 responds to the received question and answer request, obtains the target question text, and performs intent analysis on the target question text to obtain the intent analysis result; when it is determined based on the intent analysis result that the target question text meets the problem decomposition conditions, the target question text is decomposed based on the intent analysis result and the target question text to obtain multiple sub-questions, wherein each sub-question corresponds to a sub-intention; for each sub-question, a first execution plan corresponding to the sub-intention corresponding to the sub-question is determined, and a first execution result corresponding to the sub-question is determined based on the first execution plan; based on the first execution results corresponding to each sub-question, a finite state transfer is performed to determine the reply text corresponding to the target question text, and the reply text is sent to the terminal 400.
[0056] In some embodiments, the server (e.g., server 200) may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a car terminal, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0057] See also Figure 2 , Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device may be a terminal or a server, Figure 2 The electronic device 500 shown includes: at least one processor 410, a memory 450, and at least one network interface 420. The various components in the electronic device 500 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 2 Various buses are labeled as bus system 440 .
[0058] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0059] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0060] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0061] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0062] The operating system 451 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic businesses and process hardware-based tasks.
[0063] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420. Exemplary network interfaces 420 include: Bluetooth, Wireless Authentication (WiFi), and Universal Serial Bus (USB).
[0064] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 An intelligent question and answer processing device 455 stored in a memory 450 is shown, which may be software in the form of a program or plug-in, including the following software modules: a question analysis module 4551, a question decomposition module 4552, a first determination module 4553, and a second determination module 4554. These modules are logical, and therefore may be arbitrarily combined or further split according to the functions implemented. The functions of each module will be described below.
[0065] In some embodiments, the terminal or server can implement the intelligent question-answering processing method provided by the embodiment of the present application by running various computer executable instructions or computer programs. For example, computer executable instructions can be commands, machine instructions or software instructions at the microprogram level. The computer program can be a native program or software module in the operating system; it can be a local (Native) application (APPlication, APP), that is, a program that needs to be installed in the operating system to run, such as a cloud computing APP or an instant messaging APP; it can also be a small program that can be embedded in any APP, that is, a program that can be run only by downloading it to a browser environment. In short, the above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form.
[0066] The intelligent question and answer processing method provided in the embodiment of the present application will be explained in combination with the exemplary application and implementation of the server device provided in the embodiment of the present application.
[0067] The following describes the intelligent question-and-answer processing method provided by the embodiment of the present application. For ease of understanding, the application scenario of the intelligent question-and-answer processing method provided by the embodiment of the present application is described below. In scenarios such as online shopping and live interaction, it is necessary to intelligently answer user questions. The intelligent question-and-answer processing method provided by the embodiment of the present application can improve the accuracy and controllability of intelligent question-and-answer processing. In the embodiment of the present application, the application in the user question-and-answer scenario is used as an example for explanation.
[0068] As mentioned above, the electronic device that implements the intelligent question-answering processing method of the embodiment of the present application may be a terminal, a server, or a combination of the two. Next, the intelligent question-answering processing method provided by the embodiment of the present application is described by taking the electronic device as a server as an example. Figure 3A , Figure 3A This is a first flow chart of the intelligent question-answering processing method provided in the embodiment of the present application, which will be combined with Figure 3A The steps shown are explained.
[0069] In step 301, in response to a received question-answering request, a target question text is obtained, and an intent analysis is performed on the target question text to obtain an intent analysis result.
[0070] Here, the target question text is the question text of the to-be-determined answer text, and the intent analysis is to analyze the question intent indicated by the target question text.
[0071] In some embodiments, see Figure 3B , Figure 3B is a second flow chart of the intelligent question-answering processing method provided in an embodiment of the present application, Figure 3AIn step 301 shown in FIG. 1 , “obtaining the target question text in response to the received question-answering request” can be performed by Figure 3B Steps 3011 to 3014 are implemented as described in detail below.
[0072] In step 3011, in response to the received question and answer request, the original question text is obtained, and the original question text is matched with each reference question text in the reference text library to obtain a first text matching result.
[0073] Here, the frequency of occurrence of the reference question text is greater than a preset threshold number of times, that is, the reference question text in the reference text library is a frequently appearing question text, and the reference text library is a high-frequency question text library. The original question text is the question text indicated by the received question and answer request, and the first text matching result is used to characterize whether the reference text library includes any reference question text that successfully matches the original question text. The similarity between the original question text and each reference question text can be calculated separately by the cosine similarity formula. When there is a reference question text whose similarity with the original question text is greater than a preset first similarity threshold, the original question text successfully matches the reference question text. The first similarity threshold can be 95%, 90%, etc.
[0074] In step 3012, when the first text matching result indicates that the reference text library does not include any reference question text that successfully matches the original question text, the original question text is matched with a preset question template to obtain a second text matching result.
[0075] Here, when the first text matching result indicates that the reference text library does not include any reference question text that successfully matches the original question text, it indicates that the original question text is not a frequently occurring question text, and at this time, the original question text needs to be matched with a preset question template. The preset question template is a pre-configured regular template, which is a template including a regular expression. The regular expression is an expression composed of letters, numbers, punctuation marks, etc., which is used to search and match text. According to the frequently occurring question text types, regular templates of various question text types are pre-configured. Question keywords and question text structures related to the preset question template are extracted from the original question text, and the question keywords and question text structures in the extracted original question text are matched with the question keywords and question text structures in the preset question template to obtain a second text matching result. The second text matching result is used to characterize whether the original question text matches the preset question template successfully. When the question keywords in the original question text are consistent with the question keywords in the preset question template, and the question text structure in the original question text is consistent with the question text structure in the preset question template, the original question text matches the preset question template successfully.
[0076] In step 3013, when the second text matching result indicates that the original question text fails to match the preset question template, the text matching model is called to match the original question text with each candidate text in the question text data set to obtain a third text matching result.
[0077] Here, the text matching model can be a transformer-based text similarity matching model, and the question text data set includes question texts collected in online social scenarios. When the second text matching result indicates that the original question text fails to match the preset question template, the original question text is preprocessed by word segmentation, encoding, etc., and converted into the text input format of the text matching model. The text matching model can calculate the similarity between the original question text and each candidate text in the question text data set through the cosine similarity formula. The third text matching result indicates whether there is a candidate text in the question text data set that successfully matches the original question text. When there is a candidate text whose similarity with the original question text is greater than a preset second similarity threshold, it is determined that there is a candidate text in the question text data set that successfully matches the original question text. The second similarity threshold can be the same as the first similarity threshold, or it can be different from the first similarity. For example, the second similarity threshold can be 80%, 85%, etc.
[0078] In step 3014, when the third text matching result indicates that there is a candidate text in the question text dataset that successfully matches the original question text, the candidate text is determined as the target question text.
[0079] Here, when there is a candidate text in the question text data set that successfully matches the original question text, the successfully matched candidate text is determined as the target question text, that is, the target question text is the question text of the answer text to be determined.
[0080] In an embodiment of the present application, when the reference text library does not include any reference question text that successfully matches the original question text, the original question text is matched with a preset question template. Then, when the original question text fails to match the preset question template, the text matching model is called to match the original question text with each candidate text in the question text data set, thereby achieving multi-level matching of question texts and improving the accuracy of question text matching.
[0081] In some embodiments, the following steps can also be performed: when the first text matching result indicates that there is a reference question text in the reference text library that successfully matches the original question text, the reference question text is determined as the target question text; or when the second text matching result indicates that the original question text successfully matches the preset question template, the template text indicated by the preset question template is determined as the target question text.
[0082] Here, it should be noted that the priority of matching the original question text with each reference question text in the reference text library is the highest. When the first text matching result indicates that there is a reference question text in the reference text library that successfully matches the original question text, the successfully matched reference question text is directly determined as the target question text, and there is no need to match the original question text with the preset question template. The priority of matching the original question text with the preset question template is second. When there is no reference question text in the reference text library that successfully matches the original question text, and the second text matching result indicates that the original question text successfully matches the preset question template, the template text indicated by the preset question template is determined, and the corresponding template text is determined as the target question text, and there is no need to call the text matching model to match the original question text with each candidate text in the question text data set.
[0083] In an embodiment of the present application, when there is a reference question text in the reference text library that successfully matches the original question text, the reference question text is directly determined as the target question text, or when the original question text successfully matches the preset question template, the template text indicated by the preset question template is directly determined as the target question text, thereby achieving priority matching of the original question text with frequently appearing reference question texts. If the match is successful, there is no need to match the original question text with the preset question template, thereby saving the system's computing resources and improving the efficiency of intelligent question and answer processing.
[0084] In some embodiments, the following steps can also be performed: when the third text matching result represents that there is no candidate text in the question text data set that successfully matches the original question text, determine the historical conversation content and historical conversation scenes corresponding to the original question text; based on the historical conversation content and historical conversation scenes, determine the context information corresponding to the original question text; when the original question text is rewritten based on the context information and the rewriting is successful, determine the target question text based on the rewritten question text.
[0085] Here, the context information corresponding to the original question text is information that facilitates the large language model to fully understand the original question text. The historical conversation content includes historical conversation questions and corresponding historical conversation replies. According to the type of historical conversation, the historical conversation content is stored and managed accordingly. The historical conversation types include interactive conversations in which users chat with the system, service conversations in which users request services, etc. The historical conversation type corresponding to the original question text is determined, and the historical conversation content corresponding to the original question text is matched from the historical conversation content through multiple dimensions such as time and semantic relevance. The historical conversation content corresponding to the original question text is processed by long text summary, format conversion, conversation deduplication, etc., and converted into a text format that is easy for the large language model to understand. The historical conversation scene refers to the business scene in which the historical conversation is located. According to the unique business domain knowledge in different historical conversation scenes, the prompt words of the large language model are constructed. When the third text matching result indicates that there is no candidate text that successfully matches the original question text in the question text data set, the context information corresponding to the original question text is input into the large language model to rewrite the original question text. When the original question text is successfully rewritten, the rewritten question text is determined as the target question text.
[0086] In an embodiment of the present application, when there is no candidate text in the question text data set that successfully matches the original question text, the original question text is rewritten based on the context information corresponding to the original question text and the rewriting is successful. The target question text is determined based on the rewritten question text, which can fully utilize the context information corresponding to the question text and adjust the content of the question text to facilitate the subsequent clear identification of the true intention of the question text.
[0087] In some embodiments, the following steps can also be performed: when the original question text is rewritten based on context information and the rewriting fails, clarification information corresponding to the original question text is output; or when the original question text is rewritten based on context information and the rewriting fails, if the reply text corresponding to the original question text can be determined based on the context information, the reply text corresponding to the original question text is output.
[0088] Here, clarification information refers to information that is asked back to the terminal that issued the original question text when the original question text cannot be clearly judged based on the context information. Based on the context information corresponding to the original question text, the large language model is called to rewrite the original question text. When the rewriting of the original question text fails, the clarification information corresponding to the original question text is output. For example, the clarification information can be "I'm sorry, I don't understand the meaning of xx, what does xx mean?". When it is detected that the context information includes keywords related to the original question text, and the context information is consistent, the reply text corresponding to the original question text can be determined, and the keywords and phrases related to the original question text can be directly extracted from the context information, and the extracted information is integrated to generate a fluent natural language expression to obtain the reply text corresponding to the original question text.
[0089] In an embodiment of the present application, when the original question text is rewritten based on context information and the rewriting fails, clarification information corresponding to the original question text is output, or the reply text corresponding to the original question text can be determined based on the context information, and the reply text corresponding to the original question text is output. This achieves the goal of timely outputting clarification information when the question text adjustment fails, facilitating subsequent retrieval of the clarified question text. When the reply text corresponding to the original question text is determined based on the context information, the reply text is directly output without the need to perform subsequent tasks, thereby improving the efficiency of intelligent question and answer processing.
[0090] In some embodiments, the target question text can be analyzed for intent to obtain an intent analysis result by executing the following steps: calling a text classification model to classify the target question text for intent to obtain an intent classification result; calling a text similarity model to perform similar text retrieval on the target question text to obtain a similar intent result; calling a large language model to predict the intent of the target question text to obtain an intent prediction result; and determining the intent analysis result based on the intent classification result, similar intent result and intent prediction result.
[0091] Here, the text classification model can be a transformer-based text classification model. The target question text is input into the text classification model to obtain the intent classification result. The intent classification result is the category label to which the target question text belongs. The category label can indicate the basic intent of the target question text. The text similarity model is called to calculate the similarity between the target question text and the question text in the question library, retrieve similar question texts similar to the target question text, and infer the intent of the target question text through the intent of the similar question text to obtain a similar intent result. The target question text is input into the large language model. The large language model generates relevant answers or explanations according to the context of the target question text, extracts the predicted intent of the target question text from the answers or explanations, and obtains the intent prediction result. If the intent classification result, similar intent result, and intent prediction result are consistent, or tend to have the same intent, the same intent can be used as the final intent analysis result. If the intent classification result, similar intent result, and intent prediction result are inconsistent, a voting mechanism can be used to determine the number of votes corresponding to the intent classification result, similar intent result, and intent prediction result, respectively, and the intent result with the most votes is used as the final intent analysis result.
[0092] In an embodiment of the present application, a text classification model is called to perform intent classification on the target question text, a text similarity model is called to perform similar text retrieval on the target question text, and a large language model is called to perform intent prediction on the target question text. This realizes combining multiple intent analysis methods to determine the intent analysis result of the target question text, thereby improving the accuracy of the intent analysis of the target question text.
[0093] Continue to refer Figure 3A In step 302, when it is determined based on the intention analysis result that the target question text meets the problem decomposition conditions, the target question text is decomposed based on the intention analysis result and the target question text to obtain multiple sub-questions.
[0094] Here, the problem decomposition condition is the condition for decomposing the target problem text into multiple sub-problems. When the target problem text meets the problem decomposition condition, based on the intention analysis result of the target problem text, the target problem text is decomposed to obtain multiple sub-problems, each of which corresponds to a sub-intention.
[0095] In some embodiments, the following steps can also be performed: when it is determined based on the intent analysis result that the target question text includes one sub-intention, it is determined that the target question text does not meet the problem decomposition conditions; when it is determined based on the intent analysis result that the target question text includes multiple sub-intentions, it is determined that the target question text meets the problem decomposition conditions.
[0096] Here, the number of sub-intentions included in the target question text is determined based on the intention analysis results. When the intention of the target question text includes one sub-intention, that is, the target question text includes one sub-question, it is not necessary to disassemble the target question text, and it is determined that the target question text does not meet the problem disassembly conditions. When the intention of the target question text includes multiple sub-intentions, that is, the target question text includes multiple sub-questions, it is necessary to disassemble the target question text into multiple sub-questions and determine that the target question text meets the problem disassembly conditions.
[0097] For example, when the target question text is "What is the number of daily active users of xx video in the past 7 days?", it is determined based on the intent analysis result that the target question text includes one sub-intent, that is, the target question text includes one sub-question "What is the number of daily active users in the past 7 days?", and it is determined that the target question text does not meet the problem disassembly condition. When the target question text is "What is the number of daily active users and monthly active users of xx video in the past 7 days?", it is determined based on the intent analysis result that the target question text includes two sub-intents, that is, the target question text includes two sub-questions "What is the number of daily active users in the past 7 days?" and "What is the number of monthly active users in the past 7 days?", and it is determined that the target question text meets the problem disassembly condition.
[0098] In an embodiment of the present application, when the target question text includes one sub-intention, it is determined that the target question text does not meet the problem decomposition conditions; when the target question text includes multiple sub-intentions, it is determined that the target question text meets the problem decomposition conditions. It is possible to determine whether to split a question text into multiple sub-questions based on the number of sub-intentions included in the question text.
[0099] Continue to refer Figure 3A In step 303, for each sub-problem, a first execution plan corresponding to the sub-intention corresponding to the sub-problem is determined, and a first execution result corresponding to the sub-problem is determined based on the first execution plan.
[0100] Here, the first execution plan is an execution plan corresponding to a pre-set sub-problem with priority for execution, and the first execution result is an execution result of the first execution plan corresponding to the sub-problem.
[0101] In some embodiments, see Figure 3C , Figure 3C is a third flow chart of the intelligent question-answering processing method provided in an embodiment of the present application, Figure 3A In step 303 shown in the figure, "determining the first execution result corresponding to the sub-problem based on the first execution plan" can be achieved by Figure 3C Steps 3031 to 3032 are implemented as described in detail below.
[0102] In step 3031, based on the first execution plan, the task execution agent and the task execution tool corresponding to the sub-problem are determined.
[0103] Here, the task execution agent is an intelligent agent used to execute the execution plan corresponding to the sub-problem. The intelligent agent is an entity that can perceive the environment and make autonomous decisions and actions according to preset goals. It can be a software program, a robot, or any system that can perform a specific task. The task execution tool is a tool required to execute the execution plan corresponding to the sub-problem. The task execution tool can be a search tool, an execution code tool, an access tool for proprietary information sources, etc. Based on the first execution plan corresponding to the sub-problem, the task execution agent corresponding to the first execution plan and the task execution tool corresponding to the first execution plan are determined.
[0104] In step 3032, the task execution agent and the task execution tool are called to execute the first execution plan to obtain the first execution result corresponding to the sub-problem.
[0105] Here, after determining the task execution agent corresponding to the first execution plan and the task execution tool corresponding to the first execution plan, the task execution agent corresponding to the first execution plan and the task execution tool corresponding to the first execution plan are called to execute the first execution plan corresponding to the sub-problem and obtain the first execution result corresponding to the sub-problem.
[0106] For example, the sub-problem is "What is the number of daily active users of xx video in the past 7 days?" The first execution plan corresponding to the sub-problem is to query the number of daily active users. The task execution agent is an intelligent agent used to query the number of daily active users. The task execution tool is the tool required to query the number of daily active users. The corresponding task execution agent and task execution tool are called to query the number of daily active users of xx video in the past 7 days to obtain the query results of the number of daily active users of xx video in the past 7 days.
[0107] Continue to refer Figure 3A In step 304, based on the first execution results corresponding to each sub-question, a finite state transfer is performed to determine the answer text corresponding to the target question text.
[0108] Here, the finite state transfer refers to adjusting the first execution plan corresponding to the subproblem.
[0109] In some embodiments, see Figure 3D , Figure 3D is a fourth flow chart of the intelligent question-answering processing method provided in an embodiment of the present application, Figure 3A Step 304 shown can be performed by Figure 3D Steps 3041 to 3043 are implemented as described in detail below.
[0110] In step 3041, for each sub-problem, when the first execution result corresponding to the sub-problem indicates execution failure, the first execution plan corresponding to the sub-problem is adjusted to obtain a second execution plan.
[0111] Here, the second execution plan is an execution plan obtained by adjusting the first execution plan corresponding to the sub-problem. When the first execution result corresponding to the sub-problem indicates execution failure, a candidate execution plan corresponding to the sub-problem is determined, and the first execution plan corresponding to the sub-problem is adjusted to a candidate execution plan, that is, the candidate execution plan is determined as the second execution plan.
[0112] For example, the sub-problem is "What is the number of monthly active users of xx video in the past 7 days?", and the first execution plan corresponding to the sub-problem is to use the indicator association table to query the number of monthly active users. When the first execution result corresponding to the sub-problem indicates an execution failure, that is, the query of the number of monthly active users using the indicator association table fails, the candidate execution plan corresponding to the sub-problem is determined. The candidate execution plan can be to use a SQL query statement to query the number of monthly active users, that is, the second execution plan corresponding to the sub-problem.
[0113] In step 3042, a second execution result corresponding to the sub-problem is determined based on the second execution plan.
[0114] Here, the second execution result is the execution result of the second execution plan corresponding to the sub-problem. Based on the second execution plan corresponding to the sub-problem, the task execution agent corresponding to the second execution plan is determined, and the task execution tool corresponding to the second execution plan is determined, the task execution agent corresponding to the second execution plan is called, and the task execution tool corresponding to the second execution plan is called, the second execution plan corresponding to the sub-problem is executed, and the second execution result corresponding to the sub-problem is obtained.
[0115] In step 3043, when the second execution result indicates successful execution, a reply text corresponding to the target question text is determined based on the second execution result and the first execution result indicating successful execution.
[0116] Here, when the first execution result corresponding to a sub-question indicates that the execution failed, and the second execution result corresponding to the sub-question indicates that the execution was successful, the second execution result is determined as the final execution result corresponding to the sub-question. If the first execution results corresponding to the sub-questions other than the sub-question indicate that the execution was successful, the first execution result is determined as the final execution result corresponding to the other sub-questions. The second execution result corresponding to the sub-question and the first execution results corresponding to the other sub-questions are combined to obtain the answer text corresponding to the target question text.
[0117] For example, the target question text is "What are the daily active users and monthly active users of xx video in the past 7 days?", the first sub-question is "What are the daily active users of xx video in the past 7 days?", and the second sub-question is "What are the monthly active users of xx video in the past 7 days?". The first execution plan corresponding to the first sub-question is to use the indicator association table to query the daily active users. When the first execution result corresponding to the first sub-question indicates that the execution failed, that is, the query of the daily active users using the indicator association table failed, it is determined that the second execution plan corresponding to the first sub-question is to use SQL query statements to query the daily active users. When the second execution result corresponding to the first sub-question indicates that the execution is successful, that is, the query of the daily active users using the SQL query statement is successful, the second execution result is determined as the final execution result corresponding to the first sub-question. When the first execution result corresponding to the second sub-question indicates that the execution is successful, that is, the query of the monthly active users is successful, the first execution result is determined as the final execution result corresponding to the second sub-question. The second execution result corresponding to the first sub-question and the first execution result corresponding to the second sub-question are combined to obtain the answer text corresponding to the target question text.
[0118] In an embodiment of the present application, when the first execution result corresponding to a sub-problem indicates an execution failure, the first execution plan corresponding to the sub-problem is adjusted to obtain a second execution plan, and then the second execution result corresponding to the sub-problem is determined based on the second execution plan. This enables timely adjustment of the execution plan corresponding to the sub-problem based on the execution result corresponding to each sub-problem, which can control the overall direction of the intelligent question and answer processing flow, thereby improving the accuracy and controllability of the intelligent question and answer processing.
[0119] In some embodiments, the following steps can also be performed: when the second execution result represents an execution failure, determine the execution failure information, and rewrite the sub-problem based on the large language model and the execution failure information to obtain the rewritten first sub-problem; determine the third execution plan corresponding to the rewritten first sub-problem, and determine the third execution result corresponding to the rewritten first sub-problem based on the third execution plan; when the third execution result represents an execution success, determine the reply text corresponding to the target question text based on the third execution result and the first execution result representing the execution success.
[0120] Here, the execution failure information is used to prompt the missing limiting information in the sub-problem, and the limiting information can be time limitation, scene limitation and other information. The third execution plan is the execution plan corresponding to the rewritten first sub-problem, and the third execution result is the execution result of the third execution plan corresponding to the sub-problem. When the second execution result corresponding to the sub-problem represents an execution failure, the execution failure information is determined, that is, the missing limiting information in the sub-problem is determined. Based on the execution failure information, the large language model is called to rewrite the sub-problem, and the missing limiting information is filled in the sub-problem to obtain the rewritten first sub-problem. The intent of the rewritten first sub-problem is re-analyzed, and the third execution plan corresponding to the rewritten first sub-problem is determined based on the intent analysis result.
[0121] Based on the third execution plan corresponding to the rewritten first sub-problem, determine the task execution agent corresponding to the third execution plan, and determine the task execution tool corresponding to the third execution plan, call the task execution agent corresponding to the third execution plan, and call the task execution tool corresponding to the third execution plan to execute the third execution plan corresponding to the rewritten first sub-problem, and obtain the third execution result corresponding to the rewritten first sub-problem.
[0122] When the third execution result corresponding to the rewritten first sub-question indicates successful execution, the third execution result is determined as the final execution result corresponding to the rewritten first sub-question. When the first execution results corresponding to other sub-questions all indicate successful execution, the first execution results are determined as the final execution results corresponding to other sub-questions. The third execution result corresponding to the rewritten first sub-question and the first execution results corresponding to other sub-questions are combined to obtain the answer text corresponding to the target question text.
[0123] In an embodiment of the present application, when the second execution result corresponding to a sub-problem represents an execution failure, the execution failure information is determined, the sub-problem is rewritten based on the large language model and the execution failure information, the third execution plan corresponding to the rewritten first sub-problem is determined, and the third execution result corresponding to the rewritten first sub-problem is determined based on the third execution plan, thereby ensuring the accuracy of the execution results corresponding to the sub-problems, thereby improving the accuracy of intelligent question and answer processing.
[0124] In some embodiments, the following steps can also be performed: when the first execution results corresponding to each sub-question represent successful execution, the first execution results corresponding to each sub-question are evaluated for correctness to obtain each first evaluation result; when each first evaluation result passes the evaluation, based on each first execution result, the response text corresponding to the target question text is determined.
[0125] Here, the first evaluation result is the correctness evaluation result of the first execution result corresponding to the sub-question. For each first execution result corresponding to the sub-question, when the first execution results corresponding to the sub-question all indicate successful execution, the large language model is called to perform correctness evaluation on the first execution result corresponding to the sub-question to obtain the first evaluation result of the first execution result. When each first evaluation result is evaluated as passed, the first execution results corresponding to each sub-question are combined to obtain the answer text corresponding to the target question text.
[0126] In an embodiment of the present application, the correctness of the first execution result corresponding to each sub-question is evaluated to obtain each first evaluation result. When each first evaluation result passes the evaluation, the reply text corresponding to the target question text is determined based on each first execution result. This realizes determining the reply text corresponding to the question text based on the execution result corresponding to each correctly evaluated sub-question, thereby ensuring the accuracy of the reply text and improving the accuracy of intelligent question and answer processing.
[0127] In some embodiments, the following steps can also be performed: when there is a first evaluation result that is a first execution result that fails the evaluation, determine the result error information of the first execution result that fails the evaluation, and rewrite the sub-problem corresponding to the first execution result that fails the evaluation based on the large language model and the result error information to obtain a rewritten second sub-problem; based on the rewritten second sub-problem, re-execute the first execution plan corresponding to the sub-problem, determine the fourth execution result corresponding to the rewritten second sub-problem, and evaluate the correctness of the fourth execution result to obtain a second evaluation result; when the second evaluation result is that the evaluation is passed, determine the reply text corresponding to the target question text based on the fourth execution result and the first execution result with the evaluation result being passed.
[0128] Here, the result error information is an error message used to prompt the first execution result. When the first evaluation result of the first execution result is that the evaluation fails, the result error information of the first execution result is determined. Based on the result error information, the large language model is called to rewrite the sub-problem corresponding to the first execution result to obtain the rewritten second sub-problem. For the rewritten second sub-problem, the first execution plan corresponding to the sub-problem is re-executed to obtain the execution result corresponding to the rewritten second sub-problem, that is, the fourth execution result. The large language model is called to evaluate the correctness of the fourth execution result to obtain the evaluation result of the fourth execution result, that is, the second evaluation result. When the second evaluation result is that the evaluation passes, the fourth execution result is determined as the final execution result corresponding to the rewritten second sub-problem. The fourth execution result and the first execution results corresponding to other sub-problems whose evaluation results are that the evaluation passes are combined to obtain the reply text corresponding to the target question text.
[0129] In an embodiment of the present application, result error information of the first execution result that failed the evaluation is determined, and based on the large language model and the result error information, the sub-problem corresponding to the first execution result that failed the evaluation is rewritten to obtain the rewritten second sub-problem, and based on the rewritten second sub-problem, the first execution plan corresponding to the sub-problem is re-executed to determine the fourth execution result corresponding to the rewritten second sub-problem, thereby ensuring the accuracy of the execution results corresponding to the sub-problems and improving the accuracy of intelligent question and answer processing.
[0130] In some embodiments, the intelligent question-answering processing method provided by the embodiment of the present application can be applied in the field of cloud technology. In response to the received question-answering request on the cloud platform, the target question text is obtained, and the target question text is analyzed for intent to obtain the intent analysis result, and then when the target question text is determined to meet the problem disassembly condition based on the intent analysis result, the target question text is disassembled based on the intent analysis result and the target question text to obtain multiple sub-questions, wherein each sub-question corresponds to a sub-intent, and the cloud server is realized according to the intent of the question text. Split a question text into multiple sub-questions corresponding to different sub-intents, and then for each sub-question, determine the first execution plan corresponding to the sub-intent corresponding to the sub-question, and determine the first execution result corresponding to the sub-question based on the first execution plan, and then perform finite state transfer based on the first execution result corresponding to each sub-question, and determine the reply text corresponding to the target question text. In this way, the cloud server can associate the sub-intent corresponding to each sub-question with a set of execution plans, and adjust the execution plan corresponding to the sub-question in a timely manner based on the execution result corresponding to each sub-question, and can control the overall trend of the intelligent question-answering processing flow, thereby improving the accuracy and controllability of the intelligent question-answering processing.
[0131] The following describes an exemplary application of the intelligent question and answer processing method provided in an embodiment of the present application in a user question and answer scenario.
[0132] With the surge in data volume and the diversification of business analysis needs, efficient and intelligent automated methods are needed to analyze various problems. Traditional data analysis methods often require manual work such as large amounts of data processing, analysis, and report preparation, which is not only time-consuming and inefficient, but also prone to errors. Designing task planning strategies based on large language models and scheduling tools is an intelligent agent solution for automated analysis problems. Intelligent agents usually include the following modules: planning module (Plan), memory module (Memory), tool module (Tools), and action module (Action). For examples, refer to Figure 4 , Figure 4 401 is a schematic diagram of an intelligent agent structure based on a large language model provided in the related art. The intelligent agent includes a planning module 401, a memory module 402, a tool module 403 and an action module 404.
[0133] The planning module 401 is the control center of the intelligent agent, responsible for understanding and decomposing user problems, splitting the user problem analysis task into multiple solvable and manageable subtasks, arranging task execution plans, and scheduling task execution tools to analyze user problems. In addition, the task execution plan to be arranged can be improved through the historical task execution plan, thereby improving the accuracy of analyzing user problems.
[0134] The memory module 402 is responsible for recording the interaction history between the intelligent agent and the user (such as historical conversations), and is composed of sub-modules such as long-term memory and short-term memory. Short-term memory is achieved by directly inputting prompt words (Prompt) into the large language model to realize content understanding, and long-term memory is achieved by external storage such as vector indexing and other technologies to realize longer-span content recall and understanding.
[0135] The tool module 403 is a collection of maintenance task execution tools, which can be in various tool forms, such as built-in functions, custom functions, external APIs, etc. Since the large language model does not have certain capabilities, such as search, code execution, access to proprietary information sources, etc., some external information needs to be obtained through task execution tools.
[0136] The action module 404 is responsible for calling the task execution tools one by one according to the planned task execution plan and obtaining the execution results and observation information (Observation) of the tools, and further determining the task execution decision based on the observation information.
[0137] In view of the problems existing in the related art, the embodiment of the present application proposes an intelligent question-answering processing method, which includes the following improvements compared with the related art:
[0138] 1) A task planning method combining global and local tasks based on large language model prompts and task state transfer is proposed, which effectively solves the problem of inflexible global task planning and deviation of local task planning from the target task process;
[0139] 2) Through the collaboration between multiple subtask modules, the stability, success rate and controllability of the overall task execution are improved;
[0140] 3) Improve the process of intelligent agent execution of tasks through modules such as high-frequency question library and user historical dialogue.
[0141] In the embodiment of the present application, an intelligent problem analysis agent based on task planning and tool scheduling helps users automatically analyze problems, develop solutions, and schedule appropriate tools to solve problems based on the powerful problem understanding ability of the large language model, thereby improving the efficiency of problem analysis. In addition, it can also learn and optimize based on historical data and user feedback to adapt to changing business needs and data environments.
[0142] In the embodiments of the present application, the intelligent agent rationally plans and executes tasks, builds a problem analysis process, and improves the efficiency of solving user problems. For example, based on any question raised by the user, such as: "How many views of xx video in the past 7 days?", "What is the exposure trend of recent articles in xx news?", "What is the proportion of member users among the active users of xx video yesterday?", "Analyze the data table of the active status of xx video users?", etc. After the intelligent agent understands the user's question, it breaks down the user's question into multiple sub-questions, obtains the results of the sub-questions by calling the problem task execution tool, summarizes the results of the sub-questions, and obtains the answer to the user's question.
[0143] Example, reference Figure 5 , Figure 5 is a logical flow chart of the intelligent question-answering processing method provided in the embodiment of the present application. The electronic device implementing the intelligent question-answering processing method in the embodiment of the present application may be a server, Figure 5 The steps shown explain the logical flow of the intelligent question and answer processing method provided in the embodiment of the present application.
[0144] In step 501, high frequency problems are matched.
[0145] Receive user questions, and perform multi-level matching between user questions and high-frequency questions (corresponding to the reference question text in the above embodiment) in the high-frequency question library (corresponding to the reference text library in the above embodiment). In order to reduce the situation where the large language model is repeatedly called, resulting in inconsistent output results of the large language model, the embodiment of the present application designs a question caching mechanism, that is, a high-frequency question recall module, which semi-automatically caches online questions to the high-frequency question library and the prompt information library by combining the annotation system platform and manual verification. When new similar questions appear online, similar questions will be searched for in the high-frequency question library first, and answered in combination with the prompt information, so that when different users ask similar questions, the system can quickly and stably give relatively consistent response results, which is a mechanism for precipitating online data and replenishing the system. As online problems continue to increase, the accumulated problems in the high-frequency question library will also continue to increase, causing the entire system to gradually transition from the cold start stage to the stable operation stage.
[0146] Example, reference Figure 6 , Figure 6It is a schematic diagram of the principle of the high-frequency question recall module provided in the embodiment of the present application. For the specific storage method of the high-frequency question library, the embodiment of the present application selects the ElasticSearch index component, which can perform efficient recall in the case of a large-scale question library. The high-frequency question recall module 601 includes three levels: KV recall 602, regular template recall 603, and model recall 604. KV recall 602 is a key-value complete match, where the key is the user question and the value is the answer corresponding to the user question. If the user question is exactly the same as the question in the high-frequency question library, the match is successful and regarded as a hit. The user's question intention type is directly determined, and relevant auxiliary prompt information is obtained. KV recall has the highest accuracy and a relatively small matching range. Regular template recall 603 is a regular template match. According to common high-frequency questions, multiple categories of regular templates are pre-configured to perform fuzzy matching on user questions, which has high accuracy. Model recall 604 uses a large language model and a traditional transformer-based text similarity matching model to match questions within the range allowed by accuracy. The matching priorities of the three levels decrease in sequence. If the previous level matches successfully, there is no need to perform subsequent level matching, and the matched question and corresponding prompt information (such as intent, metadata) are directly returned. If all three levels fail to match the high-frequency questions successfully, the user question is returned without any auxiliary prompt information.
[0147] Continue to refer Figure 5 , in step 502, determine whether it hits.
[0148] It is determined whether the user's question matches the high-frequency question successfully. If the match is successful, it is considered a hit. If not, it proceeds to step 503 to understand the context; if it is a hit, it proceeds to step 504 to determine whether it is multiple intents or ambiguous intents.
[0149] In step 503, context understanding is performed.
[0150] Rewrite, clarify or answer user questions based on historical user conversations. If clarification is triggered, the question will be clarified directly to the user; if answer is triggered, the user's question will be directly replied to; if rewriting is triggered, the user's question will be rewritten based on historical conversations. The context understanding module is responsible for understanding the user's historical conversations, rewriting the user's question into a complete question, and calling the intelligent agent to process it. The context understanding module helps reduce the complexity of the system, converting multiple rounds of conversations into single rounds of conversations, and transforming the user's free and changeable conversation space into a problem space that the system can relatively understand, so that the system and intelligent agents can focus on solving a single problem.
[0151] Example, reference Figure 7 , Figure 7701 is a schematic diagram of the principle of the context understanding module provided in the embodiment of the present application. The context understanding module includes historical dialogues 701 and domain knowledge 702. The historical dialogues 701 include dialogue storage, dialogue recall and recall strategy. Domain knowledge 702 includes domain knowledge storage, dialogue recall and template assembly. Dialogue storage is to store and manage the questions and replies of the historical dialogues between the user and the intelligent agent according to different dialogue types. The stored historical dialogues are not limited to the forms of ordinary text, rich text, structured text, etc. Dialogue recall is to recall the historical dialogues most relevant to the user's questions from the historical dialogues according to the dialogue type corresponding to the user's questions, through multiple dimensions such as time and semantic relevance, so as to fill in the context information of the user's questions. Since the recalled historical dialogue content will affect the effect of context understanding to a certain extent, the recall strategy is to denoise the historical dialogue content and convert the historical dialogue content into a text format that is easier for the large language model (LLM) to understand, such as summarizing long texts, format conversion, dialogue deduplication, etc. Due to the different business scenarios of historical conversations, the expression methods of historical conversations are different. In order to achieve better context understanding, template assembly is to assemble customized prompt information templates (usually including information such as roles and environments) based on the domain knowledge unique to the historical conversation scenarios. The historical conversations and prompt information templates are input into the large language model to obtain the output results of the context understanding module, which include question clarification, question rewriting and question answering. Question clarification is when the context information is not enough to clearly judge the user's question, you can ask the user to clarify appropriately, such as: "Sorry, I don't quite understand what you mean." Question rewriting is when the user's question is relatively clear, the context information is appropriately summarized and refined, the reference relationship is eliminated, the user's needs are fully expressed, and the user's needs are handed over to the intelligent agent for processing, such as: "What is the recent trend of the number of daily active users of xx video?" Question answering is when there is information in the context information that can directly answer the user's question, the information can be directly refined and the user can be directly answered, such as: "According to the above answer, the number of daily active users in the past three days is xxx."
[0152] Continue to refer Figure 5 , in step 505, high frequency questions are recalled.
[0153] Match the rewritten questions again with the high-frequency question bank.
[0154] In step 506, determine whether it is a hit.
[0155] If the rewritten question successfully matches the high-frequency question library, it is judged as a hit, and the intent of the corresponding question and related auxiliary prompt information are directly determined, and the process proceeds to step 504 to determine whether there are multiple intents or ambiguous intents; if the rewritten question fails to match the high-frequency question library, it is judged as a miss, and the process proceeds to step 507 to perform intent recognition.
[0156] In step 507, intent recognition is performed.
[0157] The intent recognition module uses a traditional text classification model, similarity retrieval, and a large language model to recognize the intent of user questions, obtain three intent recognition results, vote on the three intent recognition results, and determine the user question intent type based on the number of votes, business scenarios, and redirection strategies. The specific implementation method of intent recognition is not limited to this.
[0158] In step 504, determine whether there are multiple intentions or ambiguous intentions.
[0159] After determining the user's question intention, the user's question intention is judged, and it is determined whether the user's question is assigned to multiple intelligent agents or a single intelligent agent for execution. Before determining the corresponding intelligent agent to handle the user's question, global task planning is performed first.
[0160] Since global task planning is directly performed based on a large language model, there will be many problems such as unclear capabilities of the system's available tools, limited understanding, and assumptions. In order to further improve the accuracy, stability, and usability of global task planning, the embodiments of the present application manually preset task groups for specific field tasks, and use large language models to bind the preset task groups to specific intents, so that the intelligent agent can exert the autonomy of the large language model within a relatively limited scope.
[0161] Example, reference Figure 8 , Figure 8 It is a structural diagram of the global task planning module provided by an embodiment of the present application. The user question, the problem intent type and the user feedback information (optional) are input into the global task planning module 801, and it is determined in the step formula 802 whether the user question involves a single-step tool call or a multi-step tool call. The corresponding task execution tool is determined by the user problem intent, and the corresponding tool is directly called and the result is returned, which can improve the response efficiency of simple problems and reduce the cost of calling subsequent execution agents. If the user problem involves a multi-step tool call, it is determined in the multi-agent mode 803 whether the user problem is a multi-intention problem or an intention fuzzy problem. If the user problem is a single intention problem, the execution plan of the corresponding intention is obtained and a set of plans is output; if the user problem is a multi-intention problem or an intention fuzzy problem, the large language model is prompted to decompose the user problem into sub-problems, which can be decomposed by the large language model in combination with the existing tool capabilities and the case problem library that has been deposited by the system, and the user problem is decomposed into multiple single intentions, and the execution plan of the corresponding intention is obtained, and multiple sets of plans are output. In addition, if the user feedback information is input into the global task planning module, the execution plan can be tailored according to the user feedback information, and some unnecessary pre-steps in the execution plan (not shown in the schematic diagram) can be skipped.
[0162] After obtaining the execution plan corresponding to the user's question, the intelligent agent is called to execute the execution plan corresponding to the user's question. The intelligent agent gradually passes information to the internal or external execution tool according to the established task execution plan. After calling the execution tool to obtain the execution result, the execution result can be displayed to the user and used for message generation. The execution result can be displayed to the user when each step of the execution tool is completed, or it can be displayed to the user after all tools are executed. The embodiment of the present application mainly describes the input and core scheduling functions of the intelligent agent, and does not define the output form. In different business scenarios, the intelligent agent can have a variety of forms of expression. For example, refer to Fig. 9 , Fig. 9 The electronic device implementing the intelligent question-answering processing method of the embodiment of the present application may be a server, combined with Fig. 9 The various steps shown explain the process of the intelligent agent executing the task plan provided in the embodiment of the present application.
[0163] In step 901, a step-by-step dialog is started.
[0164] The user question, question intent type, execution plan, and auxiliary information (optional, such as metadata, user feedback information, etc.) are input into the intelligent agent.
[0165] In step 902, the tool is executed step by step.
[0166] Determine execution plans for multiple single problem intentions based on user questions, and determine the execution tool for each single problem intention based on the problem intention type and execution plan. Step by step, call the execution tool for each single problem intention to obtain the execution result of the execution plan corresponding to the problem intention.
[0167] In step 903, determine whether it is successful.
[0168] For the execution result of each single problem intention, if the execution result indicates that the execution is successful, then go to step 904 to render the corresponding tool; if the execution result indicates that the execution fails, then go to step 911 to uniformly restate the errors.
[0169] In step 905, dynamic programming is performed.
[0170] Dynamically plan the execution plan for unexecuted single-issue intentions.
[0171] In step 906, determine whether to end.
[0172] If the execution plan of each single problem intention is completed, then go to step 907 to recommend problems; if there is an execution plan of a single problem intention that has not been completed, then go to step 902 to execute the tool in a single step.
[0173] In step 907, a question is recommended.
[0174] Suggest other questions related to the user's question.
[0175] In step 908, the assessment is answered.
[0176] The correctness of the execution results of each single problem intention is evaluated.
[0177] In step 909, the report is set to be folded.
[0178] The execution results of evaluating the correct single question intention are summarized and a result report is generated, and the process proceeds to step 910 to end the step-by-step dialogue and output the result set.
[0179] During the process of executing the task plan, the intelligent agent will also dynamically perform local task planning and return the results of each task execution step to the user in a streaming manner. Local task planning is responsible for making appropriate adjustments to a set of execution plans during the execution of a given task execution plan. This is similar to global task planning, which determines a set of execution plans based on the problem intent, and can reduce the omission of single-step execution plans. The embodiment of this application classifies the task planning-related logic into a "thinking" module. For example, refer to Fig.10 , Fig.10 1 is a schematic diagram of the task state transfer process provided by the embodiment of the present application. The solid line represents the inevitable logical trend, and the dotted line represents the possible logical trend.
[0180] Taking the indicator query function as an example, the user question is "What are the daily active users and monthly active users of xx video in the past 7 days?" The thinking module will decompose the user question and plan the task. The thinking module has the function of global task planning. The user question is decomposed into two indicator query intentions, "What are the daily active users of xx video in the past 7 days?" and "What are the monthly active users of xx video in the past 7 days?", and the execution plan and execution tool of each indicator query intention are determined. The execution tool may include an indicator intention decomposition tool and an indicator query tool. The indicator query intention of "What are the daily active users of xx video in the past 7 days?" is decomposed 1001 and queried 1002 to obtain the execution result of the indicator query intention. The thinking module is called to evaluate the execution result of the indicator query intention. If the evaluation result indicates that the execution is successful, a drawing 1003 and a summary report 1004 are performed. If the evaluation result indicates that the execution fails and there is a daily active user indicator association table, SQL 1005 is generated and SQL 1006 is executed. If the SQL is executed successfully, a drawing 1003 and a summary report 1004 are performed. If the SQL execution fails, regenerate SQL1005 and then execute SQL1006.
[0181] If the evaluation result indicates that the execution failed and there is no daily active user indicator association table, then table search 1007, data check 1008, SQL generation 1005 and SQL execution 1006 are performed. If SQL execution is successful, drawing 1003 and summary report 1004 are performed. If SQL execution fails, SQL is regenerated 1005 and SQL is executed again 1006. If the evaluation result indicates that the execution failed, the indicator intention decomposition 1001 can also be performed again.
[0182] By combining the execution results of the execution tools, the subsequent execution path is dynamically selected. The process of selecting the subsequent task plan can be regarded as a finite state machine transfer. By constraining the transfer relationship between the execution tools, the selection range of the large language model is limited, the assumptions of the large language model are reduced, and the certainty and stability of the intelligent question-answering process are improved.
[0183] The task state transition process corresponding to the indicator query intent "What is the number of monthly active users of xx video in the past 7 days?" is the same as the task state transition process corresponding to the indicator query intent "What is the number of daily active users of xx video in the past 7 days?", and will not be repeated here. When the tasks of each indicator query intent are executed, the execution results of each indicator query intent are summarized, and the combined analysis tool is called to analyze and display the results.
[0184] The thinking module is the task planning module of the entire system, including global task planning and local task planning. The following is an explanation of the logical flow of the thinking module. For example, refer to Fig.11 , Fig.11 11 is a flowchart of the thinking module provided in the embodiment of the present application. The input of the thinking module is user questions, question intent type, and environmental observation information. Environmental observation information refers to the content revealed to the user by the executed tool, whether the tool execution status is successful, etc. The electronic device that implements the intelligent question-answering processing method of the embodiment of the present application can be a server. Combined with the various steps shown in 11, the logical flow of the thinking module provided in the embodiment of the present application is explained.
[0185] In step 1101, it is determined whether the observation information is empty.
[0186] If the environment observation information is empty, that is, there is no environment observation information, it indicates that it is a new task, then go to step 1102, global planning, and perform global task planning based on the given user problem and problem intention type; go to step 1103, post-verification, and perform post-verification on the globally planned task, which can assist in prompting the accuracy of the task execution plan, such as checking whether the tool name is correct, whether the order of the task execution plan is correct, etc., and output the task execution plan.
[0187] If the environment observation information is not empty, that is, there is environment observation information, it means that part of the task has been executed. At this time, local task planning is required, and the process goes to step 1104 to determine whether the previous task has failed.
[0188] In step 1104, it is determined whether the previous task has failed.
[0189] If it is determined according to the status code of the execution tool that the previous task execution failed, then go to step 1105, change the question form, rewrite the question in combination with the previous task execution failure information, and go to step 1102, global planning, re-plan the global task based on the rewritten question.
[0190] If it is determined according to the status code of the execution tool that the previous task was successfully executed, the process proceeds to step 1106 to answer the evaluation, prompting the large language model to perform a correctness evaluation on the execution result of the previous task.
[0191] In step 1107, determine whether it is accurate.
[0192] If the execution result of the previous task is evaluated as inaccurate, then go to step 1109 to change the question, go to step 1110 to retry the plan, and re-execute the plan based on the rewritten question to improve the accuracy of the execution result.
[0193] If the execution result of the previous task is evaluated as accurate, the process proceeds to step 1108, dynamic planning, and the subsequent local task planning process is entered, the subsequent task execution path is selected according to the task state transfer, and the task execution plan is output.
[0194] The intent recognition classification model in the embodiment of the present application is not limited to the transformer-based text classification model. The prompt words of the large language model can be defined by yourself in combination with the scenario tasks, such as context understanding prompts, task planning prompts, question transformation prompts, answer evaluation prompts, etc. The intelligent agent in the embodiment of the present application is not limited to the implementation method and expression form when it has core capabilities such as tool scheduling, tool execution, and execution result disclosure. The thinking module is not limited to multiple modules such as the evaluation module, post-verification module, and question transformation module. The task state transfer in local task planning has different transfer strategies in different problem intentions and different business scenarios.
[0195] In the above-mentioned user question and answer application scenario, the combination of global task planning and local task planning improves the accuracy, stability and controllability of intelligent question and answer processing compared to the solutions of global task planning and local task planning only. The overall effect of intelligent agent execution of tasks is improved through data precipitation modules such as high-frequency question library and user historical conversations. The method of binding task execution plan with question intent can reduce the difficulty of task planning using large language models, thereby improving the controllability of task planning.
[0196] The following is a description of an exemplary structure of the intelligent question-answering processing device 455 provided in the embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the intelligent question and answer processing device 455 of the memory 450 may include: a question analysis module 4551, which is used to obtain the target question text in response to the received question and answer request, and perform intent analysis on the target question text to obtain the intent analysis result; a question decomposition module 4552, which is used to decompose the target question text based on the intent analysis result and the target question text when it is determined based on the intent analysis result that the target question text meets the question decomposition condition, to obtain multiple sub-questions, wherein each sub-question corresponds to a sub-intention; a first determination module 4553, which is used to determine, for each sub-question, a first execution plan corresponding to the sub-intention corresponding to the sub-question, and determine the first execution result corresponding to the sub-question based on the first execution plan; a second determination module 4554, which is used to perform a finite state transfer based on the first execution results corresponding to each sub-question, and determine the reply text corresponding to the target question text.
[0197] In some embodiments, the question analysis module 4551 is also used to respond to the received question and answer request, obtain the original question text, and match the original question text with each reference question text in the reference text library to obtain a first text matching result, and the frequency of occurrence of the reference question text is greater than a preset threshold value; when the first text matching result indicates that the reference text library does not include any reference question text that successfully matches the original question text, the original question text is matched with a preset question template to obtain a second text matching result; when the second text matching result indicates that the original question text fails to match the preset question template, the text matching model is called to match the original question text with each candidate text in the question text data set to obtain a third text matching result; when the third text matching result indicates that there is a candidate text in the question text data set that successfully matches the original question text, the candidate text is determined as the target question text.
[0198] In some embodiments, the question analysis module 4551 is also used to determine the reference question text as the target question text when the first text matching result indicates that there is a reference question text in the reference text library that successfully matches the original question text; or to determine the template text indicated by the preset question template as the target question text when the second text matching result indicates that the original question text successfully matches the preset question template.
[0199] In some embodiments, the question analysis module 4551 is also used to determine the historical conversation content and historical conversation scenes corresponding to the original question text when the third text matching result represents that there is no candidate text that successfully matches the original question text in the question text data set; determine the context information corresponding to the original question text based on the historical conversation content and historical conversation scenes; and when the original question text is rewritten based on the context information and the rewriting is successful, determine the target question text based on the rewritten question text.
[0200] In some embodiments, the question analysis module 4551 is also used to output clarification information corresponding to the original question text when the original question text is rewritten based on context information and the rewriting fails; or when the original question text is rewritten based on context information and the rewriting fails, if the reply text corresponding to the original question text can be determined based on the context information, output the reply text corresponding to the original question text.
[0201] In some embodiments, the question analysis module 4551 is also used to call a text classification model to perform intent classification on the target question text to obtain an intent classification result; call a text similarity model to perform similar text retrieval on the target question text to obtain a similar intent result; call a large language model to perform intent prediction on the target question text to obtain an intent prediction result; determine the intent analysis result based on the intent classification result, similar intent result and intent prediction result.
[0202] In some embodiments, the first determination module 4553 is also used to determine the task execution agent and task execution tool corresponding to the sub-problem based on the first execution plan; call the task execution agent and task execution tool to execute the first execution plan to obtain the first execution result corresponding to the sub-problem.
[0203] In some embodiments, the second determination module 4554 is also used to, for each sub-problem, adjust the first execution plan corresponding to the sub-problem to obtain a second execution plan when the first execution result corresponding to the sub-problem indicates an execution failure; determine the second execution result corresponding to the sub-problem based on the second execution plan; and when the second execution result indicates a successful execution, determine the reply text corresponding to the target question text based on the second execution result and the first execution result indicating a successful execution.
[0204] In some embodiments, the second determination module 4554 is also used to determine the execution failure information when the second execution result represents an execution failure, and rewrite the sub-problem based on the large language model and the execution failure information to obtain the rewritten first sub-problem; determine the third execution plan corresponding to the rewritten first sub-problem, and determine the third execution result corresponding to the rewritten first sub-problem based on the third execution plan; when the third execution result represents a successful execution, determine the reply text corresponding to the target question text based on the third execution result and the first execution result representing a successful execution.
[0205] In some embodiments, the second determination module 4554 is also used to evaluate the correctness of the first execution results corresponding to each sub-problem when the first execution results corresponding to each sub-problem indicate successful execution, so as to obtain each first evaluation result; when each first evaluation result passes the evaluation, the response text corresponding to the target question text is determined based on each first execution result.
[0206] In some embodiments, the second determination module 4554 is also used to determine the result error information of the first execution result that failed the evaluation when there is a first evaluation result that is a first execution result that failed the evaluation, and rewrite the sub-problem corresponding to the first execution result that failed the evaluation based on the large language model and the result error information to obtain the rewritten second sub-problem; based on the rewritten second sub-problem, re-execute the first execution plan corresponding to the sub-problem, determine the fourth execution result corresponding to the rewritten second sub-problem, and evaluate the correctness of the fourth execution result to obtain the second evaluation result; when the second evaluation result is that the evaluation is passed, determine the reply text corresponding to the target question text based on the fourth execution result and the first execution result with the evaluation result being that the evaluation result is passed.
[0207] The embodiment of the present application provides a computer program product, which includes computer executable instructions or computer programs, and the computer executable instructions or computer programs are stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instructions or computer programs from the computer-readable storage medium, and the processor executes the computer executable instructions or computer programs, so that the electronic device executes the intelligent question-answering processing method described above in the embodiment of the present application.
[0208] The present application embodiment provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions or computer programs are stored. When the computer-executable instructions or computer programs are executed by a processor, the processor will be caused to execute the intelligent question-answering processing method provided by the present application embodiment, for example, Figure 3A The intelligent question answering processing method is shown.
[0209] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0210] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0211] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0212] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0213] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. An intelligent question-answering processing method, characterized in that: The method comprises: In response to the received question-answering request, a target question text is obtained, and an intent analysis is performed on the target question text to obtain an intent analysis result; When it is determined based on the intention analysis result that the target question text meets the problem decomposition condition, based on the intention analysis result and the target question text, the target question text is decomposed to obtain a plurality of sub-questions, wherein each of the sub-questions corresponds to a sub-intention; For each of the sub-problems, determine a first execution plan corresponding to the sub-intention corresponding to the sub-problem, and determine a first execution result corresponding to the sub-problem based on the first execution plan; Based on the first execution results corresponding to each of the sub-questions, a finite state transfer is performed to determine the answer text corresponding to the target question text.
2. The method according to claim 1, characterized in that The step of obtaining the target question text in response to the received question-answering request includes: In response to the received question-and-answer request, an original question text is obtained, and the original question text is matched with each reference question text in the reference text library to obtain a first text matching result, wherein the occurrence frequency of the reference question text is greater than a preset number threshold; When the first text matching result indicates that the reference text library does not include any reference question text that successfully matches the original question text, matching the original question text with a preset question template to obtain a second text matching result; When the second text matching result indicates that the original question text fails to match the preset question template, calling the text matching model to match the original question text with each candidate text in the question text data set to obtain a third text matching result; When the third text matching result indicates that there is a candidate text in the question text data set that successfully matches the original question text, the candidate text is determined as the target question text.
3. The method according to claim 2, characterized in that The method further comprises: When the first text matching result indicates that there is a reference question text in the reference text library that successfully matches the original question text, determining the reference question text as the target question text; or When the second text matching result indicates that the original question text matches the preset question template successfully, the template text indicated by the preset question template is determined as the target question text.
4. The method according to claim 2, characterized in that: The method further comprises: When the third text matching result indicates that there is no candidate text in the question text data set that successfully matches the original question text, determining the historical conversation content and historical conversation scene corresponding to the original question text; Determining context information corresponding to the original question text based on the historical conversation content and the historical conversation scene; When the original question text is rewritten based on the context information and the rewriting is successful, the target question text is determined based on the rewritten question text.
5. The method according to claim 4, characterized in that The method further comprises: When the original question text is rewritten based on the context information and the rewriting fails, outputting clarification information corresponding to the original question text; or When the original question text is rewritten based on the context information and the rewriting fails, if the answer text corresponding to the original question text can be determined based on the context information, the answer text corresponding to the original question text is output.
6. The method according to any one of claims 1 to 5, characterized in that: The performing intention analysis on the target question text to obtain an intention analysis result includes: Calling a text classification model to perform intent classification on the target question text to obtain an intent classification result; Calling a text similarity model to perform similar text retrieval on the target question text to obtain similar intent results; Calling a large language model to perform intent prediction on the target question text to obtain an intent prediction result; An intent analysis result is determined based on the intent classification result, the similar intent result and the intent prediction result.
7. The method according to any one of claims 1 to 5, characterized in that: The determining, based on the first execution plan, a first execution result corresponding to the sub-problem includes: Based on the first execution plan, determining a task execution agent and a task execution tool corresponding to the sub-problem; The task execution agent and the task execution tool are called to execute the first execution plan to obtain a first execution result corresponding to the sub-problem.
8. The method according to any one of claims 1 to 5, characterized in that: The step of performing finite state transfer based on the first execution results corresponding to each of the sub-questions to determine the answer text corresponding to the target question text includes: For each of the sub-problems, when the first execution result corresponding to the sub-problem indicates execution failure, adjusting the first execution plan corresponding to the sub-problem to obtain a second execution plan; Determine a second execution result corresponding to the sub-problem based on the second execution plan; When the second execution result indicates successful execution, a reply text corresponding to the target question text is determined based on the second execution result and the first execution result indicating successful execution.
9. The method according to claim 8, characterized in that The method further comprises: When the second execution result indicates an execution failure, determining execution failure information, and rewriting the sub-problem based on the large language model and the execution failure information to obtain a rewritten first sub-problem; Determine a third execution plan corresponding to the rewritten first sub-problem, and determine a third execution result corresponding to the rewritten first sub-problem based on the third execution plan; When the third execution result indicates successful execution, a reply text corresponding to the target question text is determined based on the third execution result and the first execution result indicating successful execution.
10. The method according to claim 8, characterized in that The method further comprises: When the first execution results corresponding to each of the sub-problems indicate successful execution, the first execution results corresponding to each of the sub-problems are evaluated for correctness to obtain respective first evaluation results; When each of the first evaluation results is a passed evaluation, a response text corresponding to the target question text is determined based on each of the first execution results.
11. The method according to claim 10, characterized in that The method further comprises: When there is a first execution result in which the first evaluation result is a failed evaluation, determining result error information of the first execution result in which the evaluation is failed, and rewriting the subproblem corresponding to the first execution result in which the evaluation is failed based on the large language model and the result error information to obtain a rewritten second subproblem; Based on the rewritten second sub-problem, re-execute the first execution plan corresponding to the sub-problem, determine a fourth execution result corresponding to the rewritten second sub-problem, and perform a correctness evaluation on the fourth execution result to obtain a second evaluation result; When the second evaluation result is that the evaluation is passed, based on the fourth execution result and the first execution result whose evaluation result is that the evaluation is passed, a reply text corresponding to the target question text is determined.
12. An intelligent question-answering processing device, characterized in that: The device comprises: A question analysis module is used to obtain a target question text in response to a received question-answering request, and perform intent analysis on the target question text to obtain an intent analysis result; A question decomposition module is used for, when it is determined based on the intention analysis result that the target question text meets the question decomposition condition, decomposing the target question text based on the intention analysis result and the target question text to obtain a plurality of sub-questions, wherein each of the sub-questions corresponds to a sub-intention; A first determination module is used to determine, for each of the sub-problems, a first execution plan corresponding to the sub-intention corresponding to the sub-problem, and determine a first execution result corresponding to the sub-problem based on the first execution plan; The second determination module is used to perform finite state transfer based on the first execution results corresponding to each of the sub-questions, and determine the answer text corresponding to the target question text.
13. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions or computer programs; The processor is used to implement the intelligent question and answer processing method described in any one of claims 1 to 11 when executing the computer executable instructions or computer programs stored in the memory.
14. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the intelligent question and answer processing method according to any one of claims 1 to 11 is implemented.
15. A computer program product comprising computer executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the intelligent question and answer processing method according to any one of claims 1 to 11 is implemented.
Citation Information
Cited By
Multi-agent information processing method and device based on large model, electronic equipment, storage medium and program product
CN120763321A
Multi-agent information processing methods, devices, electronic devices, storage media, and program products based on large models.
CN120763321B
Data analysis method and device, electronic equipment and computer readable storage medium
CN120994716A