Identification method and electronic device for multi-round multi-intention mixed dialogue
By splitting and merging constraints to identify user target problems and sub-problems, the problem of insufficient understanding of large language models in complex dialogue scenarios is solved, and more accurate understanding and answering of user questions is achieved.
Patent Information
- Application Number
- CN202411975328.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-30
AI Technical Summary
When dealing with complex multi-round dialogue scenarios and multi-intention switching, it is difficult for the large language model to fully understand user problems, resulting in insufficient understanding of the problem and insufficient accuracy of answers.
By determining the user's target problem and splitting it into multiple sub-questions and the overall constraints of this question, the constraints are merged to generate problem-effective constraints and sub-questions effective constraints, thereby improving the understanding and answering accuracy of complex problems.
It improves the accuracy of understanding and answering complex questions, improves the accuracy of dialogue recognition, and can more accurately handle users' complex problems and multi-intention switching.
Smart Images

Figure CN119396982B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence, and in particular to a method for identifying multi-round multi-intention mixed dialogues. Background Art
[0002] Large Language Model (LLM) refers to a deep learning model trained with a large amount of text data, which enables the model to generate natural language text or understand the meaning of language text. These models can provide in-depth knowledge and language production on various topics by training on huge data sets. The core idea is to learn the patterns and structures of natural language through large-scale training, and to simulate the human language cognition and generation process to a certain extent.
[0003] LLM can support a variety of application scenarios, such as performing language tasks such as spell checking and grammar correction, and can also handle complex tasks such as text summarization, machine translation, and content recommendation. In order for LLM to support a variety of application scenarios, there are models that are too complex or overfit the training data. Furthermore, when dealing with complex user questions (such as multi-round dialogue scenarios, multi-intent switching at any time, etc.), complex questions are directly submitted to LLM, and the user's questions cannot be fully analyzed, resulting in insufficient understanding of the questions and insufficient answer accuracy, which cannot meet the actual needs of users.
[0004] Therefore, this application can provide a method for optimizing the understanding and answering of complex questions and improving the accuracy of dialogue recognition. Summary of the invention
[0005] Based on this, it is necessary to provide a method for identifying multi-round and multi-intent mixed conversations to address the above problems. This method can improve the understanding and answer accuracy of complex questions.
[0006] In a first aspect, the present application provides a method for identifying a multi-round multi-intention mixed conversation, the method comprising:
[0007] Determine the user's target problem, split the target problem into multiple sub-problems and the overall constraint of the question; the overall constraint of the question can constrain the target problem and multiple sub-problems;
[0008] If the overall constraint of this question belongs to the overall constraint of the session, then the overall constraint of this question is updated to the session persistence constraint; wherein the overall constraint of the session refers to the overall control condition of the session, and the session persistence constraint refers to the restriction condition within the preset duration of the session;
[0009] At least the overall constraint of the question and the updated session persistence constraint are merged to obtain the problem validation constraint; wherein the problem validation constraint can constrain the target problem and multiple sub-problems;
[0010] According to the sub-problem, determine the sub-problem constraint, at least merge the sub-problem constraint, the overall constraint of the question and the updated session persistence constraint to obtain the sub-problem effective constraint; wherein the sub-problem effective constraint can constrain at least one sub-problem among the multiple sub-problems;
[0011] According to the sub-problems and the constraints that take effect on the sub-problems, the results of each sub-problem are obtained;
[0012] The effective constraints of the question and the results of each sub-question are input into the large language model to obtain the answer to the target question.
[0013] In one embodiment, according to the sub-problems and the sub-problem validation constraints, the results of each sub-problem are obtained, including:
[0014] Identify the intention of the sub-problem, and classify the tasks based on the intention of the sub-problem to determine the task type of the sub-problem; different task types have different ways of applying the sub-problem's effective constraints;
[0015] The sub-problem validation constraint application method corresponding to the sub-problem task type is adopted, and the results of each sub-problem are obtained based on the sub-problem.
[0016] In one embodiment, the intention of the sub-question includes one of the following: preset multi-round dialogue; RAG knowledge question and answer; data analysis; model direct question and answer; non-target small talk; preset target task;
[0017] Among them, identifying the intention of the sub-question includes: dynamically composing prompt words and submitting them to the large language model for intent recognition, and the prompt words include at least one of the following: current dialogue state, dialogue content, and instruction prompt.
[0018] In one embodiment, if the intention of the sub-question is RAG knowledge question answering, a sub-question validation constraint application method corresponding to the sub-question task type is adopted, and based on the sub-question, each sub-question result is obtained, including:
[0019] In the retrieval and filtering stage of the large language model, the retrieval segments are determined according to the sub-questions, and the retrieval segments are input into the large language model in batches to retrieve and filter the information segments. The sub-question validity constraints are added to the prompt words of the large language model, so that the large language model retains the information segments that meet the sub-question validity constraints, which are defined as target information segments.
[0020] In the generation stage of the large language model, the sub-problem results are generated by the large language model according to the target information segment, and the sub-problem validity constraints are added to the prompt words of the large language model, so that the large language model can identify the information segment whose relevance meets the set conditions from the target information segment according to the sub-problem validity constraints.
[0021] In one embodiment, if the intention of the sub-question is to preset multiple rounds of dialogue, a sub-question validation constraint application method corresponding to the sub-question task type is adopted, and based on the sub-question, each sub-question result is obtained, including:
[0022] Determine the slot according to the subproblem and the effective constraint of the subproblem, and obtain the slot value corresponding to the slot based on the slot;
[0023] According to the sub-problems and slot values, the results of each sub-problem are obtained.
[0024] In one of the embodiments, the method further includes: maintaining a preset multi-round dialogue; wherein maintaining the preset multi-round dialogue includes: entering into a multi-round dialogue and continuing the multi-round dialogue, and executing multi-round nesting in response to another multi-round dialogue task triggered by a user.
[0025] In one embodiment, entering a multi-round dialogue and continuing the multi-round dialogue, in response to another multi-round dialogue task triggered by a user, performing multi-round nesting, includes:
[0026] At each turn of the conversation, record the user's input and response to the input, and update the conversation history;
[0027] Determine whether the conditions for the preset multi-round dialogue have been met, and if so, trigger the preset action of the preset multi-round dialogue, and if not, continue to trigger the dialogue;
[0028] If it is determined that the user's current question does not belong to the preset multi-round dialogue, retain the current state of the preset multi-round dialogue and start a nested dialogue;
[0029] If the nested conversation is completed, the current state of the preset multi-round conversation is restored and the conversation continues.
[0030] In one embodiment, at least the overall constraint of the question and the updated session persistence constraint are merged to obtain the problem effective constraint, including: merging the overall constraint of the question, the updated session persistence constraint and the system constraint to obtain the problem effective constraint; the system constraint is different from the session persistence constraint and the session overall constraint;
[0031] At least the sub-problem constraint, the overall constraint of this question and the updated session persistence constraint are merged to obtain the sub-problem effective constraint, including: merging the sub-problem constraint, the overall constraint of this question, the updated session persistence constraint and the system constraint to obtain the sub-problem effective constraint.
[0032] In one embodiment, constraint merging includes:
[0033] Categorize each constraint according to preset categories;
[0034] Each type of constraint is input into the large language model separately to merge the constraints by category; wherein, when merging the constraints by category, a prompt word is input into the large language model, the prompt word includes a merging priority, and the merging priority is: sub-question constraint > overall constraint of this question > session persistence constraint > overall system constraint.
[0035] In one embodiment, determining a user's target problem includes:
[0036] Get the user's initial question and the user's conversation history;
[0037] The conversation history is identified and pronouns or omitted expressions are parsed through a large language model to complete the initial question and obtain the target question.
[0038] In a second aspect, the present application also provides an electronic device capable of realizing the recognition of multi-round multi-intention mixed conversations, the electronic device comprising:
[0039] A memory is used to store a computer program; a processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the method for identifying multi-round multi-intention mixed dialogues of the first aspect are implemented.
[0040] The above-mentioned identification method of multi-round multi-intention mixed dialogue determines the user's target question and splits it into multiple sub-questions and the overall constraint of the question; if the overall constraint of the question belongs to the overall constraint of the session, the overall constraint of the question is updated to the persistent constraint of the session; the overall constraint of the question and the updated persistent constraint of the session are merged to obtain the effective constraint of the question; the sub-question constraint is determined according to each sub-question, and it is merged with the overall constraint of the question and the updated persistent constraint of the session to obtain the effective constraint of the sub-question; the results of each sub-question are obtained according to the sub-question and the effective constraint of the sub-question; the effective constraint of the question and the results of each sub-question are input into the large language model to generate the answer to the target question. Among them, the user's target question can be a complex question such as including multiple sub-questions or a question with specific constraints. When conditional constraints are extracted for the user's target question, key information requirements are identified, the boundary of the question is defined, and the priority order is clarified. This method can more accurately understand and handle the user's complex problems. By extracting and merging constraints and applying constraints at different processing stages, the ability to handle complex problems can be improved, and the accuracy of problem handling can be further improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A diagram of an application environment of a method for identifying a multi-round multi-intention mixed conversation in one embodiment;
[0042] Figure 2 It is a flowchart of a method for identifying a multi-round multi-intention mixed conversation in one embodiment;
[0043] Figure 3A flowchart of obtaining results of each sub-problem according to sub-problems and sub-problem effective constraints in one embodiment;
[0044] Figure 4 The intention of a sub-question in one embodiment is a flowchart for determining a sub-question result for RAG knowledge question answering;
[0045] Figure 5 A flowchart showing that the intention of a sub-problem in an embodiment is to preset multiple rounds of dialogue to determine the result of the sub-problem;
[0046] Figure 6 A flowchart of executing multiple rounds of nesting in response to another multi-round dialogue task triggered by a user in one embodiment;
[0047] Figure 7 A flowchart of constraint merging in one embodiment;
[0048] Figure 8 A flowchart for determining a user's target problem in one embodiment;
[0049] Fig. 9 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Unless otherwise defined, the technical terms or scientific terms involved in the present application should have the general meaning understood by people with general skills in the technical field to which the present application belongs. "One", "one", "a kind of", "the", "these" and similar words in the present application do not represent quantitative restrictions, and they can be singular or plural.
[0051] like Figure 1The application environment shown in the figure includes a terminal 102 and a server 104. The method for identifying user interaction needs provided in the embodiment of the present application is applied to the server 104. Among them, the terminal 102 communicates with the server 104 through a network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The user can input the target question through the terminal 102, and then the terminal 102 uploads the target question to the server 104. The server 104 inputs the large language model based on the effective constraints of the problem and the results of each sub-problem, obtains the answer to the target question, and can send the answer to the target question to the terminal 102. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0052] In one embodiment, Figure 2 As shown, a method for identifying a multi-round multi-intention mixed conversation is provided, and the method includes the following steps:
[0053] Step 201: Determine the user's target problem, split the target problem into multiple sub-problems and the overall constraint of the question; wherein the overall constraint of the question can constrain the target problem and the multiple sub-problems;
[0054] Specifically, determine the user's target question, that is, the specific inquiry or demand raised by the user in the conversation. The target question may contain multiple intents or require multiple steps to answer, and it needs to be split into smaller and more specific sub-questions. When splitting the target question, it is necessary not only to identify multiple sub-questions, but also to identify the overall constraints of the question related to the target question. The overall constraints of the question can refer to conditions or restrictions that affect the entire problem-solving process, such as time limits, information format requirements, specific knowledge domain requirements, etc. The overall constraints of the question can be used as a guiding principle to limit the scope of solution of the entire target question and its sub-questions, ensuring that the dialogue processing does not deviate from the user's main intent and the core requirements of the dialogue.
[0055] Exemplarily, the user's target question is determined to be: "I plan to travel to Beijing next month. What are the must-see attractions and how do I book a nearby hotel?" The target question can be split into two sub-questions: "What are the must-see attractions" and "How to book a nearby hotel", and the overall constraint of this question "Traveling to Beijing next month" is identified.
[0056] Step 202: if the overall constraint of the question belongs to the overall constraint of the session, the overall constraint of the question is updated to the session persistence constraint; wherein the overall constraint of the session refers to the overall control condition of the session, and the session persistence constraint refers to the restriction condition within the preset duration of the session;
[0057] Specifically, it is determined whether the overall constraint "Traveling to Beijing next month" identified in the target question "I plan to travel to Beijing next month, what are the must-see attractions, and how to book a nearby hotel?" raised by the user in step 201 belongs to the overall constraint of the session, that is, it is determined whether the overall constraint of the question is related to the management and control of the entire session. If the identified overall constraint of the question belongs to the overall constraint of the session, the overall constraint of the question is updated to the session persistence constraint. Among them, the session persistence constraint can refer to a restriction condition that is valid throughout the duration of the session, such as the user's preference settings or specific requirements determined in the previous session. Exemplarily, based on the above example, if the overall constraint of the question belongs to the overall constraint of the session, the constraint "Traveling to Beijing next month" can be updated to the session persistence constraint. The session persistence constraint will be updated and include the control conditions of this constraint to ensure that all dialogues and operations during the entire session of the user's travel to Beijing next month meet this new constraint condition.
[0058] It should be noted that the overall session constraint refers to the overall control conditions for the session, which can be understood as the overall management and control rules for the session, which usually include the following aspects: session creation, defining when and how to create a new session, such as creating a session when a user logs in; session destruction, specifying when a session ends, such as user logout, session timeout, or server restart; session concurrency: limiting the number of sessions a user can open at the same time to prevent account abuse; session migration, in some cases, allowing sessions to migrate between different servers or devices; session security, ensuring the security of the session, including encrypting session data, preventing session hijacking, etc.; resource allocation, managing the resources required for the session, such as memory, bandwidth, etc.; performance considerations, ensuring that session management does not negatively affect performance; user behavior, restricting user behavior in the session, such as access control, operation frequency limits, etc.
[0059] Step 203: at least the overall constraint of the question and the updated session persistence constraint are merged to obtain the question validation constraint; wherein the question validation constraint can constrain the target question and multiple sub-questions;
[0060] Specifically, take "I plan to travel to Beijing next month. What are the must-see attractions and how to book a nearby hotel?" in step 201 as an example. In this example, "traveling to Beijing next month" is identified as the overall constraint of this question, and the overall constraint of this question can be updated to the session persistence constraint in step 202. Furthermore, step 203 can be to further merge the updated session persistence constraint with the overall constraint of this question on this basis to generate a question validation constraint. The question validation constraint can be a set of rules that integrate the overall constraint of this question and the session persistence constraint, which can guide the processing and answering of specific questions and their sub-questions.
[0061] For example, the question validation constraints in the above example may include the specific requirement of "traveling to Beijing next month", as well as any persistent rules or preferences previously determined in the session, such as the user's preferred language, information format, etc.
[0062] Step 204: Determine the subproblem constraint according to the subproblem, and merge at least the subproblem constraint, the overall constraint of the question, and the updated session persistence constraint to obtain the subproblem effective constraint; wherein the subproblem effective constraint can constrain at least one subproblem among the multiple subproblems;
[0063] Specifically, specific sub-problem constraints are determined based on each sub-problem split out in step 201, and these sub-problem constraints are merged with the overall constraint of the question and the updated session persistence constraint to generate a sub-problem effective constraint applicable to each sub-problem. Among them, the sub-problem constraint can be determined based on the user's specific inquiry content and context information, and the sub-problem constraint can reflect the user's specific needs and expectations in each sub-problem, such as information type, format requirements or time limits. It should be noted that the sub-problem effective constraint can be a constraint formed by combining the sub-problem constraint, the overall constraint of the question and the session persistence constraint, and the sub-problem effective constraint can be a comprehensive set of rules for guiding the processing and answering of a specific sub-problem.
[0064] For example, for the target question raised by the user, "I plan to travel to Beijing next month. What are the must-see attractions and how to book a nearby hotel?", two sub-questions can be split. For the first sub-question, "What are the must-see attractions?", there can be specific constraints related to travel, such as users may have specific requirements for the type of attractions or visiting time. For the second sub-question, "How to book a nearby hotel," there can be specific constraints related to hotel reservations, such as users may have specific requirements for the star rating or geographical location of the hotel. The sub-question constraints are merged with the overall constraint of the question "Traveling to Beijing next month" and the updated session persistence constraint to ensure that the answer to each sub-question comprehensively considers all relevant constraints.
[0065] Step 205: Obtain the results of each sub-problem according to the sub-problems and the constraints that take effect on the sub-problems;
[0066] Specifically, each sub-problem can be analyzed and answered based on its corresponding sub-problem effective constraints. For example, for the sub-problems split out in step 201, such as "What are the must-see attractions", based on its sub-problem effective constraints, the time limit of "traveling to Beijing next month" and possible other constraints, such as the user's preference for the type of attractions, etc., can be combined to retrieve or generate qualified attraction recommendations; for the sub-problem of "How to book a nearby hotel", it is also possible to provide a method and steps for booking a hotel based on its sub-problem effective constraints, including the user's hotel booking preferences and time limits.
[0067] Step 206: Input the effective constraints of the question and the results of each sub-question into the large language model to obtain the answer to the target question.
[0068] Specifically, for example, for the user's target question "I plan to travel to Beijing next month. What are the must-see attractions and how to book a nearby hotel?", the effective constraint of the question may be "traveling to Beijing next month", and the results of each sub-question may be a specific list of attractions for "what are the must-see attractions" and specific steps for "how to book a nearby hotel". The large language model can synthesize this information and integrate an answer that meets the constraints and satisfies the user's original question, for example: "According to your plan, when you travel to Beijing next month, you can visit must-see attractions such as the Forbidden City and the Great Wall, and you can book a nearby hotel by visiting a hotel booking website or using a travel app."
[0069] In this embodiment, the user's target question is determined and split into multiple sub-questions and the overall constraint of the question; if the overall constraint of the question belongs to the overall constraint of the session, the overall constraint of the question is updated to the session persistence constraint; the overall constraint of the question and the updated session persistence constraint are merged to obtain the problem effective constraint; the sub-question constraint is determined according to each sub-question, and it is merged with the overall constraint of the question and the updated session persistence constraint to obtain the sub-question effective constraint; the results of each sub-question are obtained according to the sub-question and the sub-question effective constraint; the problem effective constraint and the results of each sub-question are input into the large language model to generate the answer to the target question. Among them, the user's target question can be a complex question that usually includes multiple sub-questions or requires specific conditions to be answered. When conditionally constraining the user's target question, it is necessary to identify key information requirements, define the boundary of the problem, and clarify the priority order. This method can more accurately understand and handle the user's complex problems. By extracting and merging constraints through constraints, and applying constraints at different processing stages, it can improve the ability to handle complex problems and further improve the accuracy of problem handling.
[0070] In one embodiment, sometimes questions come with constraints, such as "Please answer in English" or "Please explain within 200 words". In many tasks, it is necessary to clearly decompose the constraints from the questions so that the constraints can be used to strengthen the processing of the questions and obtain more accurate results. For example: in the RAG-based knowledge question-answering task, it is more accurate to explicitly extract the constraints and explicitly submit the constraints to the large model after the retrieval than to directly submit them to the large model after the retrieval. For example, if you ask "What are the specifications in the past three years?", directly searching the question and handing it over to the large model to answer is likely to get an answer that is not in the past three years. Extracting the constraint of "in the past three years" and applying the constraints when sorting the search results and the model answer prompts can significantly improve the accuracy of the answer. Furthermore, some constraints are persistent and affect the entire conversation process, such as the prompt words of the large model and the constraints proposed in the user questions that should be effective for a long time in the conversation, such as the user question "All answers below should be in English", where the constraint of "answer in English" should be effective throughout the conversation; some constraints are only effective in the question and answer of this question, such as the user question "Please explain the necessity of safe production within 200 words", where the constraint "please within 200 words" is only effective in this question and answer; some constraints are only effective in the processing of sub-problems, such as the user question "Which is stricter, the xx access policy in 2017 or 2018", the problem can be broken down into sub-problems "xx access policy in 2017" and "xx access policy in 2018" for processing, and then the final results are comprehensively analyzed, and "2017" and "2018" should be the constraints of the sub-problems.
[0071] In one embodiment, Figure 3 As shown, according to the sub-problems and the effective constraints of the sub-problems, the results of each sub-problem are obtained, including the following steps:
[0072] Step 301: Identify the intention of the sub-problem, and classify the tasks based on the intention of the sub-problem to determine the task type of the sub-problem; wherein different task types have different application methods for the sub-problem effective constraints;
[0073] Specifically, identifying the intent of a sub-problem may refer to understanding the specific needs of the user in each sub-problem, for example, the user may be asking about the price of a product or wanting to know the details of a service. If the intent of a sub-problem is identified, the sub-problems may be task-classified based on the intent of these sub-problems, for example, they may be divided into different task types such as information query, reservation service, and payment processing. After determining the task type, the corresponding sub-problem effectiveness constraints may be applied according to the task classification, that is, for different types of tasks, the sub-problem effectiveness constraints are applied differently. For example, if the sub-problem is an information query task, the sub-problem effectiveness constraints may include providing the latest and most relevant information; if the sub-problem is a reservation service task, the sub-problem effectiveness constraints may include availability and time limits.
[0074] Step 302: adopt the sub-problem validation constraint application method corresponding to the sub-problem task type, and obtain the results of each sub-problem based on the sub-problem.
[0075] Specifically, for the user's target question "I plan to travel to Beijing next month. What are the must-see attractions and how to book a nearby hotel?", the corresponding sub-question effectiveness constraint application method can be adopted based on the task type determined in step 301. For the sub-question "What are the must-see attractions", the task type of this sub-question can be information query, and the sub-question effectiveness constraint application method can be related to information retrieval, such as the time range of "traveling to Beijing next month" specified by the user, searching for the most popular attractions in Beijing within the specified time, and filtering the results according to user preferences. For the sub-question "How to book a nearby hotel", the task type of this sub-question can be reservation service, and the sub-question effectiveness constraint application method can be related to reservation, such as the user's budget limit, geographical location preference, etc., providing steps and options for booking a hotel, which may include a link to an online booking platform or contact information for direct hotel reservations.
[0076] In this embodiment, the method identifies the intent of the sub-questions, classifies the sub-questions according to these intents, and determines their respective task types. According to the task type of the sub-questions, appropriate constraint application methods are adopted to obtain the corresponding results of each sub-question. The method can flexibly apply constraints according to different dialogue contexts and user intents to generate more accurate and personalized answers to sub-questions.
[0077] In one embodiment, the intent of the sub-question includes one of the following:
[0078] Preset multi-round dialogue; RAG knowledge question and answer; data analysis; model direct question and answer; non-target small talk; preset target tasks;
[0079] Among them, identifying the intention of the sub-question includes: dynamically composing prompt words and submitting them to the large language model for intent recognition, and the prompt words include at least one of the following: current dialogue state, dialogue content, and instruction prompt.
[0080] Specifically, the intent recognition of sub-questions can include a variety of specific categories, including preset multi-round dialogues, RAG knowledge questions and answers, data analysis, model direct questions and answers, non-targeted small talk, and preset target tasks. This recognition process can be achieved by constructing dynamic prompt words, which will be input into the large language model to perform the intent recognition task. The composition of the prompt word contains at least one of the following key information: the current dialogue state, which can refer to the immediate progress of the dialogue and the established context; the dialogue content, which can include historical communication records to capture the coherence of the dialogue; the instruction prompt, that is, the specific request or question raised by the user.
[0081] It should be noted that preset multi-round dialogues may refer to interactions with users according to a preset dialogue process to complete specific tasks or queries, such as booking a hotel or checking the status of an order. Among them, RAG knowledge question and answer can use retrieval enhancement generation technology to process user questions, retrieve relevant information from the knowledge base, and generate answers based on this information. Data analysis intention may refer to questions raised by users that require data analysis and processing, such as statistics or comparison of data, to provide insights or answers; model direct question and answer may refer to questions raised by users that can be directly answered based on existing knowledge bases or pre-trained information without additional retrieval or analysis steps. Non-targeted chat may refer to conversations between users that do not involve specific tasks or queries, but rather casual, non-target-oriented communication. This intention is usually used to maintain user engagement or provide social interaction. Preset target tasks may refer to other preset tasks, such as calling business interfaces and calling end-side functions (such as helping users order takeout)
[0082] In this embodiment, the method improves the recognition accuracy of the dialogue recognition method for user intent, so that the dialogue recognition method can flexibly apply constraints according to different dialogue contexts and user intents, and generate more accurate and personalized sub-question answers.
[0083] Exemplarily, in one embodiment, the following dialogue may be used to determine the user's intention:
[0084] “###Current conversation status:
[0085] The user is booking a hotel. Booking a hotel requires collecting the name, ID card, check-in date, and room type of the person staying. The collected user information is as follows: name xxx, booking date xxx.
[0086] ###Content of conversation:
[0087] Q: Hotel booking
[0088] A: Which date range would you like to book?
[0089] Q: July 10 to July 12
[0090] A: How many rooms would you like to book? What room types?
[0091] Q: I want to see what room type I booked last month.
[0092] ###Please judge the user's intention based on the last Q in the conversation content and only output the intention number:
[0093] 1. Continue to book a hotel; 2. Order takeout; 3. Check orders; 4. Questions and answers in the product manual; 5. Data analysis on personal consumption behavior.
[0094] Model answer: 3. ”
[0095] Exemplarily, in another embodiment, the following dialogue may be used to determine the user's intention:
[0096] “###Current conversation status:
[0097] The user is booking a hotel. Booking a hotel requires collecting the name, ID card, check-in date, and room type of the person staying. The collected user information is as follows: name xxx, booking date xxx.
[0098] ###Content of conversation:
[0099] Q: Hotel booking
[0100] A: Which date range would you like to book?
[0101] Q: July 10 to July 12
[0102] A: How many rooms would you like to book? What room types?
[0103] Q: I want to see how much I spent last month.
[0104] ###Please judge the user's intention based on the last Q in the conversation content and only output the intention number:
[0105] 1. Continue to book a hotel; 2. Order takeout; 3. Check orders; 4. Questions and answers in the product manual; 5. Data analysis on personal consumption behavior.
[0106] Model answer: 5. ”
[0107] Exemplarily, in another embodiment, the following dialogue may be used to determine the user's intention:
[0108] “###Current conversation status:
[0109] The user is booking a hotel. Booking a hotel requires collecting the name, ID card, check-in date, and room type of the person staying. The collected user information is as follows: name xxx, booking date xxx.
[0110] ###Content of conversation:
[0111] Q: Hotel booking
[0112] A: Which date range would you like to book?
[0113] Q: July 10 to July 12
[0114] A: How many rooms would you like to book? What room types?
[0115] Q: 3 rooms, twin bed room
[0116] ###Please judge the user's intention based on the last Q in the conversation content and only output the intention number:
[0117] 1. Continue to book a hotel; 2. Order takeout; 3. Check orders; 4. Questions and answers in the product manual; 5. Data analysis on personal consumption behavior.
[0118] Model answer: 1. "
[0119] In one embodiment, Figure 4 As shown, if the intention of the sub-problem is RAG knowledge question answering, the sub-problem effective constraint application method corresponding to the sub-problem task type is adopted, and based on the sub-problem, the results of each sub-problem are obtained, including the following steps:
[0120] Step 401: In the retrieval and filtering stage of the large language model, a retrieval segment is determined according to the sub-question, and the retrieval segment is input into the large language model in batches to retrieve and filter the information segment, and the sub-question validity constraint is added to the prompt word of the large language model, so that the large language model retains the information segment that meets the sub-question validity constraint, which is defined as the target information segment;
[0121] Specifically, when the intention of the sub-question is determined to be a RAG knowledge question and answer, the scope to be searched, i.e., the search segment, is determined based on the content of the sub-question. The search segments can be sent to the large language model in batches for information retrieval and filtering to ensure that the search results meet the specific requirements and restrictions of the sub-question, i.e., the sub-question validity constraints. When the large language model processes the search segment, the sub-question validity constraints can be added to the prompt words. The sub-question validity constraints can include the time range, topic relevance, and level of detail of the information. The large language model filters out qualified information segments based on the constraints in the prompt words, and these qualified information segments can be defined as target information segments.
[0122] Step 402: In the generation stage of the large language model, a sub-problem result is generated through the large language model according to the target information segment, and the sub-problem validity constraint is added to the prompt word of the large language model, so that the large language model can identify the information segment whose relevance meets the set conditions from the target information segment according to the sub-problem validity constraint.
[0123] Specifically, based on the target information segments screened out according to the sub-question validity constraints in step 401, these target information segments can be used as the basis for generating answers. In the process of generating answers, the sub-question validity constraints can be added to the prompt words of the large language model. Adding the sub-question validity constraints can guide the large language model to identify the most relevant and most consistent information segments in accordance with the sub-question validity constraints from the target information segments. These information segments can be directly related to the sub-questions and meet specific requirements and restrictions. The large language model can analyze these information segments and generate an accurate answer in combination with the sub-question validity constraints, ensuring that the answer content is not only closely related to the sub-questions, but also fully complies with the various constraints set in the sub-questions, thereby generating a high-quality sub-question result.
[0124] In this embodiment, the method can ensure that when processing sub-questions of the RAG knowledge question-answering type, the relevance and accuracy of information retrieval are improved by accurately applying sub-question validation constraints, and ultimately generate high-quality answers that meet user intentions and specific requirements.
[0125] In one embodiment, Figure 5 As shown, if the intention of the sub-problem is to preset multiple rounds of dialogue, the sub-problem effectiveness constraint application method corresponding to the sub-problem task type is adopted, and based on the sub-problem, the results of each sub-problem are obtained, including the following steps:
[0126] Step 501: determining a slot according to the subproblem and the subproblem effective constraint, and obtaining a slot value corresponding to the slot based on the slot;
[0127] Specifically, when the intent of a sub-question is identified as a preset multi-round dialogue, the key information requirements in the dialogue are determined based on the content of the sub-question and the corresponding sub-question effective constraints. These requirements can be called slots. Among them, the slot represents the type of information obtained from the user. For example, in a hotel booking dialogue, the slot may include the check-in date, room type selection, and guest name. After the slot is determined, the slot value corresponding to the slot is obtained based on these slots, that is, the actual user input or retrieved information, which can fill in the specific details required in the dialogue process.
[0128] Step 502: Obtain the results of each sub-problem according to the sub-problems and slot values.
[0129] Specifically, the slots required for the dialogue are determined according to the sub-problems and the constraints for the sub-problems to take effect, and the specific slot values corresponding to these slots are obtained, so that the sub-problems can be further processed to generate specific results for each sub-problem. For example, if the sub-problem is about booking a hotel, the slots may include the check-in date, room type, and guest name, and the slot values may be the specific information provided by the user for these slots. Using these slot values, subsequent booking operations can be performed, such as checking the availability of the hotel, calculating the price, or directly completing the booking; if the sub-problem is about flight inquiries, the slots may be the departure place, destination, and departure date, and the slot values may be the specific selections of the user. Based on the slot values, specific flight information can be retrieved to provide the user with flight options, prices, and other related information.
[0130] In this embodiment, the method can ensure the accurate collection and processing of information related to user intentions in multiple rounds of conversations, thereby improving the efficiency and accuracy of conversation management, enabling the conversation recognition method to more accurately respond to the user's complex needs and effectively advance the conversation process.
[0131] In one embodiment, the method further includes: maintaining a preset multi-round dialogue; wherein maintaining the preset multi-round dialogue includes: entering into a multi-round dialogue and continuing the multi-round dialogue, and executing multi-round nesting in response to another multi-round dialogue task triggered by the user.
[0132] Specifically, maintaining a preset multi-round dialogue may mean entering into a multi-round dialogue and continuing it, which may mean that if a user participates in a specific multi-round dialogue task, such as booking a hotel, the dialogue will revolve around the task, continue to obtain necessary information and respond; when a user triggers another multi-round dialogue task in an ongoing multi-round dialogue, multi-round nesting is performed. For example, when a user asks for travel insurance information during the hotel booking process, the dialogue can recognize this new task and embed it into the current dialogue, processing two tasks at the same time without losing context or information.
[0133] In this embodiment, the method improves the flexibility and efficiency of dialogue management, so that even in complex dialogue scenarios, multiple dialogue tasks can be effectively managed and promoted, maintaining the continuity of the dialogue, thereby improving the user experience.
[0134] In one embodiment, Figure 6 As shown, entering a multi-round dialogue and continuing the multi-round dialogue, responding to another multi-round dialogue task triggered by the user, performing multi-round nesting, including the following steps:
[0135] Step 601: In each round of the conversation, record the user's input and response to the input, and update the conversation history;
[0136] Specifically, when a user participates in a conversation and provides input, the input may be a question, a statement, or any other form of communication, and the user's input will be captured and recorded. A corresponding response may be generated for the user's input, and the response needs to be recorded. It should be noted that recording may mean adding the user's input and response as part of the conversation to the record of the conversation history, and updating the conversation history.
[0137] Step 602: Determine whether the conditions for the preset multi-round dialogue have been met, and if so, trigger the preset action of the preset multi-round dialogue, and if not, continue to trigger the dialogue;
[0138] Specifically, it is determined whether the conditions for the preset multi-round dialogue have been met. The conditions for the multi-round dialogue may include information that the user must provide, such as date, time, location, etc. If all conditions are met, that is, the user has provided all the necessary information to complete the dialogue, then the preset dialogue action can be triggered, such as booking a hotel, arranging a meeting, etc. If the conditions are not fully met, that is, the user has not provided enough information or the information does not meet the preset standards, the dialogue will continue, and the user needs to be guided to supplement the missing information or correct the information that does not meet the conditions until all conditions for triggering the preset action are met.
[0139] Step 603: If it is determined that the current question of the user does not belong to the preset multi-round dialogue, retain the current state of the preset multi-round dialogue and start the nested dialogue;
[0140] Specifically, when the user's current question does not belong to the ongoing preset multi-round dialogue, the current state of the preset multi-round dialogue should be retained, and a nested dialogue should be started to handle the user's current question. That is, the user's new question can be responded to and processed without losing the existing dialogue progress. If the new problem is solved, the dialogue can return to its original state and continue the previous communication and tasks.
[0141] It should be noted that a nested conversation can refer to a new conversation task that is started in an ongoing conversation process due to a new question or demand from the user. The new conversation task does not replace or end the current conversation, but temporarily interrupts the current conversation so that it can focus on solving the user's new problem. For example, in a hotel booking conversation, if the user suddenly asks about the local weather, a nested conversation will be started to provide weather-related information without affecting the original hotel booking process. Once the weather information is provided, the conversation can seamlessly return to the topic of hotel booking and continue the previous conversation process.
[0142] Step 604: If the nested conversation is completed, restore the current state of the preset multi-round conversation and continue the conversation.
[0143] Specifically, once the nested dialogue task currently triggered by the user is resolved or the user completes the communication related to the nested dialogue, the previous preset multi-round dialogue will not be reset or lost, but restored to the state before the start of the nested dialogue. That is, all previous exchanges and progress made in the preset multi-round dialogue will be retained to ensure the continuity of the dialogue and the integrity of the context. The dialogue will continue from the point where the nested dialogue ends, proceed according to the process of the preset multi-round dialogue, collect the remaining required information or perform preset actions, such as reservations, inquiries, etc., until the goal of the preset multi-round dialogue is completed.
[0144] In this embodiment, the method improves the flexibility and efficiency of dialogue management, making it possible to process multiple dialogue tasks simultaneously without losing context, thereby improving the user experience and the multi-tasking capability of the dialogue recognition method.
[0145] In one embodiment, at least the overall constraint of the question and the updated session persistence constraint are merged to obtain the problem effective constraint, including: merging the overall constraint of the question, the updated session persistence constraint and the system constraint to obtain the problem effective constraint; the system constraint is different from the session persistence constraint and the overall constraint of the session;
[0146] Specifically, the process of determining the effective constraints of a question involves the merging of three different types of constraints, namely, the overall constraints of the question, the updated session persistence constraints, and the system constraints. The overall constraints of the question can refer to the constraints that are specific to the current question, which can be derived from the specific requirements or context information of the user in the current question; the session persistence constraints can be constraints that are always valid during the session, which can be composed of the user's long-term preferences or preset standards and are applicable throughout the duration of the session; the system constraints are different from the session persistence constraints and the overall constraints of the session. The system constraints can be restrictions set by the server and can be related to performance standards, security protocols, or resource allocation. By merging the three different types of constraints, the effective constraints of the question can be obtained. The effective constraints of the question can be a set of constraints that integrate the specific requirements of the current question, the persistent conditions in the session, and the platform-level rules, which are used to guide the solution of the question and the generation of answers.
[0147] At least the sub-problem constraint, the overall constraint of this question and the updated session persistence constraint are merged to obtain the sub-problem effective constraint, including: merging the sub-problem constraint, the overall constraint of this question, the updated session persistence constraint and the system constraint to obtain the sub-problem effective constraint.
[0148] Specifically, in the process of determining the effective constraints of sub-problems, it is necessary to comprehensively consider the constraints at multiple levels. Sub-problem constraints can refer to specific requirements and restrictions for each specific sub-problem; the overall constraints of this question can include all relevant constraints of the current main question; session persistence constraints can include constraints that are valid during the session; system constraints are different from session persistence constraints and session overall constraints. System constraints can be restrictions set by the server and can be related to performance standards, security protocols, or resource allocation. By merging these constraints from different sources and different levels, the effective constraints of sub-problems obtained can fully reflect all constraints that should be followed when dealing with specific sub-problems, ensuring that when generating solutions to sub-problems, not only the detailed requirements of the sub-problems are taken into account, but also the context of the overall conversation, the user's long-term preferences, and the rules and restrictions of operation are taken into account.
[0149] In this embodiment, the method enhances the adaptability and flexibility of the conversation recognition method, enabling it to accurately respond to the diverse needs of users while complying with the rules, and maintain the consistency and accuracy of the context in complex multi-round conversations, thereby improving user experience and conversation efficiency.
[0150] In one embodiment, Figure 7 As shown, constraint merging includes the following steps:
[0151] Step 701: Classify each constraint according to a preset category;
[0152] Specifically, each constraint is grouped into preset categories, such as output language category, output style category, output length category, role-playing category, expansion of preset categories of other business expectations, and other categories.
[0153] It should be noted that the output language category can refer to the specific language requirements that should be used in the dialogue; the output style category can refer to the tone and style of the dialogue, such as formal or humorous; the output length category can determine the length and detail of the answer; the role-playing category can refer to the impact of the role setting on the context and wording in the dialogue; the preset category of other business expectations can include constraints of specific business needs; and other categories can include all constraints not covered by the above classifications.
[0154] Step 702: Input each type of constraint into the large language model respectively to merge the constraints by category; wherein, when merging the constraints by category, input a prompt word into the large language model, the prompt word includes a merging priority, and the merging priority is: sub-question constraint> overall constraint of this question> session persistence constraint> system overall constraint.
[0155] Specifically, the merging of constraints follows a priority order, i.e., sub-question constraints > overall question constraints > session persistence constraints > system overall constraints. When generating answers, if there are conflicts or overlaps, sub-question constraints will be satisfied first, followed by overall question constraints directly related to the current question, followed by session persistence constraints across the entire session, and finally system overall constraints. When merging constraints, the large language model can receive prompts containing these priority orders to ensure that in the process of generating answers, various constraints can be integrated in the correct priority order, thereby ensuring that the answer meets the requirements of the specific sub-question while also considering the context of the overall conversation and platform-level rules.
[0156] It should be noted that, in general, sub-question constraints have the highest priority, followed by overall constraints of the question, session persistence constraints, and finally system overall constraints. In specific business scenarios, system overall constraints can be defined as mandatory constraints. For example, when the system overall constraint stipulates that the large model must play a specific role, the system overall constraint should not be easily changed by user request. In this scenario, the system overall constraint can have the highest priority in the process of merging constraints. It is further stated that the priority between constraints can also be adjusted or set as needed.
[0157] For example, in a conversation about financial services, the overall system constraint may require that the conversation always remain in a professional financial consulting role. Even if the user asks a non-financial question, the chatbot should continue to provide answers in the financial field instead of turning into a general chatbot. That is, when merging constraints, the overall system constraint will be given the highest priority to ensure that the conversation does not deviate from the professional field.
[0158] In this embodiment, the method can ensure that when generating answers, constraints that are more specific and directly related to the current sub-question are given higher priority, so that the generated answers are more in line with the user's specific needs and the immediate context of the conversation, improving the flexibility and accuracy of the conversation recognition method, and maintaining the coherence and consistency of the conversation.
[0159] In one embodiment, Figure 8 As shown, determining the user's target problem includes the following steps:
[0160] Step 801: Use a large language model to identify the conversation history and parse pronouns or omitted expressions to complete the initial question and obtain the target question;
[0161] Specifically, the initial question can refer to the question or request raised by the user at the beginning of the conversation, while the conversation history can contain all previous communication records of the user. These two pieces of information together provide a basis for understanding the user's intentions and goals, where the initial question can reflect the user's current needs and the conversation history can provide the background and context of the conversation.
[0162] Step 802: Use a large language model to identify the conversation history and parse pronouns or omitted expressions to complete the initial question and obtain the target question.
[0163] Specifically, the large language model is used to identify and parse pronouns or omitted expressions in the conversation history. Among them, pronouns or omitted expressions can refer to previously mentioned nouns or concepts in the conversation, or omit some contextual information. The large language model can infer the specific meaning of these pronouns or omitted expressions by understanding the conversation history and context. Through the identification and parsing of the large language model, the large language model can complete the user's initial question and fill in the missing information due to pronouns and omitted expressions, thereby obtaining a more complete and specific target question.
[0164] In this embodiment, the method can improve the accuracy of the conversation recognition method in understanding the user's intentions, and by parsing the complex language phenomena in the conversation history, ensure that the conversation recognition method can accurately capture the user's comprehensive needs, thereby generating more accurate and relevant answers.
[0165] Based on the same concept, the present application also provides an electronic device, including a memory and a processor, the memory storing a computer program, and a method for identifying multi-round multi-intention mixed conversations when the processor executes the computer program.
[0166] In one embodiment, an electronic device is provided, including a memory and a processor. The electronic device may be a terminal, and its internal structure diagram may be as follows: Fig. 9As shown. The electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for identifying a multi-round multi-intention mixed dialogue is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the housing of the electronic device, or an external keyboard, touchpad or mouse.
[0167] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0168] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0169] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for identifying multi-round multi-intention mixed dialogues, characterized in that: The method comprises: Determine the user's target problem, split the target problem into multiple sub-problems and the overall constraint of the question; wherein the overall constraint of the question can constrain the target problem and the multiple sub-problems; If the overall constraint of the question belongs to the overall constraint of the session, the overall constraint of the question is updated to the session persistence constraint; wherein the overall constraint of the session refers to the overall control condition of the session, and the session persistence constraint refers to the restriction condition within the preset duration of the session; At least the overall constraint of the question and the updated session persistence constraint are combined to obtain a problem validation constraint; wherein the problem validation constraint can constrain the target question and the multiple sub-questions; According to the subproblem, determine the subproblem constraint, merge at least the subproblem constraint, the overall constraint of the question and the updated session persistence constraint to obtain the subproblem effective constraint; wherein the subproblem effective constraint can constrain at least one subproblem among the multiple subproblems; According to the sub-problems and the effective constraints of the sub-problems, the results of each sub-problem are obtained; Inputting the effective constraints of the question and the results of each sub-question into the large language model to obtain an answer to the target question; The constraint merging includes: classifying each constraint according to a preset category; inputting each type of constraint into a large language model to merge the constraints by category; and inputting a prompt word into the large language model when merging the constraints by category, wherein the prompt word includes a merging priority.
2. The method for identifying multi-round multi-intention mixed conversations according to claim 1, characterized in that: According to the sub-problems and the effective constraints of the sub-problems, the results of each sub-problem are obtained, including: Identify the intention of the sub-problem, and classify the tasks based on the intention of the sub-problem to determine the task type of the sub-problem; wherein different task types have different application methods for the sub-problem validation constraints; A sub-problem validation constraint application method corresponding to the sub-problem task type is adopted, and based on the sub-problem, results of each sub-problem are obtained.
3. The method for identifying multi-round multi-intention mixed dialogue according to claim 2, characterized in that: The intent of the sub-question is one of the following: Preset multiple rounds of dialogue; RAG Trivia; Data analysis; Model direct question and answer; Non-targeted small talk; Preset target tasks; The intention of identifying the sub-question includes: dynamically composing prompt words and submitting them to a large language model for intention recognition, and the prompt words include at least one of the following: current dialogue state, dialogue content, and instruction prompt.
4. The method for identifying multi-round multi-intention mixed dialogue according to claim 3, characterized in that: If the sub-question is intended to be the RAG knowledge question and answer, the sub-question validation constraint application method corresponding to the sub-question task type is adopted, and based on the sub-question, each sub-question result is obtained, including: In the retrieval and filtering stage of the large language model, a retrieval segment is determined according to the sub-problem, the retrieval segment is input into the large language model in batches to retrieve and filter information segments, and the sub-problem validity constraint is added to the prompt word of the large language model, so that the large language model retains the information segment that meets the sub-problem validity constraint, which is defined as the target information segment; In the generation stage of the large language model, a sub-problem result is generated by the large language model according to the target information segment, and the sub-problem validity constraint is added to the prompt word of the large language model, so that the large language model identifies the information segment whose relevance meets the set conditions from the target information segment according to the sub-problem validity constraint.
5. The method for identifying multi-round multi-intention mixed dialogue according to claim 3, characterized in that: If the intention of the sub-problem is the preset multi-round dialogue, the sub-problem validation constraint application method corresponding to the sub-problem task type is adopted, and based on the sub-problem, each sub-problem result is obtained, including: Determine a slot according to the subproblem and the effective constraint of the subproblem, and obtain a slot value corresponding to the slot based on the slot; According to the sub-problems and the slot values, the results of each sub-problem are obtained.
6. The method for identifying multi-round multi-intention mixed dialogue according to claim 3, characterized in that: The method also includes: maintaining the preset multi-round dialogue; wherein, maintaining the preset multi-round dialogue includes: entering into a multi-round dialogue and continuing the multi-round dialogue, and executing multi-round nesting in response to another multi-round dialogue task triggered by a user.
7. The method for identifying multi-round multi-intention mixed dialogue according to claim 6, characterized in that: Entering a multi-round dialogue and continuing the multi-round dialogue, in response to another multi-round dialogue task triggered by the user, performing multi-round nesting, including: At each turn of the conversation, record the user's input and the response to the input, and update the conversation history; Determine whether the conditions of the preset multi-round dialogue are met, and if so, trigger the action preset in the preset multi-round dialogue, and if not, continue to trigger the dialogue; If it is determined that the current question of the user does not belong to the preset multi-round dialogue, retain the current state of the preset multi-round dialogue and start a nested dialogue; If the nested dialogue is completed, the current state of the preset multi-round dialogue is restored and the dialogue is continued.
8. The method for identifying multi-round multi-intention mixed dialogue according to claim 1, characterized in that: At least merging the overall constraint of the question and the updated session persistence constraint to obtain the problem effective constraint, including: merging the overall constraint of the question, the updated session persistence constraint and the system constraint to obtain the problem effective constraint; the system constraint is different from the session persistence constraint and the session overall constraint; At least the sub-problem constraint, the overall constraint of this question and the updated session persistence constraint are merged to obtain the sub-problem effective constraint, including: merging the sub-problem constraint, the overall constraint of this question, the updated session persistence constraint and the system constraint to obtain the sub-problem effective constraint.
9. The method for identifying multi-round multi-intention mixed dialogue according to claim 8, characterized in that: The merging priority is: the sub-question constraint>the overall constraint of this question>the session persistence constraint>the system constraint.
10. The method for identifying multi-round multi-intention mixed dialogue according to claim 1, characterized in that: Identify the user's target problem, including: Get the user's initial question and the user's conversation history; The conversation history is identified and pronouns or omitted expressions are parsed through the large language model to complete the initial question and obtain the target question.
11. An electronic device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program, and when the computer program is executed by the processor, the steps of the method for identifying multi-round multi-intention mixed dialogues as described in any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Intelligent task-based dialogue method, system, device and program product fused with large language model
CN118569385A
RAG-based vertical domain knowledge multi-round question and answer method
CN118964556A