Task-based dialogue implementation method and device and task-based dialogue model training method and device
Through the pre-written text-form dialogue process configuration task-based dialogue model, the existing system's shortcomings in dialogue control and answer nature are solved, and a natural and smooth answer generation and efficient dialogue process are achieved.
Patent Information
- Application Number
- CN202411765014.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-04-18
AI Technical Summary
The existing task-based dialogue system has shortcomings in dialogue control and answering nature, resulting in high operating costs, stiff answers, and high dialogue delays, affecting user experience.
The pre-written text-form dialogue process is used as the model configuration information of the task-based dialogue model. Natural and smooth answers can be generated through a single large-scale call, reducing latency and improving dialogue efficiency.
It realizes natural and smooth answer generation, reduces operational costs and delays, improves user experience, and lowers the threshold for using task-based dialogue models.
Smart Images

Figure CN119849550A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a method and device for implementing task-based dialogues in the fields of deep learning, large models, natural language processing, and intelligent agents, as well as training task-based dialogue models. Background Art
[0002] At present, task-based dialogue has been widely used in different scenarios. Products such as intelligent customer service, intelligent outbound calls, and intelligent marketing are typical application scenarios of task-based dialogue. Summary of the Invention
[0003] The present disclosure provides a method and apparatus for implementing task-based dialogue and training a task-based dialogue model.
[0004] A method for implementing task-based dialogue, comprising:
[0005] Get questions to be answered;
[0006] A task-based dialogue model is used to generate an answer corresponding to the question, wherein the answer is generated by the task-based dialogue model according to corresponding model configuration information, wherein the model configuration information includes: a dialogue flow corresponding to the task-based dialogue model, wherein the dialogue flow is a dialogue flow written in text form.
[0007] A task-based dialogue model training method, comprising:
[0008] Obtaining training samples corresponding to the task-based dialogue model;
[0009] The task-based dialogue model is trained using the training samples. The task-based dialogue model is used to generate answers corresponding to questions to be answered based on corresponding model configuration information. The model configuration information includes: a dialogue flow corresponding to the task-based dialogue model, and the dialogue flow is a dialogue flow written in text form.
[0010] A task-based dialogue implementation device includes: a question acquisition module and an answer generation module;
[0011] The question acquisition module is used to obtain questions to be answered;
[0012] The answer generation module is used to generate an answer corresponding to the question using a task-based dialogue model. The answer is generated by the task-based dialogue model according to corresponding model configuration information. The model configuration information includes: a dialogue flow corresponding to the task-based dialogue model, and the dialogue flow is a dialogue flow written in text form.
[0013] A task-based dialogue model training device, comprising: a sample acquisition module and a model training module;
[0014] The sample acquisition module is used to obtain training samples corresponding to the task-based dialogue model;
[0015] The model training module is used to train the task-based dialogue model using the training samples. The task-based dialogue model is used to generate answers corresponding to questions to be answered based on corresponding model configuration information. The model configuration information includes: the dialogue flow corresponding to the task-based dialogue model, and the dialogue flow is a dialogue flow written in text form.
[0016] An electronic device, comprising:
[0017] at least one processor; and
[0018] a memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method as described above.
[0020] A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method as described above.
[0021] A computer program product comprises a computer program / instruction, which implements the above method when executed by a processor.
[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0024] Figure 1 A flowchart of an embodiment of a method for implementing a task-based dialogue according to the present disclosure;
[0025] Figure 2 A schematic diagram of the conversation flow generated for the present disclosure;
[0026] Figure 3 This is a schematic diagram of the overall implementation process of the task-based dialogue implementation method disclosed in the present invention;
[0027] Figure 4 This is a flowchart of an embodiment of the task-based dialogue model training method disclosed herein;
[0028] Figure 5 Schematic diagram of the structure of an embodiment 500 of the task-based dialogue implementation device of the present disclosure;
[0029] Figure 6 Schematic diagram of the structure of the task-based dialogue model training device embodiment 600 of the present disclosure;
[0030] Figure 7 FIG. 7 is a schematic block diagram of an electronic device 700 that can be used to implement an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0032] Furthermore, it should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " as used herein generally indicates that the associated objects are in an "or" relationship.
[0033] Figure 1 This is a flow chart of an embodiment of the task-based dialogue implementation method described in the present disclosure. Figure 1 As shown, the following specific implementation methods are included.
[0034] In step 101, questions to be answered are obtained.
[0035] In step 102, a task-based dialogue model is used to generate an answer corresponding to the question. The answer is generated by the task-based dialogue model according to the corresponding model configuration information. The model configuration information includes: a dialogue process (SOP, Session Operating Procedure) corresponding to the task-based dialogue model, and the dialogue process is a dialogue process written in text form.
[0036] Traditional task-based conversations are typically implemented based on the Natural Language Understanding (NLU) module, the Dialog Management (DM) module, and the Natural Language Generation (NLG) module. The NLU module uses a discriminant model to identify user intent. The DM module is the central control for the entire conversation, responsible for determining the strategy for the current conversation. The NLG module converts the DM module's processing results into natural language, typically using templates and enumeration. While this approach offers good conversation control capabilities, it incurs significant operational costs, and the generated responses are often stiff and unnatural, severely impacting the user's conversational experience.
[0037] Accordingly, a task-based dialogue implementation based on a large model has been proposed. This involves the large model generating responses to user-entered questions. However, this approach requires the use of an editable workflow to orchestrate the entire dialogue. Furthermore, a workflow includes multiple nodes, and most nodes require prompts to control the output of the large model. This makes implementation complex and unfriendly for those without relevant knowledge, requiring specialized training, which increases both human and time costs. Furthermore, dialogue latency is high, as a single round of dialogue typically requires processing by several large models before outputting the corresponding response, reducing dialogue efficiency.
[0038] By adopting the solution described in the above method embodiment, the dialogue process in text form can be pre-written, and the dialogue process can be used as the model configuration information corresponding to the task-based dialogue model. In this way, for the questions input by the user, the task-based dialogue model can directly generate the corresponding answers based on the model configuration information, that is, only one large model call is needed to complete a round of dialogue, thereby reducing latency and improving dialogue efficiency. Moreover, the generated answers are natural and smooth, thereby improving the user's dialogue experience. In addition, the dialogue process can be written in text form, which is very simple and convenient, thereby lowering the threshold for using the task-based dialogue model and saving manpower and time costs.
[0039] It should be noted that the solution described in the above method embodiment can be executed by an agent based on a large model. An agent is a computer program based on a large model that has planning and thinking capabilities, memory capabilities, and the ability to use tool functions, and can autonomously complete a given task.
[0040] The intelligent agent can receive input information, determine the target task based on the input information, determine the large model that needs to be called based on the target task, and then perform relevant processing by calling the large model to obtain output information.
[0041] Specifically in the scheme described in the embodiment of the method disclosed herein, the input information may be a question to be answered, the target task may be a task-based dialogue, the called large model may be a task-based dialogue model, and the output information may be an answer corresponding to the question generated using the task-based dialogue model.
[0042] For ease of distinction, the user who inputs questions into the task-based dialogue model is referred to as the first user. The task-based dialogue model in the solution described in this disclosure is a large model that can autonomously formulate responses. The large model refers to a large language model (LLM), a deep learning model trained using large amounts of text data that can generate natural language text or understand the meaning of text.
[0043] Accordingly, in the solution described in the present disclosure, the intelligent agent can receive a question input by a first user, generate an answer corresponding to the question input by the first user using a task-based dialogue model, and then return the answer to the first user. The answer can be generated by the task-based dialogue model based on corresponding model configuration information, which may include the dialogue flow corresponding to the task-based dialogue model.
[0044] In some embodiments of the present disclosure, the dialogue process may include: a dialogue process written for a predetermined dialogue scenario, and accordingly, the obtained questions may include: questions obtained in the dialogue scenario.
[0045] Among them, the predetermined dialogue scenarios may include government question and answer scenarios, e-commerce after-sales intelligent customer service scenarios, etc.
[0046] The dialogue flow can be a dialogue flow written by the second user. For example, in the scenario of intelligent after-sales customer service for an e-commerce company, the second user can be the owner of an online store on a shopping platform, or a writer commissioned by the online store owner. The task-based dialogue model can be used to implement the online store's intelligent after-sales customer service function. Accordingly, the second user can write and generate the corresponding dialogue flow.
[0047] Through the above processing, the written and generated dialogue process can be matched with the specific dialogue scenario, so that corresponding answers can be accurately generated for the questions input by the first user in the corresponding dialogue scenario.
[0048] The dialogue process may be written in a predetermined format. In some embodiments of the present disclosure, the dialogue process may include at least two steps written in accordance with predetermined step writing principles, each step may include a goal to be achieved by the step and requirements to be followed in achieving the goal.
[0049] The specific content included in the step-writing principles can be determined based on actual needs. For example, a dialog flow can be written with at least two steps, following the principle of having as few steps as possible and as clear boundaries between steps as possible. Clear boundaries between steps generally mean that there is minimal duplication of content between steps, such as clear objectives and no duplication.
[0050] Each step can include a goal, which can be described in one sentence, and should use as few words as possible. If the goal of a step takes a lot of words to describe, it means that the step is not abstracted well enough, and you can consider redesigning the step.
[0051] Each step also needs to include the requirements corresponding to the goal, that is, the requirements that must be followed to achieve the corresponding goal, such as what words to use in the reply, what content to reply first and what to reply next, which step to jump to based on different user inputs, etc. Each step can include multiple requirements.
[0052] Figure 2 A schematic diagram of the dialogue flow generated for the present disclosure. Figure 2 As shown, assuming that there are three steps in total, it can be seen that each step can include a goal, and each goal can correspond to one or more requirements.
[0053] For example, the goal in the first step can be: to determine the user's intention and respond to the user politely and concisely. The corresponding four requirements can be: Requirement 1, determine the user's intention and respond to the user politely and concisely; Requirement 2, the user expresses the intention of "urging the order to be delivered as soon as possible" or "complaining about slow food delivery", and enter the second step; Requirement 3, the user's intention is not related to "urging the order to be delivered as soon as possible" or "complaining about slow food delivery", and output the specified words "Dear customer, welcome to..., are you encountering any problems related to food delivery?"; Requirement 4, after using the specified words to ask, the user still does not express the intention of "urging the order to be delivered as soon as possible" or "complaining about slow food delivery", explain to the user that you are only responsible for food delivery-related business and cannot help the user with other issues.
[0054] Through the above processing, unified constraints on the content and form of the dialogue process can be achieved, thereby facilitating the second user to write the dialogue process and facilitating the task-based dialogue model to understand and use the dialogue process.
[0055] In addition to the dialogue process, in some embodiments of the present disclosure, the model configuration information may also include: at least one external tool corresponding to the task-based dialogue model. Accordingly, the answer corresponding to the question input by the first user may include: the answer directly generated by the task-based dialogue model in response to determining that no external tool is needed, and the answer generated by the task-based dialogue model in response to determining that an external tool is needed in combination with the acquired external data, where the external data is the call result data obtained by the task-based dialogue model by calling the external tool.
[0056] There is no limit on the specific number of external tools, and the specific external tools to be configured can also be determined based on actual needs.
[0057] In this way, for the task-based dialogue model, after obtaining the question input by the first user, a judgment can be made first. If it is determined that the corresponding answer can be generated without the use of external tools, then the answer can be generated directly. If it is determined that external tools are needed to generate the answer, it is necessary to automatically determine (i.e., plan) the external tool to be called, and the determined external tool can be called to obtain the call result data, and then the call result data can be determined as the obtained external data, and the answer can be generated in combination with the external data.
[0058] In other words, whether to call external tools and which external tools to call can be determined by the task-based dialogue model, which is very flexible and convenient.
[0059] In addition, in some embodiments of the present disclosure, in response to determining that the external tools include an external tool that requires material configuration, the model configuration information may further include: text material information configured for the external tool that requires material configuration.
[0060] For example, if an external tool is a document retrieval tool, then the corresponding text data information needs to be configured for the external tool.
[0061] By adopting the above processing method, we can make use of external data obtained from external tools to make up for the shortcomings of the task-based dialogue model's own capabilities and improve the accuracy of the generated answers.
[0062] Combined with the above introduction, Figure 3 This is a schematic diagram of the overall implementation process of the task-based dialogue implementation method described in this disclosure. Figure 3As shown, for a predetermined conversation scenario, the second user can pre-configure some simple operations, such as writing and generating the corresponding conversation process, configuring the corresponding external tools, and configuring the corresponding text information for the external tools that require material configuration. This operation cost is very low. For example, in a conversation scenario with e-commerce after-sales intelligent customer service, the second user can write and generate the corresponding conversation process, configure some external tools, such as a document retrieval tool, and configure some after-sales policy documents as the corresponding materials for the document retrieval tool. After that, the first user can engage in a conversation with the task-based conversation model. That is, the task-based conversation model can generate corresponding answers to the questions input by the first user and return the answers to the first user. The task-based conversation model can call external tools and obtain the returned call result data as external data, and then generate the answers based on the external data. The first user can be any user who needs to engage in a conversation with the task-based conversation model.
[0063] The task-based dialogue model can be pre-trained. The following describes a method for training the task-based dialogue model.
[0064] Figure 4 This is a flow chart of an embodiment of the task-based dialogue model training method described in this disclosure. Figure 4 As shown, the following specific implementation methods are included.
[0065] In step 401, a training sample corresponding to the task-based dialogue model is obtained.
[0066] In step 402, the task-based dialogue model is trained using the training samples. The task-based dialogue model is used to generate answers corresponding to questions to be answered based on corresponding model configuration information. The model configuration information includes: a dialogue flow corresponding to the task-based dialogue model, and the dialogue flow is a dialogue flow written in text form.
[0067] By adopting the scheme described in the above method embodiment, the task-based dialogue model can be trained based on the acquired training samples. After the training is completed, the dialogue process in text form can be pre-written, and the dialogue process can be used as the model configuration information corresponding to the task-based dialogue model. In this way, for the questions input by the user, the task-based dialogue model can directly generate the corresponding answers based on the model configuration information, that is, only one large model call is needed to complete a round of dialogue, thereby reducing the delay and improving the dialogue efficiency. Moreover, the generated answers are natural and smooth, thereby improving the user's dialogue experience. In addition, the dialogue process can be written in text form, which is very simple and convenient, thereby lowering the use threshold of the task-based dialogue model and saving manpower and time costs.
[0068] The model capability of the task-based dialogue model determines the effectiveness of the dialogue, so a sufficient number of training samples need to be constructed to train the task-based dialogue model.
[0069] In some embodiments of the present disclosure, the training samples may include: first-category training samples; each first-category training sample may include: a question, the dialogue flow of the dialogue scenario corresponding to the question, the answer corresponding to the question, and the intermediate thinking process information required by the task-based dialogue model to generate the answer.
[0070] There are no restrictions on how to obtain the various information in the training samples. For example, questions can be searched online, or questions can be obtained from historical conversations in other dialogue products, and other information can be manually annotated. The intermediate thinking process refers to the intermediate thinking process that the task-based dialogue model needs to conduct in order to generate the corresponding answer. Leveraging this intermediate thinking process information allows the task-based dialogue model to better learn how to generate the corresponding answer, thereby improving the model's training effectiveness.
[0071] In some embodiments of the present disclosure, the training samples may also include: second-category training samples, each of which may include: a question, a dialogue flow of the dialogue scenario corresponding to the question, the name and function description information of the external tool that can be used by the task-based dialogue model, the answer corresponding to the question generated in combination with external data, and the intermediate thinking process information required by the task-based dialogue model to generate the answer, and the external data is the call result data obtained by calling the external tool.
[0072] The specific content included in the functional description information of the external tool can be determined according to actual needs. For example, it can include information such as function introduction and usage instructions.
[0073] With the help of the second type of training samples, the task-based dialogue model can learn how to use external tools to generate answers to questions. In some cases, the task-based dialogue model itself may not be able to generate the answers. Accordingly, the external tools that need to be called can be determined, and the determined external tools can be called to obtain the call result data, and then the call result data can be determined as the obtained external data, and the answer can be generated in combination with the external data.
[0074] By adopting the above processing method, we can make use of external data obtained from external tools to make up for the shortcomings of the task-based dialogue model's own capabilities and improve the accuracy of the generated answers.
[0075] In addition, in some embodiments of the present disclosure, the dialogue process may include: at least two steps written according to predetermined step writing principles, and each step may include: the goal used to achieve the step, and the requirements that need to be followed to achieve the goal.
[0076] After constructing a sufficient number of training samples, the task-based dialogue model can be trained using the training samples. After the training is completed, the task-based dialogue model can be applied to actual task-based dialogues, such as generating an answer to a question input by the first user based on the corresponding model configuration information.
[0077] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present disclosure. In addition, for parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0078] The above is an introduction to the method embodiment. The following is a further explanation of the solution disclosed in the present disclosure through an apparatus embodiment.
[0079] Figure 5 FIG. 5 is a schematic diagram of the structure of the task-based dialogue implementation device embodiment 500 described in the present disclosure. Figure 5 As shown, it includes: a question acquisition module 501 and an answer generation module 502.
[0080] The question acquisition module 501 is used to acquire questions to be answered.
[0081] The answer generation module 502 is used to generate an answer corresponding to the question using a task-based dialogue model. The answer is generated by the task-based dialogue model according to the corresponding model configuration information. The model configuration information includes: a dialogue flow corresponding to the task-based dialogue model, and the dialogue flow is a dialogue flow written in text form.
[0082] By adopting the solution described in the above-mentioned device embodiment, the dialogue process in text form can be pre-written, and the dialogue process can be used as the model configuration information corresponding to the task-based dialogue model. In this way, for the questions input by the user, the task-based dialogue model can directly generate the corresponding answers based on the model configuration information, that is, only one large model call is needed to complete a round of dialogue, thereby reducing the delay and improving the dialogue efficiency. Moreover, the generated answers are natural and smooth, thereby improving the user's dialogue experience. In addition, the dialogue process can be written in text form, which is very simple and convenient, thereby lowering the use threshold of the task-based dialogue model and saving manpower and time costs.
[0083] In some embodiments of the present disclosure, the dialogue process may include: a dialogue process written for a predetermined dialogue scenario. Accordingly, the questions acquired by the question acquisition module 501 may be questions in the dialogue scenario.
[0084] The dialogue process may be written in a predetermined format. In some embodiments of the present disclosure, the dialogue process may include: at least two steps written in accordance with predetermined step writing principles, wherein each step may include: the goal to be achieved by the step, and the requirements to be followed to achieve the goal.
[0085] The specific content included in the step writing principles can be determined according to actual needs. For example, at least two steps can be written according to the principle that the dialogue process should include as few steps as possible and the boundaries between the steps should be as clear as possible.
[0086] In addition to the dialogue process, in some embodiments of the present disclosure, the model configuration information may also include: at least one external tool corresponding to the task-based dialogue model. Accordingly, the answer corresponding to the question input by the first user may include: the answer directly generated by the task-based dialogue model in response to determining that no external tool is needed, and the answer generated by the task-based dialogue model in response to determining that an external tool is needed in combination with the acquired external data, where the external data is the call result data obtained by the task-based dialogue model by calling the external tool.
[0087] In addition, in some embodiments of the present disclosure, in response to determining that the external tools include an external tool that requires material configuration, the model configuration information may further include: text material information configured for the external tool that requires material configuration.
[0088] Figure 6 Schematic diagram of the structure of the task-based dialogue model training device embodiment 600 described in the present disclosure. Figure 6 As shown, it includes: a sample acquisition module 601 and a model training module 602.
[0089] The sample acquisition module 601 is used to obtain training samples corresponding to the task-based dialogue model.
[0090] The model training module 602 is used to train the task-based dialogue model using training samples. The task-based dialogue model is used to generate answers corresponding to questions to be answered based on the corresponding model configuration information. The model configuration information includes: the dialogue process corresponding to the task-based dialogue model, and the dialogue process is a dialogue process written in text form.
[0091] By adopting the scheme described in the above-mentioned device embodiment, the task-based dialogue model can be trained according to the acquired training samples. After the training is completed, the dialogue process in text form can be pre-written, and the dialogue process can be used as the model configuration information corresponding to the task-based dialogue model. In this way, for the questions input by the user, the task-based dialogue model can directly generate the corresponding answers according to the model configuration information, that is, only one large model call is needed to complete a round of dialogue, thereby reducing the delay and improving the dialogue efficiency. Moreover, the generated answers are natural and smooth, thereby improving the user's dialogue experience. In addition, the dialogue process can be written in text form, which is very simple and convenient, thereby lowering the use threshold of the task-based dialogue model and saving manpower and time costs.
[0092] In some embodiments of the present disclosure, the training samples may include: first-category training samples; each first-category training sample may include: a question, the dialogue flow of the dialogue scenario corresponding to the question, the answer corresponding to the question, and the intermediate thinking process information required by the task-based dialogue model to generate the answer.
[0093] In some embodiments of the present disclosure, the training samples may also include: second-category training samples, each of which may include: a question, a dialogue flow of the dialogue scenario corresponding to the question, the name and function description information of the external tool that can be used by the task-based dialogue model, the answer corresponding to the question generated in combination with external data, and the intermediate thinking process information required by the task-based dialogue model to generate the answer, and the external data is the call result data obtained by calling the external tool.
[0094] In addition, in some embodiments of the present disclosure, the dialogue process may include: at least two steps written according to predetermined step writing principles, and each step may include: the goal used to achieve the step, and the requirements that need to be followed to achieve the goal.
[0095] After constructing a sufficient number of training samples, the model training module 602 can use the training samples to train the task-based dialogue model. After the training is completed, the task-based dialogue model can be applied to actual task-based dialogues, such as generating answers to questions to be answered based on the corresponding model configuration information.
[0096] Figure 5 and Figure 6 The specific working process of the device embodiment shown can refer to the relevant description in the aforementioned method embodiment and will not be repeated here.
[0097] The solutions described in this disclosure can be applied to the field of artificial intelligence, particularly in the areas of deep learning, large models, natural language processing, and intelligent agents. Artificial intelligence is the study of how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It involves both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing. Artificial intelligence software technologies primarily include computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graphs.
[0098] The questions and answers in the embodiments of this disclosure are not targeted at any specific user and do not reflect the personal information of any specific user. Furthermore, the execution entity of the methods described in this disclosure may obtain the questions through various public, legal, and compliant means, such as obtaining the information from the user with the user's authorization. The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solutions of this disclosure comply with relevant laws and regulations and do not violate public order and good morals.
[0099] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0100] Figure 7 A schematic block diagram of an electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0101] like Figure 7As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0102] Multiple components in the electronic device 700 are connected to the I / O interface 705, including an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0103] The computing unit 701 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI, Artificial Intelligence) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSP, Digital Signal Processing), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as the methods described in the present disclosure. For example, in some embodiments, the methods described in the present disclosure can be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the methods described in the present disclosure can be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to execute the method described in the present disclosure in any other appropriate manner (for example, by means of firmware).
[0104] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard parts (ASSPs), system on chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0105] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0106] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0107] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a cathode ray tube (CRT) or a liquid crystal display (LCD) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0108] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with embodiments of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0109] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0110] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.
[0111] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A method for implementing a task-based dialogue, comprising: Get questions to be answered; A task-based dialogue model is used to generate an answer corresponding to the question, wherein the answer is generated by the task-based dialogue model according to corresponding model configuration information, wherein the model configuration information includes: a dialogue flow corresponding to the task-based dialogue model, wherein the dialogue flow is a dialogue flow written in text form.
2. The method according to claim 1, wherein: The dialogue process includes: a dialogue process written for a predetermined dialogue scenario; The questions include: questions in the dialogue scenario.
3. The method according to claim 1, wherein: The dialogue process includes: at least two steps written according to a predetermined step writing principle; The steps include: the objectives to be achieved by the steps, and the requirements to be followed in achieving the objectives.
4. The method according to any one of claims 1 to 3, wherein: The model configuration information also includes: at least one external tool corresponding to the task-based dialogue model; The answer includes: an answer directly generated by the task-based dialogue model in response to determining that the external tool is not needed, and an answer generated by the task-based dialogue model in response to determining that the external tool is needed in combination with external data obtained, wherein the external data is the call result data obtained by the task-based dialogue model by calling the external tool.
5. The method according to claim 4, wherein: In response to determining that the external tools include an external tool that requires material configuration, the model configuration information also includes: text material information configured for the external tool that requires material configuration.
6. A task-based dialogue model training method, comprising: Obtaining training samples corresponding to the task-based dialogue model; The task-based dialogue model is trained using the training samples, and the task-based dialogue model is used to generate answers corresponding to questions to be answered according to corresponding model configuration information, wherein the model configuration information includes: a dialogue flow corresponding to the task-based dialogue model, and the dialogue flow is a dialogue flow written in text form.
7. The method according to claim 6, wherein: The training samples include: first type of training samples; The first type of training samples includes: questions, the dialogue flow of the dialogue scene corresponding to the questions, the answers corresponding to the questions, and the intermediate thinking process information required by the task-based dialogue model to generate the answers.
8. The method according to claim 7, wherein: The training samples also include: second type of training samples; The second type of training samples includes: questions, the dialogue flow of the dialogue scenario corresponding to the questions, the names and functional description information of external tools that can be used by the task-based dialogue model, the answers corresponding to the questions generated in combination with external data, and the intermediate thinking process information, and the external data is the call result data obtained by calling the external tool.
9. The method according to any one of claims 6 to 8, wherein: The dialogue process includes: at least two steps written according to a predetermined step writing principle; The steps include: the objectives to be achieved by the steps, and the requirements to be followed in achieving the objectives.
10. A task-based dialogue implementation device, comprising: Question acquisition module and answer generation module; The question acquisition module is used to acquire questions to be answered; The answer generation module is used to generate an answer corresponding to the question using a task-based dialogue model, wherein the answer is generated by the task-based dialogue model according to corresponding model configuration information, wherein the model configuration information includes: a dialogue flow corresponding to the task-based dialogue model, wherein the dialogue flow is a dialogue flow written in text form.
11. The device according to claim 10, wherein: The dialogue process includes: a dialogue process written for a predetermined dialogue scenario; The questions include: questions in the dialogue scenario.
12. The device according to claim 10, wherein: The dialogue process includes: at least two steps written according to a predetermined step writing principle; The steps include: the objectives to be achieved by the steps, and the requirements to be followed in achieving the objectives.
13. The device according to any one of claims 10 to 12, wherein: The model configuration information also includes: at least one external tool corresponding to the task-based dialogue model; The answer includes: an answer directly generated by the task-based dialogue model in response to determining that the external tool is not needed, and an answer generated by the task-based dialogue model in response to determining that the external tool is needed in combination with external data obtained, wherein the external data is the call result data obtained by the task-based dialogue model by calling the external tool.
14. The device according to claim 13, wherein: In response to determining that the external tools include an external tool that requires material configuration, the model configuration information also includes: text material information configured for the external tool that requires material configuration.
15. A task-based dialogue model training device, comprising: Sample acquisition module and model training module; The sample acquisition module is used to obtain training samples corresponding to the task-based dialogue model; The model training module is used to train the task-based dialogue model using the training samples. The task-based dialogue model is used to generate answers corresponding to questions to be answered according to corresponding model configuration information. The model configuration information includes: a dialogue flow corresponding to the task-based dialogue model, and the dialogue flow is a dialogue flow written in text form.
16. The device according to claim 15, wherein: The training samples include: first type of training samples; The first type of training samples includes: questions, the dialogue flow of the dialogue scene corresponding to the questions, the answers corresponding to the questions, and the intermediate thinking process information required by the task-based dialogue model to generate the answers.
17. The device according to claim 16, wherein: The training samples also include: second type of training samples; The second type of training samples includes: questions, the dialogue flow of the dialogue scenario corresponding to the questions, the names and functional description information of external tools that can be used by the task-based dialogue model, the answers corresponding to the questions generated in combination with external data, and the intermediate thinking process information, and the external data is the call result data obtained by calling the external tool.
18. The device according to any one of claims 15 to 17, wherein: The dialogue process includes: at least two steps written according to a predetermined step writing principle; The steps include: the objectives to be achieved by the steps, and the requirements to be followed in achieving the objectives.
19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.
20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1 to 9.
21. A computer program product, comprising a computer program / instruction, wherein when the computer program / instruction is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Cited By
Task processing model training method, role playing model training method and task processing method
CN120724109A