Task-based dialogue method, storage medium and computer device
Determining user intentions and generating planning solutions through large models solves the problem of low matching accuracy of existing task-based dialogue solutions, and improves the satisfaction of user needs and work efficiency.
Patent Information
- Application Number
- CN202410666946.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-05-28
AI Technical Summary
The matching accuracy of existing task-based dialogue solutions is low, and the manual enumeration solution has a heavy workload, making it difficult to meet the personalized needs of users.
Determine user intention information through a large model, generate a planning plan based on user information and intention information, execute the execution steps in the plan, and obtain the plan execution results.
It improves the accuracy of intent recognition and solution planning, reduces the workload of solution enumeration, enhances the matching between the solution execution results and user intentions, and meets the actual needs of users.
Smart Images

Figure CN118245589B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a task-based dialogue method, a storage medium and a computer device. Background Art
[0002] Task-based dialogue refers to interactive dialogues in which users have clear goals or tasks, and the AI system tries its best to assist users in completing these goals or tasks. In task-based dialogues, the AI system tries to understand the user's intentions and provide relevant information, suggestions, or perform corresponding actions to meet the user's needs. For example, if the user enters in a task-based dialogue: "Please help me book a conference room for tomorrow at 3 pm", the AI system will understand the user's intentions and automatically complete the task of booking a conference room.
[0003] Task-based dialogues are usually used in the fields of automated assistants, customer service, smart home control, etc. for enterprises or individuals. They can help improve work efficiency, improve user experience, and reduce manual intervention. When implementing task-based dialogues, existing technologies mainly process natural semantic information based on intent recognition, slot filling, and knowledge graphs. That is, first, the intent in the dialogue information is identified through text classification, then slot filling is performed based on entity recognition, and finally, synonyms or entities are normalized through knowledge graphs to lock in the user's true intent and assist the user in completing the corresponding goal or task.
[0004] However, identifying the intent in conversation information through text classification or finding solutions through knowledge graphs requires the system to enumerate all possible user problems and their corresponding solutions as much as possible. However, these problems and solutions are difficult to apply to a large number of personalized needs of users, and they have a large lag and low solution matching accuracy, making it difficult to meet the actual needs of users. Summary of the invention
[0005] In view of this, the present application provides a task-based dialogue method, storage medium and computer device, the main purpose of which is to solve the technical problems of low matching accuracy of existing task-based dialogue solutions and high workload of manual enumeration solutions.
[0006] According to a first aspect of the present invention, a task-based dialogue method is provided, the method comprising: in response to receiving dialogue information initiated by a user, the client sends the dialogue information to a server; in response to receiving the dialogue information, the server obtains user information of the user, and based on the dialogue information and the user information, determines the user's intention information through a large model; based on the user information and the intention information, the server generates a planning scheme through a large model, and executes the execution steps in the planning scheme to obtain a scheme execution result; the server sends the scheme execution result to the client; the client receives and displays the scheme execution result.
[0007] According to a second aspect of the present invention, a task-based dialogue method is provided, the method comprising: in response to receiving a dialogue message initiated by a user, sending the dialogue message; receiving and displaying a solution execution result, wherein the solution execution result is obtained by executing the execution steps in a planning solution, the planning solution is generated by a big model based on the user information of the user and the intention information corresponding to the dialogue message, and the intention information is determined by the big model based on the dialogue information and the user information.
[0008] According to a third aspect of the present invention, a task-based dialogue method is provided, the method comprising: in response to receiving dialogue information initiated by a user, obtaining user information of the user, and determining the user's intention information through a large model based on the dialogue information and the user information; generating a planning scheme through a large model based on the user information and the intention information, and executing the execution steps in the planning scheme to obtain a scheme execution result; sending the scheme execution result to the client, so that the client receives and displays the scheme execution result.
[0009] According to a fourth aspect of the present invention, there is provided a storage medium having a computer program stored thereon, wherein the program implements the above-mentioned task-based dialogue method when executed by a processor.
[0010] According to a fifth aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned task-based dialogue method when executing the program.
[0011] The present invention provides a task-based dialogue method, storage medium and computer device. After receiving the dialogue information initiated by the user, the user information of the user is first obtained, and then the user's intention information is determined through a large model based on the dialogue information and the user information, and then a planning scheme is generated through the large model based on the user's user information and intention information, and finally the execution steps in the planning scheme are executed to obtain the scheme execution result. The above method realizes the intention clarification of the dialogue content and the planning and execution of the solution through the text analysis and text generation capabilities of the large model, which can make the intention recognition result closer to the real intention in the user dialogue, and also make the generated planning scheme no longer limited to the existing formed scheme, but can generate a new planning scheme, thereby reducing the workload of scheme enumeration and improving the matching accuracy between the scheme execution result and the user's intention, so as to meet the actual requirements of the user.
[0012] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0014] Figure 1 A schematic diagram showing a flow chart of a task-based dialogue method provided by an embodiment of the present invention;
[0015] Figure 2 A schematic diagram showing a flow chart of a task-based dialogue method provided by an embodiment of the present invention;
[0016] Figure 3 A schematic diagram showing a flow chart of a task-based dialogue method provided by an embodiment of the present invention;
[0017] Figure 4 A schematic diagram showing a flow chart of a task-based dialogue method provided by an embodiment of the present invention;
[0018] Figure 5 A schematic diagram showing a flow chart of a task-based dialogue method provided by an embodiment of the present invention;
[0019] Figure 6 A schematic diagram of a storage structure of a task solution provided by an embodiment of the present invention is shown;
[0020] Figure 7 A schematic diagram of a storage structure of a task solution provided by an embodiment of the present invention is shown;
[0021] Figure 8 A schematic diagram of a scenario of a task-based dialogue method provided by an embodiment of the present invention is shown;
[0022] Fig. 9 A schematic diagram of a scenario of a task-based dialogue method provided by an embodiment of the present invention is shown;
[0023] Fig.10 A schematic structural diagram of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0024] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0025] In one embodiment, Figure 1 As shown, a task-based dialogue method is provided, and the method is applied to a client and a server as an example for explanation, including the following steps:
[0026] 101. In response to receiving the dialogue information initiated by the user, the client sends the dialogue information to the server.
[0027] Specifically, when the user inputs and sends any dialogue information through the information input box of the client, the client can receive the dialogue information initiated by the user and send the dialogue information to the server. In this embodiment, the information input box can be any component that can receive text information, for example, the information input box can be a chat input box, a search input box, etc. The dialogue information can be any text information input by the user, for example, a greeting message "Hello", an inquiry message "Are you a robot?", an instruction message "Can you help me make a travel plan?", etc., which is not specifically limited in this embodiment.
[0028] 102. In response to receiving the dialogue information, the server obtains the user information of the user, and determines the user's intention information through a large model based on the dialogue information and the user information.
[0029] Specifically, in response to receiving the conversation information initiated by the user, the server can obtain the user information of the user, and input the obtained conversation information and user information as parameters into the pre-trained large model, so that the large model can respond to the conversation information initiated by the user based on the user information, and can determine the user's intention information through the conversation information. In this embodiment, the user information can be user feature information obtained with the authorization of the user, such as user portrait information, or it can be the user's recent operation and status information, as well as the historical conversation information of the user and the artificial intelligence and the context information of the current conversation, etc. The large model can be a generative language processing model such as a large language model and a multimodal model. This embodiment does not specifically limit the type of user information and the type of large model.
[0030] In this embodiment, the big model can determine the user's intention information through one or more rounds of dialogue. Specifically, when the intention in the dialogue information initiated by the user is unclear, the big model can only output the response information of the dialogue information and wait for the user to initiate the next round of dialogue; when the intention in the dialogue information initiated by the user is clear, the big model can identify the intention information in the dialogue information, and then generate a planning scheme based on the intention information, execute the planning scheme, and send the results of the scheme execution to the client for display after obtaining them. In addition, during the waiting time for the big model to plan and execute the scheme, the server can also output the response information of the dialogue information to the client for display, so as to achieve timely response to the dialogue information.
[0031] It is understandable that when the intention in the dialogue information is unclear, the server does not need to generate a planning scheme and execute the scheme, and therefore, there is no need to execute steps 103 to 105 in this scenario; accordingly, when the intention in the dialogue information is clear, the server can generate a planning scheme and execute the scheme, and send the scheme execution result to the client for display after obtaining the scheme execution result. For example, when the dialogue information is a chat message without clear intention such as "Hello", "Are you a robot?", the big model only needs to respond, and no actual solution needs to be generated; and when the dialogue information is a chat message with clear intention such as "What good reviews do I have recently?", "Can I pin it to the top?", the big model can clarify the user's intention information through the dialogue information and user information, such as "What are the recent new good reviews?", "Can I pin the good reviews to the top by myself", etc., so that the big model can generate corresponding solutions through the intention information, and output the solution results to the client for display, thereby answering the user's questions.
[0032] It should be noted that compared with the prior art method of identifying intent by text classification, the task-based dialogue method provided in this embodiment is more appropriate in terms of the method of identifying intent. In this embodiment, by utilizing the text analysis and text generation capabilities of the large model, the user's intent information is determined based on the user's dialogue information and user information, which can break through the limitations of traditional text matching and text classification on text, so that the determined intent information is closer to the user's real intention.
[0033] 103. Based on the user information and intention information, the server generates a planning scheme through a large model, and executes the execution steps in the planning scheme to obtain the execution result of the scheme.
[0034] Specifically, after determining the user's intention information, the server can input the user information and the intention information into another large model (hereinafter referred to as the large model agent). In this embodiment, the large model agent in step 103 is somewhat different from the large model in step 102, wherein the large model in step 102 can be used to provide daily conversations, while the starting point of the large model agent in step 103 is not for daily conversations, and it is not appropriate to do daily conversations. In this embodiment, the large model agent is mainly used in the field of directional knowledge, given a complete problem, through self-thinking, scheduling tools, and output solutions. Among them, the given problem is the intention information determined in step 102.
[0035] In this embodiment, the large model agent can generate a planning scheme based on user information and intention information through a pre-set prompt template. The planning scheme can be extracted from an existing planning scheme, or modified based on an existing planning scheme, or directly generated based on user information and intention information. After generating the planning scheme, the large model agent can plan and execute each execution step according to the execution steps in the planning scheme to obtain the execution result of the scheme.
[0036] It should be noted that, compared with the method of matching solutions through knowledge graphs in the prior art, the task-based dialogue method provided in this embodiment is more flexible in the way of generating planning solutions. In this embodiment, by using the text analysis and text generation capabilities of the large model agent to generate planning solutions, not only can existing planning solutions be recalled, but also existing planning solutions can be modified, or planning solutions that have not been available in the past can be directly generated based on the intent information, so that the generated planning solutions can be more matched with the user's intent information.
[0037] 104. The server sends the solution execution result to the client.
[0038] 105. The client receives and displays the solution execution result.
[0039] Specifically, after generating the solution execution result, the server can send the solution execution result to the client, and the client can display the solution execution result in response to receiving the solution execution result. For example, the client can display the solution execution result through various pages such as instant messaging page and search result page. In this embodiment, when the server outputs the solution execution result through the large model agent, it can also output other information, such as the user's conversation information, the user's intention information, the thinking information of the large model agent, etc. In this scenario, the server can send only part of the information output by the large model agent to the client for display. For example, the server can only send the solution execution result to the client, and then record the other information in the log for later analysis and processing.
[0040] The task-based dialogue method provided in this embodiment, after receiving the dialogue information initiated by the user, first obtains the user information of the user, then determines the user's intention information through the big model based on the dialogue information and the user information, and then generates a planning scheme through the big model based on the user information and the intention information, and finally executes the execution steps in the planning scheme to obtain the scheme execution result. The above method realizes the intention clarification of the dialogue content and the planning and execution of the solution through the text analysis and text generation capabilities of the big model, which can make the intention recognition result closer to the real intention in the user dialogue, and also makes the generated planning scheme no longer limited to the existing formed scheme, but can generate a new planning scheme, thereby reducing the workload of scheme enumeration and improving the matching accuracy between the scheme execution result and the user's intention, so as to meet the actual requirements of the user.
[0041] In one embodiment, before step 104, the task-based dialogue method may further include the following steps:
[0042] 106. Based on the intent information, the server uses a large model to determine whether the solution execution result is consistent with the intent information.
[0043] 107. When the execution result of the plan does not match the intention information, the server re-executes the execution steps in the planning plan to obtain a revised plan execution result.
[0044] Specifically, refer to Figure 2As shown in the flowchart, after receiving the dialogue information input by the user, the server can extract the user information from the global memory information, and then clarify the intention based on the dialogue information and the user information to obtain the intention information, and then perform global planning based on the intention information to obtain a planning scheme. Among them, the planning scheme can be extracted from the planning memory, or it can be modified based on the extracted planning scheme, or it can be directly generated. Furthermore, after generating the planning scheme, the server can call the tool to execute the scheme, obtain the execution result of the scheme, that is, obtain the answer to the question, and then judge and correct the execution result of the scheme (wherein, the judgment and correction process can be performed once or multiple times), that is, execute steps 106 and 107, so as to obtain the corrected execution result of the scheme, and finally output the corrected execution result of the scheme to the client for display.
[0045] In this embodiment, step 106 and step 107 can be implemented by an agent constructed by a large model. Among them, step 106 and step 107 can be implemented by two large model agents respectively, or by one large model agent. When implementing, a preset prompt template, i.e., prompt, can be input into the large model agent to improve the accuracy of judging and correcting the execution result of the solution.
[0046] The above-mentioned embodiment can effectively improve the accuracy of the solution execution results by judging and correcting the solution execution results, avoid deviations in the solution execution results, and thus improve the solution solution effect.
[0047] In one embodiment, the method for determining the intention information based on the dialogue information and the user information in step 102 may be implemented in the following manner:
[0048] 201. The server generates response information and a response identifier of the response information through a large model based on the dialogue information and the user information.
[0049] 202. When the response identifier is a question location identifier, the server determines the intention information according to the dialogue information.
[0050] Specifically, refer to Figure 3 As shown in the flowchart, when the big model performs intent recognition, it can generate response information and a response identifier of the response information based on the dialogue information input by the user and the recalled user information. In this embodiment, the big model for intent recognition needs to be trained with a data set of a predetermined knowledge field in advance so that the big model can complete daily conversations and output response information of the predetermined knowledge field, as well as a response identifier of the response information, wherein the response identifier can be used to indicate the type of response information.
[0051] In this embodiment, the answer mark can be designed according to the actual functional needs of the large model. For example, the answer mark can be set to the three marks of the problem location mark, the question question mark and the question rejection mark. These three marks can be used to indicate that the current dialogue information can be converted into clear intention information, the current dialogue information cannot be converted into clear intention information, and the current dialogue information does not meet the requirements of the predetermined knowledge domain and cannot be answered. In this embodiment, when the answer mark output by the large model is the problem location mark, it means that the current dialogue information can be converted into clear intention information. At this time, the user's intention information can be determined based on the user's dialogue information.
[0052] For example, refer to Figure 8 As shown in the flowchart, when the big model determines that the intention of the dialogue information input by the user is unclear, it can output the question question mark "Reply" and the corresponding response information; when the big model determines that the intention of the dialogue information input by the user is clear, it can output the problem location mark "Clarified" and the corresponding response information, and determine the user's intention information as "XXXXX solution" based on the user's dialogue information and context information, so as to clarify the user's intention.
[0053] The above-mentioned embodiment outputs the response information and the response identifier of the response information through the large model, and judges the response identifier, so that the large language model can quickly determine whether the intention information in the dialogue information can be recognized through the current dialogue content, thereby improving the recognition efficiency of the user's intention.
[0054] In one embodiment, the method of determining intent information based on conversation information in step 202 can be implemented in the following manner: when the response identifier is a question location identifier, the server converts the conversation information into question information in a preset field based on the context information in the user information, and uses the question information in the preset field as intent information.
[0055] Specifically, when the response identifier is a question location identifier, the server can convert the dialogue information into question information in a preset field based on the context information in the user information, and then use the question information in the preset field as the intent information. In this embodiment, the conversion of the dialogue information into question information in a preset field can be achieved through a prompt set in the large model. For example, the large model can convert the dialogue information input by the user "What good reviews do I have recently?" into professional question information in the merchant service knowledge field "What are the recent new good reviews?", and then use the question information as the intent information. In this embodiment, the converted question information is more standardized than the question input by the user, and therefore, it is easier to find an accurate solution in the corresponding knowledge field.
[0056] The above-mentioned embodiment can effectively improve the accuracy of intention recognition by converting dialogue information into question information in a preset knowledge field, thereby improving the recall efficiency and recall accuracy of existing solutions, and further improving the effect of solution execution.
[0057] In one embodiment, the method of determining intent information based on conversation information in step 202 can also be implemented in the following manner: when the response identifier is a question location identifier, the server determines the question type of the conversation information, converts the conversation information into question information in a preset field, and extracts context information from the user information and the conversation information, and then obtains the intent information based on the question type of the conversation information, the question information in the preset field, and the context information.
[0058] Specifically, when the response identifier is a question location identifier, the server can determine the user's intention information through a variety of information. In this embodiment, the server can first determine the question type of the dialogue information, then convert the dialogue information into question information in a preset field, and then extract context information from the user information and the dialogue information, and finally obtain the intention information based on the question type of the dialogue information, the question information in the preset field, and the context information. Among them, the question type can be set according to actual functional needs, for example, it can be set to a knowledge query type question and an operational question, or it can be set to a simple question type and a complex question type, etc., which is not specifically limited in this embodiment. The conversion of question information and the extraction of context information can be determined based on the training results of a large model, and there is no fixed setting rule.
[0059] In this embodiment, the intention information can be generated with the help of prompts set in the large model. For example, the prompts in the large model can be set as follows:
[0060] When Action==Clarified, the output must include the following four items: [Type, Problem, Info, Answer]. Note that all four items must be output. Type: problem type, which must be within [Consult, Operate]. Problem: generates questions from the merchant's perspective, and no information can be missing. Info: summarizes key context information, such as dates, orders, numbers, positive reviews, etc. Answer: outputs the answer to the question.
[0061] In this embodiment, by setting the generation step of the intent information in the prompt of the large model, the generated intent information can be made clearer and more specific. Based on the above prompt, the large model can output the following content for the dialogue information input by the user "What good reviews have I received recently?":
[0062] Question: What good reviews have I received recently?
[0063] Thought: Clearly identify the merchant's problem, search for answers, but not direct answers;
[0064] Action: Clarified;
[0065] Response: Thank you very much for your patience. It will take me some time to process it. It will be ready soon.
[0066] nType: Consult \nProblem: What are the new good reviews? \nInfo: Time: Recently; \nAnswer: Your recent good reviews include: 1. Good service attitude, 2. Good food taste;
[0067] The above embodiment can facilitate the large model agent to identify the difficulty of generating a planning solution, or to identify information such as the type of tools required for the planning solution, by setting the question type of the dialogue information in the intent information, so as to facilitate the large model agent to match a more accurate planning solution and obtain a more accurate solution execution result. In addition, by setting the question information and context information of the preset field in the intent information, the intent information can be made more complete and closer to the user's real intention, so as to improve the recall efficiency and recall accuracy of the existing solution, and then improve the effect of the solution execution.
[0068] In one embodiment, the task-based dialogue method may further include the following steps:
[0069] 203. When the response identifier is a question-asking identifier and / or a question-rejecting identifier, the server generates context information according to the dialogue information and the response information, and adds the context information to the user information.
[0070] Specifically, refer to Figure 3 As shown in the flowchart, when the answer mark output by the large model is a question-asking mark, it means that the current dialogue information cannot be converted into clear intention information, and / or, when the answer mark output by the large model is a question-rejecting mark, it means that the current dialogue information does not meet the requirements of the predetermined knowledge domain and cannot be answered. In this scenario, the dialogue information input by the user and the answer information output by the large model can be added to the user information as context information, so as to be used as reference information for the answer information in the next round of dialogue. At this time, there is no need to determine the intention information based on the user's dialogue information.
[0071] In this embodiment, when the big model presets a certain knowledge domain for daily conversation, the prompt set in the big model will constrain the big model to avoid answering questions in other knowledge domains to prevent the big model from outputting inaccurate information. Based on this, when the user inputs questions in other knowledge domains, the big model that has been pre-trained in the preset knowledge domain will output a question rejection mark and output the corresponding answer information; and when the question input by the user makes the big model unable to determine the user's intention, the big model can output information such as small talk, rhetorical questions, follow-up questions, greetings, identity introductions, etc., and a question follow-up mark will be output at this time.
[0072] For example, when the big model is pre-trained with a data set in the merchant service knowledge domain, and the prompt of the big model is set to only answer questions in the merchant service knowledge domain, and the big model is commanded to output the answer information and the answer identifier of the answer information, the user and the big model can have the following conversation:
[0073] Question: Hello;
[0074] Action: Reply;
[0075] Response: I am a merchant assistant, helping you solve tasks in the process of store operation. Is there anything I can help you with?
[0076] Question: Can you help me make a travel plan?
[0077] Action: Reject;
[0078] Response: I'm sorry, as a merchant assistant, I mainly provide help related to merchant services. For travel plans, I suggest you search for guides in XX, where there will be many good suggestions;
[0079] The above embodiment can prevent the large model from entering the process of intent recognition by identifying the question follow-up mark and / or question rejection mark output by the large model, thereby improving the speed of responding to the dialogue information. In addition, by recording the dialogue information and response information of the current round in the user information as reference information for the response information in the next round of dialogue, the accuracy of intent information recognition can be improved.
[0080] In one embodiment, the task-based dialogue method may further include the following steps:
[0081] 204. The server sends a response message to the client.
[0082] 205. The client receives and displays the response information.
[0083] Specifically, refer to Figure 3As shown in the flowchart, after the server obtains the conversation information and user information, the big model can respond to the user's conversation information. In addition, according to different response results, the big model will also output a response identifier of the response information. In this embodiment, no matter which kind of identifier is pre-set, the big model can output the response information corresponding to the conversation information and send the response information to the client for display. In this embodiment, refer to Figure 8 As shown in the scenario diagram, the client can only display the response information without displaying the response identifier of the response information.
[0084] In this embodiment, when the response identifier is a question follow-up identifier and / or a question rejection identifier, the large model can directly output response information to increase the response speed of the dialogue information; when the response identifier is a problem location identifier, the large model can first output response information to prompt the user to wait, such as outputting "Thank you very much for your patience, I need a little time to process it, it will be ready soon", and then generate and execute the planning plan during the user's waiting time, and finally send the execution result of the planning plan to the client for display.
[0085] The above embodiment can improve the efficiency of the dialogue between the artificial intelligence system and the user by generating response information and sending the response information to the client for display, thereby improving the user's interactive experience.
[0086] In one embodiment, the user information obtained in step 102 may include at least one of user portrait information, function information of preset tools, dialogue constraint information, user historical chat information, user historical operation information, user historical status information and context information.
[0087] Specifically, user information can play a role of running through history in the dialogue process between the user and the big model. User information can not only prevent the big model from forgetting historical information, but also serve as important reference information for dialogue information. In this embodiment, user information can be divided into three types of information according to the information type: long memory information, short memory information and context information. Among them, long memory information can include important reference information that needs to be stored for a long time, such as user portrait information, function information of basic tools, and dialogue constraint information. Short memory can include important reference information that needs to be updated regularly, such as user historical chat information, user historical operation information, and user historical status information. Context information can include important reference information that needs to be updated in real time, such as user feedback context information and system feedback context information.
[0088] In this embodiment, the user portrait information can be determined according to the identity of the user. For example, when the user is a consumer user, the user portrait information can be a portrait of the user's consumption behavior; when the user is a merchant, the user portrait information can be a merchant portrait, a store portrait, and other portrait information. By adding the user portrait information to the user information, it is convenient to conduct a conversation according to the user's personality during the conversation. The function information of the preset tool refers to the definition of each basic function and the definition of parameters required in the conversation process, such as the function definition information of the order query function and the evaluation query function. The dialogue constraint information refers to the restrictive conditions that restrict the large model from outputting certain information, wherein the dialogue constraint information can enable the large model to avoid answering questions that are not related to the preset knowledge field during the conversation, and can also avoid the large model from hallucinating and outputting inaccurate information. The user's historical chat information refers to the chat record information between the user and the large model, and the chat record information can be the chat record information of the previous hour, the previous day, or the previous N days of the current time, etc., which is not specifically limited in this embodiment. The user's historical operation information can be the relevant operation information involving the preset knowledge field initiated by the user, such as the user complaint operation, the user refund operation, etc. The user's historical status information can be the user's status flag, such as the evaluation status, the order status, etc. Context information mainly includes recent chat records between users and the big model, as well as intermediate status information such as planning plans, execution steps, and step execution results.
[0089] In this embodiment, after incorporating multiple information into the user information, the length of the user information will increase. Based on this, when storing user information, this embodiment can store all user information, and then set a set of configuration rules when inputting the user information into the big model, and filter the user information or perform structured extraction on the user information through the configuration rules, and then input the filtered or extracted information into the big model, so that the big model can make a more accurate and user-friendly response according to the input user information in the process of generating response information, generating planning schemes, and executing planning schemes.
[0090] The above embodiment can improve the accuracy of dialogue responses and the accuracy of intention recognition by adding multiple information to user information and using the user information as reference information for generating response information.
[0091] In one embodiment, the above-mentioned task-based dialogue method may further include the following steps.
[0092] 301. The server obtains historical chat record information according to a preset long memory generation cycle.
[0093] 302. The server generates user behavior summary information of at least one dimension through a large model based on the historical chat record information, and obtains user portrait information based on the user behavior summary information.
[0094] Specifically, the server can generate user behavior summary information of at least one dimension based on user information and user's historical chat record information through a large model according to a preset long memory generation cycle, and then generate user portrait information through at least one dimension of user behavior summary. In this embodiment, the length of the long memory generation cycle can be set according to actual conditions, and different cycles can be set for different users. For example, for users who log in frequently, it can be updated once a week, for users who log in occasionally, it can be updated once a month, for users who log in once a long time, it can be updated once a year, and so on.
[0095] Furthermore, depending on the scenario and the target of the task-based dialogue, the type and content of the user portrait will also be different. For example, in the field of merchant service knowledge, the user portrait information can be a merchant portrait and a store portrait. Among them, the merchant portrait can include the merchant name, the personality traits shown by the merchant during the chat, and frequently mentioned issues, etc.; the store portrait can include basic information of the store in multiple dimensions, such as store name, store introduction, store status, store location, store brand, main items, applicable crowds, popular products, popular comments, and other information in multiple dimensions, etc. In this embodiment, the user portrait information needs to take into account the feature information of multiple dimensions, so the number of words will be more. Based on this, when generating the user portrait information, the user portrait information can be summarized and simplified through a large model to ensure that the user portrait information can retain multi-dimensional and simplified user feature information.
[0096] The above-mentioned embodiment can improve the accuracy and comprehensiveness of user portrait characterization by periodically using a large model to generate user portrait information, and at the same time ensure the timeliness of user portrait updates, thereby effectively improving the accuracy of dialogue responses and the accuracy of intent recognition.
[0097] In one embodiment, the task-based dialogue method may further include the following steps:
[0098] 303. The server obtains historical chat record information and / or historical operation detail information according to a preset short memory generation cycle.
[0099] 304. The server performs structured information extraction on the historical chat record information and / or the historical operation detail information to obtain at least one of the user's historical chat information, the user's historical operation information, and the user's historical status information.
[0100] Specifically, the server can perform structured information extraction on the historical chat record information and / or historical operation detail information according to a preset short memory generation cycle to obtain at least one of the user's historical chat information, user's historical operation information, and user's historical status information. In this embodiment, the time length of the short memory generation cycle can be set according to actual conditions, for example, it can be set to update in units of one day or one hour, etc. In this embodiment, short memory information such as user's historical chat information, user's historical operation information, and user's historical status information can be stored in the format of detailed information, and summarized according to certain specifications during the information extraction process, so as to obtain complete and concise user information. For example, the extraction and summary format of the extracted user's historical chat information, user's historical operation information, and user's historical status information can refer to the following content:
[0101] User historical operation information:
[0102] 2023-11-25 12:00:03, submitted the appeal;
[0103] 2023-11-26 14:32:03, agreed to refund;
[0104] 2023-11-26 18:12:03, agreed to refund;
[0105] User history status information:
[0106] 2023-11-25 12:00:03, xxx order was successful;
[0107] 2023-11-26 14:32:03, xxx order positive review;
[0108] 2023-11-26 18:12:03, new task accepted;
[0109] User historical chat information:
[0110] 2023-11-25 12:00:03, {"user": "ddd", "assistant": "dddd"};
[0111] 2023-11-25 14:32:03, {"user": "ddd", "assistant": "dddd"};
[0112] 2023-11-26 18:12:03, {"user": "ddd", "assistant": "dddd"};
[0113] The above-mentioned embodiment can improve the timeliness of user information update and ensure the accuracy of user information by periodically updating user historical chat information, user historical operation information and user historical status information, thereby effectively improving the accuracy of dialogue response and the accuracy of intent recognition.
[0114] In one embodiment, the method for generating a planning solution based on user information and intention information in step 103 may be implemented by the following steps:
[0115] 401. The server performs text matching and / or similarity matching on the intention information and the scheme names of the basic schemes in the planning scheme library to obtain a pre-selected planning scheme that matches the intention information.
[0116] 402. The server determines the planning scheme through the big model based on the user information, the intention information and the pre-selected planning scheme.
[0117] Specifically, refer to Figure 5 As shown in the flowchart, when generating a planning scheme, the server can extract the existing basic scheme from the planning memory according to the intention information, and then generate a planning scheme corresponding to the intention information based on the extracted basic scheme. In this embodiment, the server can recall the basic scheme matching the intention information in the planning scheme library based on text matching or similarity matching. Among them, the process of matching the scheme name of the intention information and the basic scheme can be implemented with the help of a pre-trained natural language processing model. For example, the natural language processing model can be used to score the similarity of the scheme name of the intention information and the basic scheme, and then a certain number of basic schemes can be recalled as pre-selected planning schemes according to the similarity scoring results. Further, after the pre-selected planning scheme matching the intention information is screened, the large model can be used as a supervisory party to reconfirm the matching of the pre-selected planning scheme with the intention information to determine whether to select a certain pre-selected planning scheme as the planning scheme, or select a certain pre-selected planning scheme to obtain a planning scheme after adaptive modification, or choose to regenerate a planning scheme, etc., so as to obtain the final planning scheme.
[0118] The above embodiment performs text matching and / or similarity matching between the intent information and the scheme name of the basic scheme to obtain a pre-selected planning scheme that matches the intent information, thereby improving the recall speed of the pre-selected planning scheme and reducing the server overhead. In addition, by using a large model to determine the final planning scheme based on the pre-selected planning scheme, the generation speed of the planning scheme and the accuracy of the scheme content can be improved.
[0119] In one embodiment, step 402 may be implemented in at least one of the following ways:
[0120] 4021. The server selects a target planning scheme that matches the intent information from the pre-selected planning schemes through a large model based on the user information and the intent information as the planning scheme.
[0121] 4022. The server selects a target planning scheme that matches the intention information from the pre-selected planning schemes through the large model, and modifies at least one execution step in the target planning scheme based on the user information and the intention information to obtain a planning scheme.
[0122] Specifically, refer to Figure 5 As shown in the flowchart, after selecting the pre-selected planning scheme, the server can reconfirm the pre-selected planning scheme to determine whether to select a pre-selected planning scheme as the planning scheme, or select a pre-selected planning scheme to obtain the planning scheme after adaptive modification. This process can be achieved through the prompt set in the large model agent, and the reference content is as follows:
[0123] Action definition:
[0124] Usable: One of the plans for the given reference is available;
[0125] Modify: The given reference plan needs to be adjusted before it can be used;
[0126] Output format:
[0127] Thought: Please clearly and accurately read and understand the contents of Problem, Goal, Tools, and Milestone of each plan in the reference plan, and think deeply about whether this reference plan can meet your needs, especially when the problem matches your problem very well, this reference plan is likely to be what you need. If the reference plan can meet your needs, then Action = Usable, and Final Answer will output the reference plan number. If the reference plan does not meet your needs, you need to generate a new plan based on your original problem and the reference plan. This new plan needs to have reasonable reasons and solutions, and clearly explain why such modifications are needed;
[0128] Action: You can only choose one action [Usable, Modify];
[0129] Final Answer:
[0130] If you select Action=Usable, the output will be the reference plan number you selected, such as 1, 2, 3;
[0131] If you selected Action=Modify, you need to export your new plan, including Step / Goal / Tools / Milestone / Risk;
[0132] The above-mentioned embodiment selects and / or modifies the matched pre-selected planning schemes through a large model to obtain the final planning scheme, which can effectively improve the matching accuracy between the planning scheme and the intention information, thereby improving the accuracy of scheme selection and the effect of scheme execution.
[0133] In one embodiment, the task-based dialogue method may further include the following steps:
[0134] 403. When the server fails to select a target planning scheme that matches the intention information from the pre-selected planning schemes, step 404 and step 405 are executed according to a preset number of cycles.
[0135] 404. The server performs text matching and / or similarity matching on the intent information with the scheme names of the basic schemes in the planning scheme library to obtain at least one pre-selected planning scheme that matches the intent information, wherein the intent information is the original intent information and / or the revised intent information.
[0136] 405. The server determines the planning scheme through the big model based on the user information, the intention information and the pre-selected planning scheme.
[0137] Specifically, refer to Figure 5 As shown in the flowchart, when the server fails to select a target planning scheme that matches the intent information from the pre-selected planning schemes, it can also perform text matching and / or similarity matching on the names of the basic schemes in the planning scheme library with the intent information again to recall a larger number of pre-selected planning schemes, and determine the final planning scheme based on the re-recalled pre-selected planning schemes. In this embodiment, during multiple recalls, the number of pre-selected planning schemes to be recalled can be expanded, or the description of the intent information can be changed to recall a larger range of pre-selected planning schemes, thereby facilitating the selection of a scheme that better matches the intent information as the final planning scheme. In addition, for time considerations, the number of loop executions can be limited. For example, the number of loop executions can be set to 2 or 3 times, etc., to avoid the user waiting too long. It can be understood that the specific implementation methods of steps 404 and 405 can refer to the relevant descriptions in steps 401 and 402, and will not be repeated here.
[0138] The above-mentioned embodiment can improve the recall range of pre-selected planning schemes by changing the description of the intention information and / or expanding the recall number of basic schemes when the large model fails to select the target planning scheme, thereby effectively improving the matching accuracy of the planning schemes and the effect of the scheme execution.
[0139] In one embodiment, the method for generating a planning scheme based on user information and intention information in step 103 can also be implemented by the following steps:
[0140] 406. When the preset solution generation conditions are met, the server generates a planning solution through a large model based on user information, intent information and a preset prompt template, wherein the solution generation conditions include that a pre-selected planning solution that matches the intent information is not obtained, and / or the pre-selected planning solution does not contain a target planning solution that matches the intent information.
[0141] Specifically, when the server fails to obtain a pre-selected planning scheme that matches the intent information, and / or the pre-selected planning scheme does not contain a target planning scheme that matches the intent information, the server can stop the process of recalling the pre-selected planning scheme and the process of selecting the target planning scheme, and directly enter the planning scheme generation process, and then generate a planning scheme based on the user information and intent information through the large model intelligent agent. In this way, when the number of basic schemes in the planning scheme library is insufficient, a new planning scheme can be generated based on the actual needs of the user, thereby breaking through the limitations of the existing basic schemes, obtaining a planning scheme that better matches the intent information, and obtaining accurate scheme execution results.
[0142] The above-mentioned embodiment can improve the matching degree between the planning scheme and the user's intention, thereby improving the accuracy of the scheme execution results by directly generating a planning scheme through the big model when the big model fails to obtain the pre-selected planning scheme and / or the big model fails to select the target planning scheme.
[0143] In one embodiment, the method of executing the execution steps in the planning scheme in step 103 to obtain the scheme execution result can be implemented by the following steps:
[0144] 501. The server executes each execution step in sequence according to the execution order of the execution steps to obtain the execution result of the solution. For any execution step, the execution method includes: determining the target tool corresponding to the execution step through the large model, and calling the target tool to execute the execution step to obtain the execution result of the execution step.
[0145] Specifically, refer to Figure 2As shown in the flowchart, after generating the planning scheme, the server can execute each execution step in sequence according to the execution order of each execution step to obtain the scheme execution result. In this embodiment, the target tool corresponding to each execution step can be one or more, or the target tool may not be called, but the text analysis ability and text generation ability of the large model agent may be directly used for execution. In this embodiment, by calling the target tool to execute the execution step and obtaining the execution result of the execution step, the execution result of the execution step can be made more stable, and it is not easy to cause deviation in the scheme execution result.
[0146] The above-mentioned embodiment obtains the execution results of each execution step by calling the tool to execute each execution step in the planning scheme, which can improve the stability and reliability of the scheme execution, make the scheme execution results less likely to deviate, and thus make the scheme execution results more controllable.
[0147] In one embodiment, the method of calling the target tool to execute the execution step to obtain the execution result of the execution step in step 501 can be implemented by the following steps:
[0148] 5011. Based on the content of the execution step, the server searches for the target tool in the preset tool library, calls the target tool, obtains the calling result of the target tool, and obtains the execution result of the execution step based on the calling result of the target tool.
[0149] 5012. When the server fails to find the target tool, it calls the search tool to search for the retrieval result corresponding to the execution step in the preset knowledge base, and obtains the execution result of the execution step based on the retrieval result.
[0150] Specifically, the server can select the required tool as the target tool in the process of executing the step according to the logic in the prompt set in the large model agent, based on the function information of the preset tool, and then obtain the execution result of the execution step through the call result of the target tool. Alternatively, when the target tool is not found, the search tool can be called to search for the retrieval results corresponding to the execution step in the preset knowledge base, and the execution result of the execution step can be obtained based on the retrieval results. For example, the prompt set in the large model agent can refer to the following content:
[0151] Goal: You must answer the merchant's questions or continue to reason about the merchant's questions by calling the tool to complete the merchant's given questions. If there is no tool, you must use knowledge_retrieval_tool to search for the answer;
[0152] The following API tools are available: {tool_descs};
[0153] Output format:
[0154] Question: The merchant inputs the question;
[0155] Thought: Start or continue thinking about what to do, which tool to use, how to answer, and how to politely refuse to answer. When there is no tool, it is forbidden to answer the question directly and you need to search for the answer.
[0156] Action: Take the tool, must be within [{tool_names}];
[0157] Action Input: tool parameter input, see the tool introduction;
[0158] Observation: tool output;
[0159] (this Thought / Action / Action Input / Observation can be repeated zero or more times)
[0160] Thought: Continue thinking according to the above thinking steps;
[0161] Final Answer: The final answer to the original input question. Please note that the answer is from the perspective of the merchant and should not be related to thinking;
[0162] Dialogue merchant information:
[0163] {memory};
[0164] In this embodiment, during the execution step, the large model agent is restricted to search for the target tool only in the preset tool library, and when the target tool is not found, the search tool is called to search for the retrieval results corresponding to the execution step in the preset knowledge base. The execution results of the execution step can be limited to the preset knowledge domain, thereby avoiding the hallucination problem of the large model to a great extent.
[0165] The above embodiment can improve the stability of execution of the execution steps by limiting the target tools to tools in the preset tool library or search tools corresponding to the preset knowledge base, avoid hallucination problems caused by large models during the execution of the solution, and thus improve the accuracy of the solution execution results.
[0166] In one embodiment, the execution step may include a task description and / or a tool description. On this basis, the method of calling the target tool to execute the execution step in step 501 to obtain the execution result of the execution step can also be implemented by the following steps:
[0167] 5013. The server determines the target tool corresponding to the execution step based on the tool description in the execution step, and calls the target tool to execute the execution step according to the parameter information recorded in the task description to obtain the execution result of the execution step.
[0168] Specifically, when calling the target tool, the server can call the target tool according to the task description and / or tool description in the execution step, so as to improve the selection efficiency and execution accuracy of the target tool. In this embodiment, step 5013 can be applicable to the scenario of selecting a basic plan that matches the intent information in the planning plan library as a planning plan, or generating a new planning plan based on the selected pre-selected planning plan. For example, assuming that the planning plan contains the following two execution steps, namely "1. Check the merchant's recent 7-day data and industry data for comparison" and "2. Make a data summary", based on the above two execution steps, the following task description and tool description can be obtained:
[0169] Node 1:
[0170] Task description: According to the merchant ID, retrieve the merchant's data for the past 7 days and the industry's data for the past 7 days;
[0171] Tool description: search_QA (specific information parameters are stored in other databases);
[0172] Node 2:
[0173] Task description: Make a summary based on the extracted user and industry data;
[0174] Tool Description: None;
[0175] In the above example, by obtaining the task description and tool description of each of the above execution steps, it can be clearly determined that the target tool to be called in the first execution step is search_QA, and the tool parameters of the target tool are the merchant ID, the time period of the last 7 days, and the data types of the merchant data and industry data. Then, the actions in the task description described in the above target tool can be executed to obtain the step execution results. Furthermore, in the second execution step, the large model agent can obtain the solution execution results based on the data obtained in the first step, using the large model agent's own text analysis and text generation capabilities, that is, obtaining the comparative analysis results between the merchant data in the past 7 days and the industry data.
[0176] The above-mentioned embodiment can effectively improve the execution efficiency of each execution step and the stability of step execution by obtaining the task description and / or tool description in the execution step and determining the target tool and the parameters required for the tool through the task description and / or tool description in the execution step.
[0177] In one embodiment, the intention information may include question type, question information and context information. On this basis, the method of calling the target tool to execute the execution step to obtain the execution result of the execution step in step 501 can also be implemented by the following steps:
[0178] 5014. The server determines the target tool corresponding to the execution step based on the question type and / or question information in the intent information, determines the parameter information of the target tool according to the question information and / or context information, and calls the target tool through the parameter information of the target tool to execute the execution step to obtain the execution result of the execution step.
[0179] Specifically, when calling the target tool, the server can call the target tool based on various information such as the problem type, problem information, and context information in the intent information, so as to improve the selection efficiency and execution accuracy of the target tool. In this embodiment, step 5014 can be applicable to scenarios where the intent information is relatively clear and the solution execution result can be directly executed, or scenarios where the planning solution is relatively simple. For example, assume that the intent information determined by the large model based on the dialogue information and user information is as follows:
[0180] \nType: Consult \nProblem: What are the new good reviews? \nInfo: Time: Recently;
[0181] Based on the above intention information, the large model agent can determine that the question type is a knowledge query type, the target tool is an evaluation query tool, and the parameter information of the target tool is a certain merchant ID and the time period of the last N days. The evaluation query tool is called and the execution result of the solution is as follows:
[0182] \nAnswer: Your recent positive reviews include: 1. Good service attitude, 2. Good food taste;
[0183] The above-mentioned embodiment determines the target tool and the parameters required by the tool through the problem type, problem information and context information in the intention information, which can improve the execution efficiency and execution stability of a simple solution.
[0184] In one embodiment, the method of calling the target tool to execute the execution step to obtain the execution result of the execution step in step 501 can also be implemented by the following steps:
[0185] 5015. The server determines the target tool corresponding to the execution step, calls the target tool, executes the execution step at least once, and obtains at least one calling result, wherein calling the target tool once can obtain one or more calling results.
[0186] 5016. The server summarizes based on at least one call result to obtain an execution result of the execution step.
[0187] Specifically, during the execution of the steps, the server may call the target tool at least once to obtain one or more call results, and then the large model may summarize based on at least one call result to obtain a simplified execution result of the execution step. In this embodiment, the process can be implemented by a prompt set in the large model agent. For example, the relevant content set in the prompt is as follows:
[0188] Output format:
[0189] Question: The merchant inputs the question;
[0190] Thought: Start or continue thinking about what to do, which tool to use, how to answer, and how to politely refuse to answer. When there is no tool, it is forbidden to answer the question directly and you need to search for the answer.
[0191] Action: Take the tool, must be within [{tool_names}];
[0192] Action Input: tool parameter input, see the tool introduction;
[0193] Observation: tool output;
[0194] (this Thought / Action / Action Input / Observation can be repeated zero or more times)
[0195] Thought: Continue thinking according to the above thinking steps;
[0196] Final Answer: The final answer to the original input question. Please note that the answer is from the perspective of the merchant and should not be related to thinking;
[0197] Notice:
[0198] Search has multiple answers, first match the question and search result question and then summarize the result answer;
[0199] It is forbidden to make assumptions, delete important information of tool results, or play freely without tool results;
[0200] After calling the tool multiple times, the final summary answer should not exceed 300 words;
[0201] The above embodiment can improve the accuracy and richness of step execution and avoid stereotyped answers by calling the target tool multiple times to execute the execution steps and summarizing one or more execution results. In addition, by calling the tool to execute each step, the accuracy of the solution execution results can be improved, avoiding the hallucination problem of large models, thereby effectively improving the effect of task solving.
[0202] In one embodiment, the method for the client to display the solution execution result in step 105 can be implemented in the following manner:
[0203] 601. The client displays the solution execution result through a preset component and displays at least one solution evaluation control, wherein the solution evaluation control is used to mark the solution execution result as resolved or unresolved in response to a trigger operation.
[0204] Specifically, refer to Fig. 9 As shown in the scene diagram, the client can display the solution execution result and at least one solution evaluation control through a conforming preset component. In this embodiment, after the user clicks the solution evaluation control, the client can mark the solution execution result as resolved or unresolved in response to the triggering operation. For example, when the user clicks "unresolved" in the preset component, the solution execution result can be marked as unresolved; when the user clicks "resolved" in the preset component, the solution execution result can be marked as resolved. It can be understood that in other embodiments, the preset components and solution evaluation controls can also be displayed in a variety of forms, and this embodiment will not cite examples one by one here.
[0205] The above embodiment displays the solution execution results and solution evaluation controls through preset components, so that users can evaluate the effectiveness of the solution in a timely manner, thereby helping the system to generate more accurate planning solutions.
[0206] In one embodiment, the task-based dialogue method may further include the following steps:
[0207] 701. The server obtains historical chat record information of at least one user, and extracts planning solutions corresponding to solution execution results marked as solved in the historical chat record information to obtain at least one basic solution.
[0208] 702. The server stores the basic plan in a planning plan library in a preset structure, wherein the preset structure includes at least one of a chain structure, a tree structure, and a mesh structure.
[0209] Specifically, refer to Figure 4 and Figure 5 Flowchart and Fig. 9As shown in the scene diagram, the server can extract the planning schemes corresponding to the execution results of the schemes marked as solved from the historical chat record information of multiple users, and organize the planning schemes in a preset format and store them in a planning scheme library in a preset structure. In this way, the efficiency of generating basic schemes can be improved and the workload of manually generating basic schemes can be reduced. It is understandable that after the basic scheme is extracted, it can be manually modified and reviewed before being stored again, or it can be directly stored. In addition, the basic scheme can also be implemented based on manually organized content, which is not specifically limited in this embodiment.
[0210] In this embodiment, the server can Figure 6 At least one of the chain structure, tree structure and mesh structure shown in FIG. 1 stores the extracted basic solutions, and for each basic solution, the following can be used: Figure 7 The basic plan can be stored in the following format:
[0211] Task Description:
[0212] When users inquire about changes in order sales behavior, we can search for data, behavior, and user information;
[0213] Further analysis:
[0214] Basic plan:
[0215] 1. Check the merchant's data for the past 7 days and compare it with the industry data;
[0216] 2. Make data summary;
[0217] 3. Check the merchant’s recent operations and activities;
[0218] 4. Make a behavioral summary;
[0219] 5. Check the merchant's evaluation of orders in the past 7 days;
[0220] 6. Make an overall comment;
[0221] 7. Summary xxxx;
[0222] Node 1:
[0223] Task description: According to the merchant ID, retrieve the merchant's data for the past 7 days and the industry's data for the past 7 days;
[0224] Tool description: search_QA (specific information parameters are stored in other databases);
[0225] Node 2:
[0226] Task description: Make a summary based on the extracted user and industry data;
[0227] Tool Description: None;
[0228] The above embodiment can improve the speed of basic solution collection by precipitating and sorting the planning solutions corresponding to the solution execution results marked as solved in the historical chat record information, thereby helping to improve the recall speed and recall accuracy of the planning solutions. In addition, by using a variety of structures such as chain structure, tree structure and mesh structure to store basic solutions, the space occupied by the basic solution storage can be reduced and the efficiency of basic solution extraction can be improved.
[0229] In one embodiment, the user who initiates the conversation message is a merchant, and the target tools include at least one of searching a knowledge base, querying orders, querying data, analyzing data, image parsing, creating a store, canceling orders, and sending instant messages to users.
[0230] Specifically, the task-based dialogue method proposed in any of the above embodiments can be applied to the field of merchant service knowledge. In this scenario, the big model, as a merchant service assistant, can assist merchants in completing a variety of simple or complex tasks such as knowledge search, order query, data query, data analysis, image analysis, store creation, order cancellation, and sending instant messages to users, thereby improving the efficiency of solving merchant problems, reducing the workload of manual customer service, and improving the merchant's interactive experience. The above embodiments limit the application scenario of this case to the merchant assistant scenario, which can improve the efficiency of solving merchant problems in this scenario.
[0231] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. In addition, the numbers corresponding to the various steps in the above embodiments only serve as identification and are not used as a limitation on the order in which the steps are executed. The order in which the steps are executed in each embodiment can be set according to actual conditions.
[0232] Further, as Figures 1 to 9The specific implementation of the method shown in the embodiment provides a task-based dialogue device, which includes: a dialogue information receiving module and a solution result display module. The dialogue information receiving module can be used to send the dialogue information in response to receiving the dialogue information initiated by the user; the solution result display module can be used to receive and display the solution execution result, which is obtained by executing the execution steps in the planning solution, and the planning solution is generated by the big model based on the user information of the user and the intention information corresponding to the dialogue information, and the intention information is determined by the big model based on the dialogue information and the user information.
[0233] It should be noted that for other corresponding descriptions of the functional units involved in the task-based dialogue device provided in this embodiment, please refer to Figures 1 to 9 The corresponding description in any of the above-mentioned task-based dialogue method embodiments will not be repeated here.
[0234] Further, as Figures 1 to 9 The specific implementation of the method shown in the embodiment provides a task-based dialogue device, which includes: an intention information determination module, a solution result generation module and a solution result sending module. Among them, the intention information determination module can be used to respond to the dialogue information initiated by the user, obtain the user information of the user, and determine the user's intention information through the big model based on the dialogue information and the user information; the solution result generation module can be used to generate a planning scheme through the big model based on the user information and the intention information, and execute the execution steps in the planning scheme to obtain the solution execution result; the solution result sending module can be used to send the solution execution result to the client, so that the client receives and displays the solution execution result.
[0235] It should be noted that for other corresponding descriptions of the functional units involved in the task-based dialogue device provided in this embodiment, please refer to Figures 1 to 9 The corresponding description in any of the above-mentioned task-based dialogue method embodiments will not be repeated here.
[0236] Based on the above Figures 1 to 9 The method shown in the embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned Figures 1 to 9 The task-based dialogue method shown.
[0237] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product. The software product to be identified can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0238] Based on the above Figures 1 to 9 In order to achieve the above-mentioned purpose, the method embodiment shown in FIG. Fig.10 As shown, this embodiment also provides a computer device for task-based dialogue, which can be a personal computer, a server, a smart phone, a tablet computer, a smart watch, or other network devices, etc. The computer device includes a storage medium and a processor; the storage medium is used to store computer programs and an operating system; the processor is used to execute the computer program to implement the above-mentioned Figures 1 to 9 The method shown.
[0239] Optionally, the computer device may also include an internal memory, a communication interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, a display, an input device such as a keyboard, etc. Optionally, the communication interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0240] Those skilled in the art will appreciate that the computer device structure for identifying an operation action provided in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components, or a combination of certain components, or different component arrangements.
[0241] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the above-mentioned computer device hardware and the software resources to be identified, and supports the operation of the information processing program and other software and / or programs to be identified. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing computer device.
[0242] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or by hardware. By applying the technical solution of the present application, after receiving the dialogue information initiated by the user, the user information of the user is first obtained, and based on the dialogue information and the user information, the user's intention information is determined through a large model, and then based on the user information and the intention information of the user, a planning scheme corresponding to the intention information is generated through a large model, and finally the execution steps in the planning scheme are executed to obtain the execution result of the scheme. Compared with the prior art, the above method can effectively improve the accuracy of intent recognition and the accuracy of scheme planning, reduce the workload of scheme enumeration, improve the matching degree between the scheme execution result and the user's intention, and meet the actual requirements of the user.
[0243] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.
[0244] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.
Claims
1. A task-based dialogue method, characterized in that: The method comprises: In response to receiving the conversation information initiated by the user, the client sends the conversation information to the server; The server obtains the user information of the user in response to receiving the dialogue information, and determines the intention information of the user through the macro model based on the dialogue information and the user information, wherein the intention information is generated with the assistance of a prompt set in the macro model, the prompt is provided with a step of generating the intention information, and the intention information includes question information in a preset field converted from the dialogue information, or includes the question information in the preset field and context information of the dialogue information; The server generates a planning scheme through a large model based on the user information and the intention information, and executes the execution steps in the planning scheme to obtain a scheme execution result, wherein the large model for generating the planning scheme is a large model agent; The server sends the solution execution result to the client; The client receives and displays the solution execution result.
2. The method according to claim 1, characterized in that: The server determines the user's intention information through a large model based on the conversation information and the user information, including: The server generates response information and a response identifier of the response information through a large model based on the conversation information and the user information; When the response identifier is a question location identifier, the server determines the intention information according to the dialogue information.
3. The method according to claim 2, characterized in that When the response identifier is a question location identifier, the server determines the intention information according to the dialogue information, including: When the response identifier is the question location identifier, the server converts the dialogue information into question information in a preset field based on the context information in the user information, and uses the question information in the preset field as the intention information; or When the response identifier is the question location identifier, the server determines the question type of the dialogue information, converts the dialogue information into question information in a preset field, extracts context information from the user information and the dialogue information, and obtains the intention information based on the question type of the dialogue information, the question information in the preset field, and the context information.
4. The method according to claim 2 or 3, characterized in that: The method further comprises: When the response identifier is a question-asking identifier and / or a question-rejecting identifier, the server generates context information according to the dialogue information and the response information, and adds the context information to the user information; The server sends the response information to the client; The client receives and displays the response information.
5. The method according to claim 1, characterized in that: The user information includes user portrait information; the method further includes: The server obtains historical chat record information according to a preset long memory generation cycle; Based on the historical chat record information, the server generates user behavior summary information of at least one dimension through a large model, and obtains the user portrait information based on the user behavior summary information.
6. The method according to claim 1 or 5, characterized in that: The user information also includes at least one of user historical chat information, user historical operation information and user historical status information; the method further includes: The server obtains historical chat record information and / or historical operation detail information according to a preset short memory generation cycle; The server performs structured information extraction on the historical chat record information and / or historical operation detail information to obtain at least one of the user historical chat information, the user historical operation information and the user historical status information.
7. The method according to claim 1, characterized in that The server generates a planning scheme through a large model based on the user information and the intention information, including: The server performs text matching and / or similarity matching on the intention information and the scheme names of the basic schemes in the planning scheme library to obtain a pre-selected planning scheme matching the intention information; The server determines the planning scheme through the big model based on the user information, the intention information and the pre-selected planning scheme.
8. The method according to claim 7, characterized in that The server determines the planning scheme through the large model based on the user information, the intention information and the pre-selected planning scheme, including: The server selects, through the large model, a target planning scheme matching the intention information from the pre-selected planning schemes as the planning scheme based on the user information and the intention information; and / or The server selects a target planning scheme that matches the intention information from the pre-selected planning schemes through the large model, and modifies at least one execution step in the target planning scheme based on the user information and the intention information to obtain the planning scheme.
9. The method according to claim 8, characterized in that The method further comprises: When the server fails to select a target planning scheme that matches the intention information from the pre-selected planning schemes, the server performs the following steps according to a preset number of cycles: The server performs text matching and / or similarity matching on the intention information and the scheme names of the basic schemes in the planning scheme library to obtain at least one pre-selected planning scheme matching the intention information, wherein the intention information is original intention information and / or revised intention information; The server determines the planning scheme through the big model based on the user information, the intention information and the pre-selected planning scheme.
10. The method according to claim 1 or 7, characterized in that: The server generates a planning scheme through a large model based on the user information and the intention information, and further includes: When the preset scheme generation conditions are met, the server generates the planning scheme through a large model based on the user information, the intent information and a preset prompt template, wherein the scheme generation conditions include that a pre-selected planning scheme matching the intent information is not obtained, and / or the pre-selected planning scheme does not contain a target planning scheme matching the intent information.
11. The method according to claim 1, characterized in that: The server executes the execution steps in the planning scheme to obtain the scheme execution result, including: The server executes each of the execution steps in sequence according to the execution order of the execution steps to obtain the execution result of the solution, wherein for any of the execution steps, the execution method includes: The target tool corresponding to the execution step is determined through the large model, and the target tool is called to execute the execution step to obtain the execution result of the execution step.
12. The method according to claim 11, characterized in that The server determines a target tool corresponding to the execution step, and calls the target tool to execute the execution step, and obtains an execution result of the execution step, including: The server searches for a target tool in a preset tool library based on the content of the execution step, calls the target tool, obtains a call result of the target tool, and obtains an execution result of the execution step based on the call result of the target tool; When the server fails to find the target tool, it calls a search tool to search for a retrieval result corresponding to the execution step in a preset knowledge base, and obtains the execution result of the execution step based on the retrieval result.
13. The method according to claim 11, characterized in that The execution step includes a task description and / or a tool description; the server determines a target tool corresponding to the execution step, and calls the target tool to execute the execution step to obtain an execution result of the execution step, and further includes: The server determines the target tool corresponding to the execution step based on the tool description in the execution step, and calls the target tool to execute the execution step according to the parameter information recorded in the task description to obtain the execution result of the execution step.
14. The method according to claim 11, characterized in that The intention information includes a question type, question information and context information; the server determines a target tool corresponding to the execution step, and calls the target tool to execute the execution step to obtain an execution result of the execution step, and further includes: The server determines the target tool corresponding to the execution step based on the question type and / or the question information in the intention information, determines the parameter information of the target tool according to the question information and / or the context information, and calls the target tool to execute the execution step through the parameter information of the target tool to obtain the execution result of the execution step; and / or The server determines a target tool corresponding to the execution step, calls the target tool, executes the execution step at least once, and obtains at least one calling result, wherein calling the target tool once can obtain one or more calling results; and summarizes based on at least one of the calling results to obtain the execution result of the execution step.
15. The method according to any one of claims 11 to 14, characterized in that The user information includes at least one of user portrait information, function information of preset tools, dialogue constraint information, user historical chat information, user historical operation information, user historical status information and context information; and / or The user who initiates the conversation information is a merchant, and the target tools include at least one of searching a knowledge base, querying orders, querying data, analyzing data, image parsing, creating a store, canceling orders, and sending instant messages to users.
16. The method according to claim 1, characterized in that The client displays the execution result of the solution, including: The client displays the solution execution result through a preset component and displays at least one solution evaluation control, wherein the solution evaluation control is used to mark the solution execution result as resolved or unresolved in response to a trigger operation; and / or The method further comprises: The server obtains historical chat record information of at least one user, and extracts the planning solutions corresponding to the solution execution results marked as solved in the historical chat record information to obtain at least one basic solution; stores the basic solution in a planning solution library in a preset structure, wherein the preset structure includes at least one of a chain structure, a tree structure and a mesh structure; and / or The method further comprises: Based on the intention information, the server determines whether the execution result of the plan is consistent with the intention information through a large model; when the execution result of the plan is inconsistent with the intention information, the execution steps in the planning plan are re-executed to obtain a revised plan execution result.
17. A task-based dialogue method, characterized in that: The method comprises: In response to receiving a conversation message initiated by a user, sending the conversation message; Receive and display a solution execution result, wherein the solution execution result is obtained by executing the execution steps in the planning solution, the planning solution is generated by the big model based on the user information of the user and the intention information corresponding to the dialogue information, the intention information is determined by the big model based on the dialogue information and the user information, wherein the intention information is generated with the assistance of prompts set in the big model, the prompts include a step for generating the intention information, the intention information includes problem information in a preset field converted from the dialogue information, or includes problem information in the preset field and context information of the dialogue information; the big model that generates the planning solution is a big model intelligent agent.
18. A task-based dialogue method, characterized in that: The method comprises: In response to receiving a dialog message initiated by a user, user information of the user is obtained, and based on the dialog message and the user information, intention information of the user is determined through a macro model, wherein the intention information is generated with the assistance of a prompt word set in the macro model, the prompt word includes a step of generating the intention information, and the intention information includes question information in a preset field converted from the dialog message, or includes the question information in the preset field and context information of the dialog message; Based on the user information and the intention information, a planning scheme is generated through a large model, and the execution steps in the planning scheme are executed to obtain a scheme execution result, wherein the large model for generating the planning scheme is a large model intelligent agent; The solution execution result is sent to the client, so that the client receives and displays the solution execution result.
19. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 18 are implemented.
20. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 18 are implemented.
Citation Information
Patent Citations
Intelligent customer service method and device, equipment and storage medium
CN112487810A
Dialogue method and device, server and storage medium
CN113132214A
Intelligent dialogue processing method, cloud server and readable storage medium
CN116010574A
Large language model intelligent inquiry dialogue method, system and device and medium
CN117093679A
Human-computer interaction method, device and equipment and storage medium
CN117421398A
