Intelligent task-based dialogue method, system, device and program product fused with large language model
The intelligent task-based dialogue method that integrates large language models simplifies data annotation and model training, solves the problem of data dependence and insufficient diversity of traditional systems, achieves the flexibility and efficiency of the dialogue system, and improves the user experience. .
Patent Information
- Application Number
- CN202410658940.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-08-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional intelligent task-based dialogue systems rely on a large amount of annotated data for model training. Data expansion and diversity are insufficient, resulting in weak dialogue consistency and coherence, and model training is time-consuming and labor-intensive.
Adopting an intelligent task-based dialogue method that integrates large language models, dynamically loading scene configuration information simplifies data annotation and model training, and combines the intent entity recognition module, status tracking module, action execution module and utterance generation module to achieve a flexible dialogue system sex and efficiency.
It significantly reduces the data scale and manpower investment in model training, improves the flexibility and efficiency of the dialogue system, enhances the diversity and consistency of dialogue, and improves the user experience.
Smart Images

Figure CN118569385A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an intelligent task-based dialogue method and system integrating a large language model. Background Art
[0002] In the field of natural language processing, intelligent task-based dialogue systems have always played a key role and are widely used in various industries to assist manual customer service in efficiently handling various matters. Such systems usually focus on completing tasks in specific scenarios, such as air ticket booking, conference room booking, product promotion, etc. Through real-time dialogue interaction with users, they can not only accurately capture the specific information necessary to complete the task, but also rely on high-precision user intent recognition technology to flexibly switch between different dialogue processes, and then feedback appropriate answer strategies. Traditional task-oriented dialogue frameworks, such as RASA, have built a complete task processing structure by building scenario stories, defining user intent, identifying key entities, designing speech templates and presetting execution actions, and using labeled data to train intent recognition and entity extraction models to form a powerful natural language understanding (NLU) module. However, with the rapid development of large language model technologies such as ChatGPT, existing intelligent task-based dialogue systems such as the RASA framework also face some limitations and challenges.
[0003] First, they are highly dependent on data. Traditional task-based dialogue systems usually require a large amount of labeled data for model training so that the model can understand and process the intent and entities in the user's speech. For task-based dialogue systems in specific fields, data collection and labeling are needed to prepare for model training. Whether training two models for intent classification and entity recognition, or training a joint model to complete intent classification and entity recognition at the same time, a large amount of training data is required. Models for intent classification and entity recognition can usually only process the content contained in the training data. When the scenario needs to be expanded or new scenarios are introduced, it is often accompanied by the introduction of new intent types and new entities. At this time, the previously trained model needs to be retrained or retrained, which is also a relatively time-consuming and labor-intensive step.
[0004] Secondly, in terms of speech generation, traditional methods often lack diversity. The system usually responds based on preset speech templates. Although the diversity of responses can be increased by configuring different templates, overall, the diversity is still limited. Users are prone to encountering repeated response scripts when trying multiple times, which reduces the user experience.
[0005] In addition, the consistency and coherence of the dialogue are also insufficient. In the traditional task-based dialogue framework, the system's response content mainly depends on the current position of the dialogue process. For example, in the air ticket booking scenario, after asking about the departure and destination, the system usually directly asks about the departure date without considering the user's previous dialogue content and attitude. Although this mechanical response realizes the interaction of multiple rounds of dialogue, the overall dialogue coherence and fluency are relatively weak, affecting the natural communication experience between the user and the system. Summary of the invention
[0006] In response to the above problems, the present invention proposes an intelligent task-based dialogue method and system that integrates a large language model. The system draws on the design concept of traditional task-based dialogue systems and combines the powerful capabilities of large language models to achieve rapid adaptation and efficient configuration of scenarios. By dynamically loading the configuration information of specific scenarios, the system can efficiently advance the dialogue process according to the preset process logic, greatly simplifying the steps of data annotation and model training.
[0007] The present invention provides an intelligent task-based dialogue method integrating a large language model, which specifically includes:
[0008] Get the conversation with the user;
[0009] Identify and analyze user input information;
[0010] Synchronously update the status of the dialogue state tracker based on the results of recognition and parsing;
[0011] Guide to the appropriate dialogue scene node based on the tracker's intelligence;
[0012] Execute pre-set actions to complete specific tasks;
[0013] Generate the robot's feedback based on the current dialogue node context and complete dialogue history data.
[0014] Preferably, in order to adapt to different task-oriented dialogue scenarios, the system also needs to carry out detailed scenario configuration work, covering a series of key elements: customized speech node design, entity information collection node setting, process jump logic planning, and task-related execution actions, etc.
[0015] The present invention provides an intelligent task-based dialogue system integrating a large language model. By integrating the large language model with the task-based dialogue module, a more flexible and intelligent intelligent task-based dialogue system is realized. The system is mainly composed of an intention entity recognition module, a state tracking module, an action execution module, and a speech generation module.
[0016] (1) Task-based dialogue module
[0017] For different task scenarios, corresponding scenario configuration work needs to be carried out. The configuration process usually includes the following key parts: speech nodes, information collection nodes, process jump logic, and task-related execution actions.
[0018] The speech node is to configure appropriate speech response strategies at different nodes; it carries the task of guiding and shaping the interaction process. The refined configuration of each speech node is aimed at ensuring that it can accurately execute the preset dialogue generation strategy in a specific situation, thereby promoting the smoothness and goal orientation of the dialogue process. For the speech generation strategy, the key is to configure its corresponding prompt. An effective prompt can clearly convey the intention and guide the user into the relevant dialogue process while maintaining a high degree of naturalness. It will play a vital role in the subsequent NLG speech generation module.
[0019] The information collection node asks questions to the user to collect relevant entity information based on specific task requirements; it is responsible for collecting the entity information required to complete the task. For each entity information, in addition to its name, it is also necessary to configure the entity type, candidate items, and examples of each entity. This information will be used in the prompt construction during NLU entity recognition. For the information collection node itself, when the conversation process jumps to this node, the dialogue strategy of this node is "ask questions to the user based on the collected entity information and the missing entity information, so as to complete all the required entities."
[0020] The process jump logic is the key to ensure smooth connection and switching between different nodes. Depending on the type of node, the corresponding jump logic will be set. For example, after the user completes the information collection, the system will conduct a second confirmation of the collected information. In this process, the system will judge the user's intention based on the user's answer. If the user expresses the intention of "to modify" or "not to modify", the process will jump according to this intention and direct the user to the corresponding node. In the information collection stage, the decision to jump the process is also based on the completeness of the current information. When configuring these jump logics, a brief description or introduction is usually written for each intent logic. It not only helps the clarity of process design, but also serves as part of the prompt built during natural language understanding (NLU) intent recognition, providing a more comprehensive information reference for large models when performing specific tasks.
[0021] Task-related execution actions are a series of operations triggered at specific locations in the conversation process. These actions support access to various functional interfaces, such as querying databases, updating user account status, sending notification emails, etc., to meet the needs of different task scenarios. In practical applications such as booking restaurants, purchasing goods, and booking services, action execution plays a key role in ensuring that conversations can directly drive the execution of business operations. By embedding execution actions in the process of task-based conversations, not only the interaction methods of conversations are enriched, but also the conversation is no longer limited to simple information exchange, but can directly act on the advancement of business processes. As business needs continue to develop and change, actions can be easily added, modified, or deleted, and new interface services can be connected to adapt to the evolving business logic. This flexibility enables the task-based conversation system to continuously meet the diverse needs of users and provide a more efficient and convenient service experience.
[0022] (2) NLU Intent Entity Recognition
[0023] The NLU module is mainly responsible for identifying the intent and entity information in the user's speech. In the present invention, this module uses the capabilities of the large language model to efficiently complete the tasks of intent recognition and entity recognition: by constructing prompts, appropriate instructions are given to drive the large language model to complete specific tasks.
[0024] In the intent recognition part, the system determines the possible child nodes of the current node according to the scene and progress of the current conversation, obtains the intent logic linking the current node and the child nodes, and uses it as the current candidate intent set. Since the system supports highly free conversations, it also includes intents such as "chatting, repeating, and transferring to manual work" into the global intent. Each intent is configured with a corresponding intent description to clarify its meaning. For the construction of prompt, you can refer to the following sample template: "You are an intent recognition assistant and need to return the most appropriate intent name. When the correct intent cannot be determined, the chat intent can be returned. The current conversation topic is xxx. All candidate intent names and descriptions are: {need to book: indicates that the user has the idea or demand to book a meeting room, no need to book: indicates xxx,...} Please classify the following words for intent, and only return the intent name, not other content. Current word: xxx. The intent is: "Here the conversation topic is a brief description of the task scene, and all candidate intents are the collection of the current candidate intent and the global intent. The large language model can return the most appropriate intent name based on the candidate intents and descriptions in the prompt and the current words, thereby achieving the purpose of intent recognition.
[0025] In the entity recognition part, the system mainly determines whether the entity slot information needs to be updated or modified based on the currently recognized entity slot information and the user's current speech, so as to achieve the purpose of entity recognition. The prompt construction of this part is different from the intention recognition. The template may be as follows: "You are an entity maintenance assistant in a multi-round dialogue task. Please update and maintain the entity information based on the existing entity information and the latest speech sentences. For the entity information that has not been recognized, keep its original value. All the entity information that needs to be recognized is as follows: xxx. The current entity information slot_info:xxx, please recognize the entity information in the following speech sentences, update slot_info, and return the updated slot_info content. Speech:xxx. The updated slot_info is: "The large language model can return the updated entity information based on the current entity information in the prompt and the user's current speech. The advantage of this is that entity recognition and entity update can be closely combined. In some special scenarios, users may modify the previously described entity information. This method can handle this situation well and maintain the entity slot information in the entire task-based dialogue well.
[0026] (3) DST Tracker status tracking
[0027] The state tracker is an important component of the task-based dialogue framework. It is mainly responsible for recording and updating the user's dialogue status in multiple rounds of dialogue, mainly including two aspects: recording and updating.
[0028] The state tracker will record the following information during the task-based dialogue process, including:
[0029] Scenario information: including but not limited to scenario type, scenario description, complete process information contained in the scenario, scenario-specific rules or constraints, etc., to ensure that the dialogue system can understand and respond to the user's words in the correct context.
[0030] Current node: In task-based dialogues, the dialogue process is usually modeled as a directed graph, with each node representing a stage or decision point of the dialogue. The state tracker records the node to which the current dialogue progresses in real time, which helps the dialogue system determine the next dialogue action to take and the possible dialogue path.
[0031] Entity slot information: The state tracker will continuously record the entity slot information that has been identified in the current conversation, as well as the status of unfilled slots. This helps the system to ask users questions about unfilled slots during task-based conversations, thereby improving the efficiency and accuracy of information collection.
[0032] Conversation history information: The status tracker will save the user's complete conversation history, which will help the large model to refer to more complete conversation information when generating chat scripts. The conversation content generated by combining historical records will be more natural and consistent.
[0033] The state tracker will also dynamically maintain and update the above content during the conversation flow. When a specific user intent is recognized, the appropriate node jump will be made according to the current process position, and the information content of the current node will be dynamically updated after the node jump. For entity slot information, during the conversation process and at specific nodes of information collection, when the model recognizes specific entity information, the entity information recorded in the current state tracker will be dynamically updated. For conversation history information, it will be updated during the process of conversation interaction with the user.
[0034] (4) Action execution
[0035] The core function of the action execution module is to trigger and execute operations closely related to the current task at specific stages of the task-based dialogue process. These operations may involve querying the database, calling external interfaces, etc., aiming to instantly meet user needs and promote the smooth progress of the dialogue process.
[0036] The action execution module has a powerful ability to communicate with external systems, including but not limited to databases, API interface services, and internal enterprise systems. It can obtain the results of action execution through the preset action interaction mechanism and quickly feed these results back to the dialogue system. In some scenarios, these execution results may also affect the state information of the state tracker, thereby affecting the strategy selection when generating dialogues.
[0037] The action execution module achieves efficient collaboration between the dialogue system and external resources by accurately triggering and executing various actions, greatly expanding the functional scope of the dialogue system.
[0038] (5) NLG speech generation
[0039] The NLG module is mainly responsible for the generation of speech in the dialogue system, and the generated speech will be directly displayed to the user as the robot's reply speech. In this invention, this module will use the powerful text generation ability of the large language model to generate system reply speech, and through the construction of prompts, drive the large model to generate the most appropriate reply content through reasonable instructions.
[0040] In the process of speech generation, we mainly consider two key parts. The first is the speech generation strategy of the current dialogue node. These strategies are pre-defined and refined in the scenario configuration stage, clarifying the language style, speech purpose, predicted information, and generation suggestions that the system should follow when generating speech at a specific node. Secondly, the user's historical conversation information is also an important reference for generating speech. When the NLG module receives these two parts of information, it will guide the large language model to generate speech according to the pre-configured strategy. Ensure that the generated speech content not only follows the set dialogue logic and business rules, but also maintains the coherence and consistency of the dialogue.
[0041] When building the input instruction prompt for a large language model, the template example is as follows:
[0042] "You are a multi-round dialogue answer generation assistant in the xxx scenario. Please refer to the current dialogue and the current requirement to generate a suitable latest bot dialogue. When the latest user dialogue is a question, please give priority to briefly answer his question, and then connect a dialogue to meet the requirement after answering the question.
[0043] Current dialogue contentdialogue:[xxx,xxx,xxx,xxx]
[0044] Requirement:xxx.
[0045] Please generate the latest answer for the bot:"
[0046] The scene name is a brief introduction to the scene of the task-based dialogue, the current dialogue content dialogue is the complete historical dialogue information, and requirement is the speech generation strategy configured for each node. For example, in the conference room reservation scene, taking the greeting node as an example, the following strategy can be configured: "Say hello to the user in a friendly manner, inform the other party that you are a conference room reservation assistant, and ask the other party if there is any need to reserve a conference room." Through the configuration of the above prompt template, the large model can give the most appropriate response to the user's questions and speech, and then bring the conversation content back to the task topic. The reply speech generated in this way can maintain professionalism and consistency while also promoting the process of task-based dialogue, which can significantly improve the interaction quality and efficiency of the dialogue system.
[0047] Based on the above-proposed intelligent task-based dialogue method integrating a large language model, in order to better realize the present invention, an electronic device is further proposed, including a memory and a processor; a computer program is stored on the memory; when the computer program is executed on the processor, the above-proposed intelligent task-based dialogue method integrating a large language model is realized.
[0048] Based on the above-proposed intelligent task-based dialogue method integrating a large language model, in order to better realize the present invention, it is further proposed that the present invention provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the intelligent task-based dialogue method integrating a large language model.
[0049] Beneficial Effects
[0050] The first invention uses a large language model as an alternative solution. It does not rely on the preparation of specific training data sets and the time-consuming model training process. Instead, it uses the command prompt to guide the model to generate the required answer. After undergoing pre-training with large-scale data, such large language models have accumulated a deep foundation of natural language knowledge on the one hand, and on the other hand, they have also demonstrated excellent human command execution capabilities. The reasoning mechanism of the large language model presents a zero-shot characteristic. There is no need for additional model training and a large amount of special training data. It only needs to clearly specify the task category and related parameters when constructing the prompt, and use one or two typical examples as references. The model can respond to new tasks. This method significantly reduces the data scale and manpower investment cost required for model training. Moreover, for new intent categories or entity types that may appear in the future, it only needs to update the prompt settings to achieve rapid adaptation and iterative optimization, which greatly improves the flexibility and efficiency of the system.
[0051] In addition, the intelligent reply module of the dialogue system will make use of the powerful language dialogue ability of the large language model. Through prompt configuration, the large language model can generate appropriate speech content at each scene node. The large language model can give strong randomness to the generated speech, and can generate rich and diverse speech while keeping the original meaning of the speech unchanged. On the other hand, the large language model has strong long text processing capabilities. When the large model generates speech, it will also pass the historical dialogue records of the past few rounds as part of the prompt to the large model. This design ensures that the generated answer can be closely connected with the previous dialogue context to form a coherent and logically consistent dialogue flow. This method greatly enhances the authenticity of the dialogue and user experience, so that the intelligent reply is no longer limited to the preset template, and can flexibly respond to complex scenarios and changes in user questions. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A flowchart of an intelligent task-based dialogue method and system integrating a large language model;
[0053] Figure 2 An example of configuring a task-based dialogue scenario in an intelligent task-based dialogue method and system that integrates a large language model - a flowchart for conference room reservation. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0055] According to the attached Figure 1 The present invention provides an intelligent task-based dialogue method integrating a large language model, which specifically includes:
[0056] Get the conversation with the user;
[0057] Identify and analyze user input information;
[0058] Synchronously update the status of the dialogue state tracker based on the results of recognition and parsing;
[0059] Guide to the appropriate dialogue scene node based on the tracker's intelligence;
[0060] Execute pre-set actions to complete specific tasks;
[0061] Generate the robot's feedback based on the current dialogue node context and complete dialogue history data.
[0062] Preferably, in order to adapt to different task-oriented dialogue scenarios, the system also needs to carry out detailed scenario configuration work, covering a series of key elements: customized speech node design, entity information collection node setting, process jump logic planning, and task-related execution actions, etc.
[0063] The present invention provides an intelligent task-based dialogue system integrating a large language model, which mainly realizes a more flexible and intelligent intelligent task-based dialogue system by integrating a large language model with a task-based dialogue module. The system mainly consists of: an NLU (Natural Language Understanding) intent entity recognition module, a DST Tracker (Dialogue State Tracking) state tracking module, an Action execution module, and an NLG (Natural Language Generation) speech generation module.
[0064] (1) Task-based dialogue scenario configuration
[0065] For different task scenarios, corresponding scenario configuration work is required. The configuration process usually includes the following key parts: first, the speech node, that is, configuring appropriate speech response strategies on different nodes; second, the information collection node, according to the specific task requirements, asking questions to users to collect relevant entity information; third, the process jump logic, clarifying the jump logic between different nodes; and finally, the task-related execution action, that is, triggering the corresponding action at a specific scenario location.
[0066] According to the attached Figure 2 The process shown sets up a conference room reservation scenario, and then analyzes each module in detail.
[0067] First, the speech node is responsible for guiding and shaping the interaction process. Each speech node is finely configured to ensure that it can accurately execute the preset dialogue generation strategy in a specific situation, thereby promoting the smoothness and goal orientation of the dialogue process. Taking the greeting node as an example, this node aims to create a friendly chat atmosphere while introducing the core service subject of the scene, namely conference room reservation, in a timely manner. For the speech generation strategy, the key is to configure its corresponding prompt. An effective prompt can clearly convey the intention and guide the user into the relevant dialogue process while maintaining a high degree of naturalness. It will play a vital role in the subsequent NLG speech generation module.
[0068] Second, the information collection node is mainly responsible for collecting the entity information needed to complete the task. In the conference room reservation example, the information that needs to be collected includes: "Conference Room Name", "Meeting Time" and "Participants". For each entity information, in addition to its name, it is also necessary to configure the entity type, candidate items and samples of each entity. This information will be used in the prompt construction during NLU entity recognition. For the information collection node itself, when the conversation process jumps to this node, the dialogue strategy of this node is "ask the user questions based on the collected entity information and the missing entity information, so as to complete all the required entities."
[0069] Third, the process jump logic plays the role of a serial node. Different types of jump logic will be configured according to different node types. For example, after the user information is collected, the collected information will be confirmed twice. At this time, the user's intention will be judged according to the user's answer. When the intention is "to modify" or "not to modify", the process will jump to the corresponding node according to the user's intention. At the information collection node, the jump logic will be determined according to the completeness of the current information collection. In this example, it will jump to the new node only after the information related to the conference room reservation is collected. When configuring the jump logic, a short introduction is often written for each intent logic, such as "reservation required: indicates that the user has the idea or demand to reserve a conference room". Such an introduction will also be part of the prompt construction during NLU intent recognition, aiming to allow large models to refer to more comprehensive information when completing specific tasks.
[0070] Fourth, task-related execution actions refer to actions triggered at specific locations in the conversation process. Actions can support access to various functional interfaces, such as querying a database, updating user account status, sending notification emails, etc. In various task scenarios such as booking a restaurant, purchasing goods, and booking services, action execution can play a key role in achieving deep integration between conversations and business processes. In this example, the action of conference room reservation represents the triggering of the conference room reservation interface. After collecting the required information, the corresponding interface can be called to complete the conference room reservation process. By adding execution actions to the process of task-based conversations, the entire conversation process can be made richer and more diverse, not only limited to information exchange, but also directly driving the execution of business operations. As the needs of the scene evolve and change, actions can be easily added, modified, or deleted, and new interface services can be connected to adapt to the evolving business logic.
[0071] (2) NLU Intent Entity Recognition
[0072] The NLU module is mainly responsible for identifying the intent and entity information in the user's speech. In the present invention, this module uses the capabilities of the large language model to efficiently complete the tasks of intent recognition and entity recognition. Its core method is: through the construction of prompts, appropriate instructions are given to drive the large language model to complete specific tasks.
[0073] For the intent recognition part, we first obtain the sub-nodes of the current position based on the configured scene information and the current conversation progressing to a certain node position. We obtain the intent logic linking the current node and the sub-nodes as the current candidate intent set. At the same time, because our dialogue system is a system with a high degree of dialogue freedom, we will also add the intents of "chatting, repeating, and transferring to manual" as global intents. For each intent, we will configure the corresponding intent description during the scene configuration, such as "reservation required": "Indicates that the user has the idea or demand to book a conference room"; "Transfer to manual": "Indicates that the user hopes that manual customer service will intervene." For the construction of prompt, you can refer to the following sample template: "You are an intent recognition assistant and need to return the most appropriate intent name. When the correct intent cannot be determined, the chat intent can be returned. The current conversation topic is xxx. All candidate intent names and descriptions are: {Reservation required: indicates that the user has the idea or demand to reserve a conference room, reservation not required: indicates xxx,...} Please classify the intents of the following words, and only return the intent name, and do not return other content. Current wording: xxx. The intent is: "Here, the conversation topic is a brief description of the task scenario, and all candidate intents are a collection of the current candidate intent and the global intent. The large language model can return the most appropriate intent name based on the candidate intents and descriptions in the prompt, combined with the current wording, to achieve the purpose of intent recognition.
[0074] The entity recognition part is similar to the intent recognition part. It mainly judges whether the entity slot information needs to be modified or updated based on the currently recognized entity slot information and the user's current speech, so as to achieve the purpose of entity recognition. The prompt construction of this part is different from the intent recognition. You can refer to the following template: "You are an entity maintenance assistant in a multi-round dialogue task. Please update and maintain the entity information based on the existing entity information and the latest speech sentences. For the entity information that has not been recognized, keep its original value. All the entity information that needs to be recognized is as follows: xxx. The current entity information slot_info:xxx, please recognize the entity information in the following speech sentences, update slot_info, and return the updated slot_info content. Speech: xxx. The updated slot_info is: "All the entity information that needs to be recognized is the entity description information configured during the scene configuration, which includes the entity name, type, candidate value, etc. The current entity information slot_info represents an entity information record table, which records the current recognition status of each entity. None means that it has not been recognized yet. The large language model can return updated entity information based on the current entity information in the prompt and the user's current words. The advantage of this is that entity recognition and entity update can be closely combined. In some special scenarios, users may modify the previously described entity information. This method can handle this situation well and maintain the entity slot information in the entire task-based dialogue well.
[0075] (3) DST Tracker status tracking
[0076] The state tracker is an important part of the task-based dialogue framework. It is mainly responsible for recording and updating the dialogue state of the user in multiple rounds of dialogue. Here we will expand on the state tracker from two aspects: recording and updating.
[0077] On the one hand, the state tracker will record the following information during the task-based dialogue process: scene information, current node, entity slot information, and dialogue history information.
[0078] Scenario information: including but not limited to scenario type, scenario description, complete process information contained in the scenario, scenario-specific rules or constraints, etc., to ensure that the dialogue system can understand and respond to the user's words in the correct context.
[0079] Current node: In task-based dialogues, the dialogue process is usually modeled as a directed graph, with each node representing a stage or decision point of the dialogue. The state tracker records the node to which the current dialogue progresses in real time, which helps the dialogue system determine the next dialogue action to take and the possible dialogue path.
[0080] Entity slot information: The state tracker will continuously record the entity slot information that has been identified in the current conversation, as well as the status of unfilled slots. This helps the system to ask users questions about unfilled slots during task-based conversations, thereby improving the efficiency and accuracy of information collection.
[0081] Conversation history information: The status tracker will save the user's complete conversation history, which will help the large model to refer to more complete conversation information when generating chat scripts. The conversation content generated by combining historical records will be more natural and consistent.
[0082] On the other hand, the state tracker will also dynamically maintain and update the above content during the conversation flow. When a specific user intention is recognized, the appropriate node jump will be made according to the current process position, and the information content of the current node will be dynamically updated after the node jump. For entity slot information, during the conversation process and at specific nodes of information collection, when the model recognizes specific entity information, the entity information recorded in the current state tracker will be dynamically updated. For conversation history information, it will be updated during the process of conversation interaction with the user.
[0083] The state tracker provides a stable and consistent dialogue management foundation for the task-based dialogue system by accurately recording and timely updating the core elements of the dialogue state, ensuring the smooth progress of the dialogue process and the efficient achievement of task goals.
[0084] (4) Action execution
[0085] The main purpose of the action execution module is to trigger and execute operations closely related to the current task at specific nodes of the task-based dialogue process, such as querying the database, calling external interfaces, etc. It aims to achieve instant satisfaction of user needs and smooth progress.
[0086] The action execution module has the ability to communicate with external systems (such as databases, API interface services, internal enterprise systems, etc.). It can obtain the results of action execution through preset action interactions and feed the results back to the dialogue system. In some scenarios, it will also affect the state information of the state tracker and the strategy when the dialogue is generated. For example, in the shopping consultation scenario, it can query the inventory data in the database according to the product inquired by the user, and return the inventory status of the product to the user; in the travel reservation scenario, it can obtain the relevant reservation status by calling the API interface of the third-party reservation platform; in the conference room reservation scenario, it can connect to the internal OA system of the enterprise to complete the action of reserving the conference room.
[0087] In short, the action execution module achieves efficient linkage between the dialogue system and external resources by accurately triggering and executing various actions, greatly expanding the functional boundaries of the dialogue system and enabling it to handle more complex business processes.
[0088] (5) NLG speech generation
[0089] The NLG module is mainly responsible for the generation of speech in the dialogue system, and the generated speech will be directly displayed to the user as the robot's reply speech. In this invention, this module will use the powerful text generation ability of the large language model to generate system reply speech. The core method is to drive the large model to generate the most appropriate reply content through the construction of prompts and reasonable instructions.
[0090] When generating reply words, the following two parts are mainly considered. One part is the word generation strategy configured for the current node. The present invention will predefine and refine the word generation strategies for each dialogue node in the scenario configuration stage. These strategies mainly stipulate that the language style, word purpose, predictive information, generation suggestions, etc. that the system should follow when generating words at a specific node. The other part is the user's historical conversation information. After receiving the content of the above two parts, the NLG module will guide the large language model to generate words according to the pre-configured strategy when generating words, ensuring that the generated words follow the set conversation logic and business rules, while maintaining the coherence and consistency of the conversation. When constructing the input instruction prompt of the large language model, you can refer to the following template:
[0091] "You are a multi-round dialogue answer generation assistant in the xxx scenario. Please refer to the current dialogue and the current requirement to generate a suitable latest bot dialogue. When the latest user dialogue is a question, please give priority to briefly answer his question, and then connect a dialogue to meet the requirement after answering the question.
[0092] Current dialogue contentdialogue:[xxx,xxx,xxx,xxx]
[0093] Requirement:xxx.
[0094] Please generate the latest answer for the bot:"
[0095] The scene name is a brief introduction to the scene of the task-based dialogue, the current dialogue content dialogue is the complete historical dialogue information, and requirement is the speech generation strategy configured for each node. For example, in the conference room reservation scene, taking the greeting node as an example, the following strategy can be configured: "Say hello to the user in a friendly manner, inform the other party that you are a conference room reservation assistant, and ask the other party if there is any need to reserve a conference room." Through the configuration of the above prompt template, the large model can give the most appropriate response to the user's questions and speech, and then bring the conversation content back to the task topic. The reply speech generated in this way can maintain professionalism and consistency while also promoting the process of task-based dialogue, which can significantly improve the interaction quality and efficiency of the dialogue system.
[0096] This embodiment also proposes an electronic device, including a memory and a processor; a computer program is stored on the memory; when the computer program is executed on the processor, the above-mentioned intelligent task-based dialogue method integrating a large language model is implemented.
[0097] This embodiment also proposes a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of an intelligent task-based dialogue method integrating a large language model.
[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person having ordinary knowledge in the art can still modify the technical solutions recorded in the aforementioned embodiments, or replace part or all of the technical features therein with equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and they should all be included in the scope of the claims and specification of the present invention.
Claims
1. An intelligent task-based dialogue system integrating a large language model, characterized in that: By integrating the large language model with the task-based dialogue module, task-based dialogue is achieved; The task-based dialogue module consists of an intent entity recognition module, a state tracking module, an action execution module and a speech generation module; The intention entity recognition module is used to recognize the intention and entity information in the user's speech; The state tracking module records and updates the conversation state of the user in multiple rounds of conversations; The action execution module triggers and executes operations closely related to the current task at a specific node in the task-based dialogue process; The speech generation module is used for speech generation in the dialogue system, and the generated speech will be directly displayed to the user as the robot reply speech.
2. The intelligent task-based dialogue system integrating a large language model according to claim 1, characterized in that: The task-based dialogue module performs corresponding scenario configuration work for different task scenarios; The configuration work includes: speech nodes, information collection nodes, process jump logic and task-related execution actions.
3. The intelligent task-based dialogue system integrating a large language model according to claim 1, characterized in that: The intention entity recognition module uses the large language model to perform intention recognition and entity recognition, and constructs a prompt to give appropriate instructions to drive the large language model to complete a specific task; For the intent recognition, the system determines the child nodes of the current node according to the scenario and progress of the conversation, and obtains the intent logic linking the current node and the child nodes as the current candidate intent set.
4. The intelligent task-based dialogue system integrating a large language model according to claim 1, characterized in that: The state tracking module records include: scene information, current node, entity slot information and dialogue history information.
5. The intelligent task-based dialogue system integrating a large language model according to claims 1 and 4, characterized in that: The state tracking module dynamically maintains and updates the recorded content of the state tracking module during the process of the dialogue flow.
6. The intelligent task-based dialogue system integrating a large language model according to claim 1, characterized in that: The operation of the action execution module includes: querying the database and calling the external interface.
7. The intelligent task-based dialogue system integrating a large language model according to claim 1, characterized in that: The speech generation strategy of the current dialogue node in the speech generation module is pre-defined and detailed in the configuration work.
8. The intelligent task-based dialogue system integrating a large language model according to claim 1, characterized in that: The speech generation module uses the historical dialogue information as an important reference when generating speech.
9. An intelligent task-based dialogue method integrating a large language model, specifically comprising: Get the conversation with the user; Identify and parse the user's input information and obtain the result of the identification and parsing; Synchronously updating the state of the conversation state tracker according to the result of the recognition and analysis; Guide to the appropriate dialogue scene node based on the tracker's intelligence; Execute pre-set actions to complete specific tasks; Generate the robot's feedback based on the current dialogue node context and dialogue history data.
10. An electronic device, characterized in that: It comprises a memory and a processor; a computer program is stored in the memory; when the computer program is executed on the processor, the intelligent task-based dialogue method integrating a large language model as described in claim 9 is implemented.
11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method as claimed in claim 9 are implemented.
Citation Information
Patent Citations
Knowledge-driven easy-to-configure task-oriented dialogue management method and system
CN110765252A
Method of multi-round session framework based on cold start
CN112214589A
Task type intelligent multi-round dialogue method based on RASA and related equipment
CN115392264A
Conversation processing method and device and electronic equipment
CN116127036A
State evaluation interaction method, device and equipment
CN117271746A
Cited By
Training method of Korean dialogue state tracking model
CN118839669A
Multi-round dialogue processing method and device for real-time news based on large model
CN119149711A
Recognition method for multi-round multi-intention mixed dialogue and electronic equipment
CN119396982A
Identification method and electronic device for multi-round multi-intention mixed dialogue
CN119396982B
Multi-scene virtual language dialogue training method and system
CN119886363A
