A method, device, equipment and product for generating multi-turn dialogue sample data

By combining large language models and task-oriented dialogue models, high-quality multi-turn dialogue samples are generated, which solves the problems of low data collection efficiency and poor data quality in existing technologies, and improves the accuracy and sample richness of dialogue model training.

CN120541528BActive Publication Date: 2025-12-05HANGZHOU QIUGUOJIHUA TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511045530.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-29
Publication Date
2025-12-05
Estimated Expiration
2045-07-29

AI Technical Summary

Technical Problem

Existing technologies suffer from low efficiency in collecting historical dialogue data and difficulty in ensuring sample quality when training dialogue models, resulting in low efficiency and poor quality in generating multi-turn dialogue sample data.

Method used

The system generates system response information by parsing dialogue prompts using a large language model, and combines it with a pre-trained task-oriented dialogue model. It uses system slots and model slots to determine dialogue samples, constructs seed data in multiple domain combinations, and generates high-quality dialogue samples through dialogue prompts.

Benefits of technology

It achieves efficient generation of high-quality multi-turn dialogue samples, improves the accuracy and richness of dialogue model training, and enhances the efficiency of model training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120541528B_ABST
    Figure CN120541528B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, and particularly provides a multi-round dialogue sample data generation method, device, equipment and product. The method can comprise the following steps: inputting dialogue prompt information into a large language model to generate system reply information conforming to a dialogue target in the dialogue prompt information; wherein the dialogue prompt information further comprises seed dialogue content; the system reply information comprises a system action, system reply content and a system slot in the system reply content; inputting the seed dialogue content into a pre-trained task-oriented dialogue model to obtain a model slot in output content; determining a dialogue sample based on the system slot and the model slot; and the dialogue sample is used for training a dialogue model. The application can automatically generate high-quality dialogue samples.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a multi-turn dialogue sample data generation method, device, equipment and product. BACKGROUND

[0002] With the continuous development of artificial intelligence technology, how to accurately dialogue with users has become a common concern in various industries. Currently, a trained dialogue model is usually deployed to realize multi-turn dialogue with users.

[0003] Currently, when training a dialogue model, historical dialogue data in various scenarios is usually collected as a sample data set. However, there are many scenarios involved in actual work, and the collection efficiency of historical dialogue data is low and cannot guarantee sample quality.

[0004] Therefore, how to provide a technical solution of an efficient multi-turn dialogue sample data generation method has become a technical problem to be solved. SUMMARY

[0005] Some embodiments of the present application aim to provide a multi-turn dialogue sample data generation method, device, equipment and product. The technical solution of the embodiments of the present application can realize efficient and high-quality generation of multi-turn dialogue samples, provide rich sample data for training a dialogue model, and improve model training accuracy.

[0006] In a first aspect, some embodiments of the present application provide a multi-turn dialogue sample data generation method, comprising: inputting dialogue prompt information into a large language model to generate system reply information conforming to a dialogue target in the dialogue prompt information; wherein the dialogue prompt information further comprises seed dialogue content; the system reply information comprises a system action, system reply content and a system slot in the system reply content; inputting the seed dialogue content into a pre-trained task-oriented dialogue model to obtain a model slot in the output content; determining a dialogue sample based on the system slot and the model slot; wherein the dialogue sample is used to train a dialogue model.

[0007] Some embodiments of the present application first generate system reply information by analyzing dialogue prompt information through a large language model; then process seed dialogue content using a task-oriented dialogue model to obtain a model slot; and determine the output dialogue sample according to the model slot and the slot in the system reply information. The embodiments of the present application can automatically generate high-quality dialogue samples through a model, improve the richness of dialogue samples, provide high-quality training sets for dialogue model training, and improve the training accuracy of the model.

[0008] In some embodiments, the determining the dialogue sample based on the system slot and the model slot comprises: if the system reply content does not contain the model slot, filling the model slot into the system reply information to obtain the dialogue sample in a first form; or if the system slot and the model slot are of the same type but have different values, or the system slot and the model slot are of different types but have the same value, taking the system reply information as the dialogue sample in a second form.

[0009] Some embodiments of the present application determine the generated dialogue sample by whether the model slot is contained in the system reply content and the relationship between the system slot and the model slot, thereby improving the accuracy and quality of the dialogue sample.

[0010] In some embodiments, after the determining the dialogue sample based on the system slot and the model slot, the method further comprises: counting the slot detection in the dialogue sample in the first form and the second form to obtain a counting result; and improving the dialogue prompt information and the parsing rule in the large language model based on the counting result, so as to obtain a new round of the dialogue sample.

[0011] Some embodiments of the present application improve the dialogue prompt information and the parsing rule of the model by counting the generation of the dialogue sample, so as to generate a high-quality dialogue sample.

[0012] In some embodiments, the method further comprises: generating diversified dialogue samples by modifying the content of the dialogue prompt information.

[0013] Some embodiments of the present application can efficiently generate diversified dialogue samples in various scenarios by modifying the dialogue prompt information, and the richness is high.

[0014] In some embodiments, before the inputting the dialogue prompt information into the large language model, the method further comprises: constructing seed data corresponding to different domain combinations in multiple domains; wherein the seed data comprises slot values of multiple slot types; rewriting the description in the seed data and replacing the slot values according to a replacement rule to obtain new seed data; generating random dialogue content combinations and the dialogue target based on the new seed data; and selecting the seed dialogue content from the random dialogue content combinations according to a seed selection rule.

[0015] Some embodiments of the present application provide reliable data support for subsequent dialogue sample generation by constructing high-quality seed dialogue content.

[0016] In some embodiments, the method further comprises: based on semantic coverage and semantic redundancy of the dialogue sample, revising the replacement rule and / or the seed selection rule to obtain diversified seed dialogue content.

[0017] Some embodiments of the present application can generate more diverse seed dialogue content by updating the replacement rule and the seed selection rule, and then subsequently obtain rich and high-quality dialogue samples.

[0018] In some embodiments, the seed selection rule is slot coincidence degree; and the selecting the seed dialogue content from the combination of random dialogue content according to the seed selection rule comprises: counting the slot coincidence degree in the random dialogue content; and selecting dialogue content with the highest slot coincidence degree in the combination of random dialogue content as the seed dialogue content.

[0019] Some embodiments of the present application can achieve high-quality selection of seed dialogue content.

[0020] In a second aspect, some embodiments of the present application provide a device for generating multi-round dialogue sample data, comprising: a first generation module configured to input dialogue prompt information into a large language model to generate system reply information conforming to a dialogue target in the dialogue prompt information; wherein the dialogue prompt information further comprises seed dialogue content; and the system reply information comprises a system action, system reply content, and a system slot in the system reply content; a model processing module configured to input the seed dialogue content into a pre-trained task-oriented dialogue model to obtain a model slot in output content; and a dialogue sample generation module configured to determine a dialogue sample based on the system slot and the model slot; wherein the dialogue sample is used to train a dialogue model.

[0021] In a third aspect, some embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, can implement the method of any one of the embodiments of the first aspect.

[0022] In a fourth aspect, some embodiments of the present application provide an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the program, can implement the method of any one of the embodiments of the first aspect.

[0023] In a fifth aspect, some embodiments of the present application provide a computer program product comprising a computer program, wherein the computer program, when executed by a processor, can implement the method of any one of the embodiments of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of some embodiments of the present application, the following will briefly introduce the drawings needed to be used in some embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor.

[0025] Figure 1 System diagram for generating multi-round dialogue sample data provided by some embodiments of the present application;

[0026] Figure 2 One of the method flowcharts for generating multi-round dialogue sample data provided by some embodiments of the present application;

[0027] Figure 3 The second method flowchart for generating multi-round dialogue sample data provided by some embodiments of the present application;

[0028] Figure 4 Device composition block diagram for generating multi-round dialogue sample data provided by some embodiments of the present application;

[0029] Figure 5 Electronic device schematic diagram provided by some embodiments of the present application. DETAILED DESCRIPTION

[0030] The technical solutions of some embodiments of the present application will be described below in conjunction with the drawings in some embodiments of the present application.

[0031] It should be noted that similar reference numerals and letters represent similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. Meanwhile, in the description of the present application, the terms “first”, “second”, etc. are only used for differentiation in description, and cannot be understood as indicating or implying relative importance.

[0032] Large language model (LLM) refers to a deep learning model trained using a large amount of text data, so that the model can generate natural language text or understand the meaning of language text. These models can provide in-depth knowledge and language production on various topics by training on a large dataset. The core idea is to learn the patterns and structures of natural language through large-scale unsupervised training, to a certain extent, to simulate the language cognition and generation process of human beings. In order to solve the problem of low efficiency and poor quality in constructing dialogue samples in the prior art, the large language model trained by the embodiments of the present application is used to automatically generate dialogue samples in different fields, so as to provide rich corpus content for training dialogue models.

[0033] The following will be described in conjunction with the accompanying drawings Figure 1 Exemplary overall structure of a system for generating multi-turn dialogue sample data provided by some embodiments of the present application is described.

[0034] As Figure 1 shown, some embodiments of the present application provide a system diagram for generating multi-turn dialogue sample data, which can include a terminal 100 and a server 200. Wherein the terminal 100 can send the application field of the determined dialogue sample, and the slot (i.e. slot) category in the application field, etc. to the server 200; the server 200 can construct seed dialogue content and dialogue target based on the application field, slot category, etc. Then, input the seed dialogue content and dialogue target into the pre-trained large language model, and output system reply information. At the same time, use the pre-trained task-oriented dialogue model to process the seed dialogue content, and output the corresponding model slot. Finally, based on the relationship between the system slot in the system reply information and the model slot, determine the output dialogue sample.

[0035] In some embodiments of the present application, the terminal 100 can be a mobile terminal, or a non-portable computer terminal, which is not specifically limited in the embodiments of the present application. It can be understood that the pre-trained large language model and the task-oriented dialogue model are pre-deployed in the server 200. The training process is the same as the conventional training method, which is not described here.

[0036] The following will be described in conjunction with the accompanying drawings Figure 2 Exemplary implementation process of generating multi-turn dialogue sample data by the server 200 provided by some embodiments of the present application is described.

[0037] Please refer to the accompanying drawings Figure 2 , Figure 2 A flowchart of a method for generating multi-turn dialogue sample data provided by some embodiments of the present application. The method for generating multi-turn dialogue sample data can include:

[0038] S210, input the dialogue prompt information into the large language model to generate system reply information conforming to the dialogue target in the dialogue prompt information; wherein the dialogue prompt information further includes: seed dialogue content; the system reply information includes: system action, system reply content and system slot in the system reply content. Wherein the large language model is LLM model.

[0039] For example, in the specific embodiments of the present application, the pre-constructed seed dialogue content and dialogue goal (as a specific example of dialogue goal) are input into the LLM model as prompt words (as a specific example of dialogue prompt information) to generate the first round of dialogue (as a specific example of system reply information) that meets the goal.

[0040] For example, the LLM model can select one with thinking chain reasoning capability, such as qwen3. By using qwen3, the dialogue that meets the goal is generated from the seed dialogue content and the goal. The first round of user speech content and the corresponding slot are generated; then the generated result of the LLM is parsed to check the format. If the generated result contains multiple rounds of dialogue, only the current round of generated result is taken (with the end sentence in the prompt word as the segmentation point). In order to balance the generation quality and efficiency, the thinking chain is removed when generating the first round; if the generated format does not meet the requirements, the thinking chain is used for generation, that is, the current round of generated result and the slot in the current round of generated result are spliced into the prompt word and input into the LLM with thinking chain to generate the system action, the system reply content and the corresponding system slot (as a specific example of system slot). In order to balance the generation quality and efficiency, the thinking chain is removed when generating, and if the generated format does not meet the requirements, the thinking chain is used for generation.

[0041] That is, when generating dialogue, for each dialogue interaction, the user speech, the slot in the user speech, the system action, the system speech, and the slot in the system speech are generated in each round; the user speaks first and the system speaks later in each round of dialogue until the dialogue ends (i.e., "goodbye" appears in the system slot) or the maximum number of rounds (such as 20 rounds) is reached. That is, the LLM model can generate multiple rounds of dialogue based on the input content, and the content related to the prompt word needs to be taken as the first round of dialogue.

[0042] In some embodiments of the present application, before performing S210, the method for generating multi-round dialogue sample data further comprises:

[0043] S201, constructing seed data corresponding to different domain combinations in multiple domains; wherein the seed data includes slot values of multiple slot types.

[0044] For example, in the specific embodiments of the present application, the slot categories in the multi-domain schema and multiple object examples of each slot are first determined. For example, the movie schema contains slot categories such as movie name, theme, director, etc. The slot value (i.e., slot value) is the content contained under each slot category, such as the movie name in the following example.

[0045] For example, a certain movie schema example:

[0046] Name: Watch movie

[0047] Description: Provide movie finding and watching service

[0048] Slots: movie name, movie theme, director, actor, rating

[0049] Operations:

[0050] Find movie, required slots: one or more of movie name, movie theme, director, actor

[0051] Play movie, required slots: movie name

[0052] Pause, required slots: none

[0053] Continue, required slots: none

[0054] Fast forward, required slots: time

[0055] Rewind, required slots: time

[0056] Skip to, required slots: time

[0057] User actions: provide slots, request slots, confirm, make suggestions

[0058] System actions: make requests, deny, confirm, request slots, request other.

[0059] Based on various combinations of schema structures and relationships in multiple domains, manually or automatically construct samples, each combination as a sample (i.e., seed data); each sample includes dialogues in different domain combinations (e.g., a sample between movie and music, which is a specific example of seed data). For example, the following example of movie dialogue is a piece of seed data:

[0060] goal: movie, movie theme: Romance movie

[0061] Multi-turn dialogue:

[0062] User: Can you find me a Romance movie to watch?

[0063] Action = provide slots, movie theme = Romance, operation = find movie

[0064] System: How about After? It is one of the 5 movies that I have found, and has an average rating of 5.8.

[0065] Action = suggest, movie name = After, rating = 5.80

[0066] Search result = found information of 5 movies

[0067] User: What about the other movies?

[0068] Action = request other

[0069] System: I also found Pillow Talk that has a rating of 7.5.

[0070] Action = suggest, movie name = Pillow Talk, rating = 7.50

[0071] User: Sure.

[0072] Action = confirm.

[0073] S202, rephrase the description in the seed data and replace the slot value according to the replacement rule to obtain new seed data.

[0074] For example, in the specific embodiments of the present application, a small amount of samples with the above structure are used as seed data, and the slot value is randomly replaced (as one specific example of the replacement rule) based on the schema structure relationship. For example, the movie name is replaced with SpiderMan, and the rephrased processing (i.e., rewriting a sentence in a different way) forms a new sample (as one specific example of new seed data).

[0075] S203, generate a random dialogue content combination and the dialogue target based on the new seed data.

[0076] For example, in the specific embodiments of the present application, a random number and a random combination of combined schemas (as one specific example of a random dialogue content combination) are generated according to the above determined schema in a single field, and a plurality of slots are randomly selected from the combined schema to generate goals corresponding to the slots. For example, the goal in the example is genre = Romance movie.

[0077] S204, select the seed dialogue content from the random dialogue content combination according to the seed selection rule.

[0078] In some embodiments of the present application, the seed selection rule is slot coincidence degree, and S204 can include: counting slot coincidence degrees in the random dialogue content; and combining the dialogue content with the highest slot coincidence degree in the random dialogue content as the seed dialogue content.

[0079] For example, in specific embodiments of the present application, a dialogue example with a high slot coincidence degree is selected from the combined schema of new dialogues as the seed dialogue content. That is, the selected seed dialogue content all contains the same slot. Or, a dialogue example with a slot coincidence degree higher than a set threshold is selected, and embodiments of the present application are not limited thereto.

[0080] S220, inputting the seed dialogue content into a pre-trained task-oriented dialogue model to obtain model slots in output content.

[0081] For example, in specific embodiments of the present application, in order to reduce errors (such as slots not contained in system reply content) in LLM model generation, a TOD small model (as a specific example of a task-oriented dialogue model) is trained using existing dialogue data, the TOD small model receives the above constructed seed dialogue content, generates slot information (as a specific example of model slots) and system replies (as a specific example of output content) output by the small model.

[0082] S230, determining a dialogue sample based on the system slot and the model slot, wherein the dialogue sample is used to train a dialogue model.

[0083] For example, in specific embodiments of the present application, the final dialogue sample is generated through the system slot corresponding to the LLM model and the slot information output by the above small model.

[0084] In some embodiments of the present application, S230 can include: if the system reply content does not contain the model slot, filling the model slot into the system reply information to obtain the dialogue sample in a first form; if the system slot and the model slot are of the same type and have different values, or the system slot and the model slot are of different types and have the same value, taking the system reply information as the dialogue sample in a second form.

[0085] For example, in the specific embodiments of the present application, when the slot information generated by the small model is not contained in the system reply content generated by the LLM, the slot information is supplemented into the system reply information to obtain the dialogue sample in this case. When the slots of the two conflict (for example, the two have the same slot type but different slot values, or the same slot value corresponds to different slot types), the system reply information output by the LLM model is retained as the dialogue sample.

[0086] In addition, as the amount of data continues to increase, the TOD small model can also be retrained, and when the amount of data reaches the set requirement, the output content of the small model can be adjusted in the future.

[0087] In some embodiments of the present application, in the process of generating dialogue samples, the method for generating multi-turn dialogue sample data can further include: counting the slot detection conditions in the dialogue samples of the first form and the second form to obtain a statistical result; and improving the dialogue prompt information and the parsing rules inside the large language model through the statistical result, so as to obtain a new round of dialogue samples.

[0088] For example, in the specific embodiments of the present application, the above two ways are proposed when determining the dialogue sample, one is to merge the slot information into the system reply information, and the other is to retain the result output by the LLM model. By counting the specific conditions of the two ways, the errors in generating slots, including false detection and missed detection, can be checked and counted, and the prompt words and the parsing rules inside the model are improved according to the statistical result to generate a new round of dialogue samples, thereby improving the accuracy of dialogue sample generation.

[0089] In some embodiments of the present application, the method for generating multi-turn dialogue sample data can further include: generating diversified dialogue samples by modifying the content of the dialogue prompt information.

[0090] For example, in the specific embodiments of the present application, in order to increase the richness of the generated dialogue samples, different roles can be assigned to the prompt words, and a randomly generated text context can be used as part of the prompt words (i.e., modifying the content of the prompt words), so that the LLM model generates rich samples, and finally generates dialogue samples with high richness.

[0091] In some embodiments of the present application, the method for generating multi-turn dialogue sample data can further include: based on the semantic coverage and semantic redundancy of the dialogue sample, changing the replacement rules and / or the seed selection rules to obtain diversified seed dialogue content.

[0092] For example, in the specific embodiments of the present application, the generated dialogue samples are visualized to view their semantic coverage and semantic redundancy, at least one of the seed selection rules and the slot replacement rules in the seed dialogue content construction stage is improved, the seed dialogue content is enriched, and then dialogue samples with higher richness are obtained. For example, the slot replacement rule is modified from random replacement to fixed replacement.

[0093] The specific process of generating multi-turn dialogue sample data provided by some embodiments of the present application will be described below with reference to the accompanying Figure 3 The specific process of generating multi-turn dialogue sample data provided by some embodiments of the present application will be described below with reference to the accompanying

[0094] The specific process of generating multi-turn dialogue sample data provided by some embodiments of the present application will be described below with reference to the accompanying Figure 3 , Figure 3 The specific process of generating multi-turn dialogue sample data provided by some embodiments of the present application will be described below with reference to the accompanying

[0095] The specific process of generating multi-turn dialogue sample data provided by some embodiments of the present application will be described below with reference to the accompanying

[0096] S310, constructing seed data corresponding to different domain combinations in multiple domains.

[0097] S320, rewriting the description in the seed data and randomly replacing the slot value to obtain new seed data.

[0098] S330, generating random dialogue content combinations and dialogue targets based on the new seed data.

[0099] S340, selecting seed dialogue content from the random dialogue content combinations according to the seed selection rules.

[0100] The seed selection rule is the highest slot coincidence degree.

[0101] S350, inputting the seed dialogue content and the dialogue target into the LLM model to generate system reply information conforming to the dialogue target.

[0102] S360, inputting the seed dialogue content into the pre-trained task-oriented dialogue model to obtain model slots in the output content.

[0103] S370, determining the finally generated dialogue sample based on the system slots and the model slots in the system reply information.

[0104] It can be understood that the specific implementation process of S310-S370 can refer to the method embodiments provided above, and the detailed description is appropriately omitted here to avoid repetition.

[0105] The method for generating multi-turn dialogue data using LLM proposed by some embodiments of the present application iterates quickly from scratch, constructs high-quality diversified multi-turn dialogue samples, and improves the accuracy of dialogue model training.

[0106] Reference is made to Figure 4 , Figure 4 A constituent block diagram of an apparatus for multi-turn dialogue sample data generation provided by some embodiments of the present application is shown. It should be understood that the apparatus for multi-turn dialogue sample data generation corresponds to the method embodiments described above, and can perform each step involved in the method embodiments described above. The specific functions of the apparatus for multi-turn dialogue sample data generation can be referred to the description above, and detailed description is appropriately omitted here to avoid repetition.

[0107] Figure 4 The apparatus for multi-turn dialogue sample data generation includes at least one software function module that can be stored in the memory in the form of software or firmware or solidified in the apparatus for multi-turn dialogue sample data generation. The apparatus for multi-turn dialogue sample data generation includes: a first generation module 410 configured to input dialogue prompt information into a large language model to generate system reply information that meets a dialogue target in the dialogue prompt information; wherein the dialogue prompt information further includes seed dialogue content; and the system reply information includes a system action, system reply content, and a system slot in the system reply content; a model processing module 420 configured to input the seed dialogue content into a pre-trained task-oriented dialogue model to obtain a model slot in output content; and a dialogue sample generation module 430 configured to determine a dialogue sample based on the system slot and the model slot; wherein the dialogue sample is used to train a dialogue model.

[0108] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the apparatus described above can refer to the corresponding process in the foregoing method, and will not be described in more detail here.

[0109] Some embodiments of the present application also provide a computer readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the operations of the method corresponding to any of the embodiments of the above method provided by the above embodiments.

[0110] Some embodiments of the present application also provide a computer program product, which includes a computer program, wherein the computer program is executed by a processor to implement the operations of the method corresponding to any of the embodiments of the above method provided by the above embodiments.

[0111] As Figure 5As shown, some embodiments of the present application provide an electronic device 500, comprising a memory 510, a processor 520, and a computer program stored in the memory 510 and capable of running on the processor 520, wherein the processor 520 reads the program from the memory 510 through a bus 530 and implements the method of any of the above embodiments when executing the program.

[0112] The processor 520 can process digital signals and can include various computing structures. For example, a complex instruction set computer structure, a reduced instruction set computer structure, or a structure implementing a combination of multiple instruction sets. In some examples, the processor 520 can be a microprocessor.

[0113] The memory 510 can be used to store instructions executed by the processor 520 or data related to the execution of the instructions. These instructions and / or data can include code for implementing some or all of the functions of one or more modules described in the embodiments of the present application. The processor 520 of the embodiments of the present disclosure can be used to execute the instructions in the memory 510 to implement the above-described method. The memory 510 includes a dynamic random access memory, a static random access memory, a flash memory, an optical memory, or other memories well known to those skilled in the art.

[0114] The above only describes the embodiments of the present application and is not used to limit the protection scope of the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application. It should be noted that similar reference numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0115] The above only describes the embodiments of the present application and is not used to limit the protection scope of the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application. It should be noted that similar reference numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0116] It is to be noted that, as used in this specification and the appended claims, the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. Thus, for example, reference to "a component" can include a combination of two or more components. Additionally, the terms "comprise," "comprises," and "comprising," or any variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements is not necessarily limited to those elements, but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Furthermore, unless otherwise indicated herein, the terms "first," "second," "third," etc., are used herein merely as labels, and are not intended to impose ordinal import.

Claims

1. A method for generating multi-turn dialogue sample data, characterized in that, include: The dialogue prompts are input into a large language model to generate system response information that matches the dialogue objective in the dialogue prompts. The dialogue prompts include seed dialogue content. The system response information includes system actions, system response content, and system slots within the system response content. The large language model has thought chain reasoning capabilities. When generating the first round of system response information, a large language model without thought chains is used. If the format of the first round of system response information does not meet the requirements, a large language model with thought chains is used to process the updated dialogue prompts to generate the final system response information. The updated dialogue prompts are obtained by concatenating the dialogue prompts with the system response content and system slots from the first round of system response information. The seed dialogue content is input into a pre-trained task-oriented dialogue model to obtain the model slots in the output content. Based on the system slots and the model slots, dialogue samples are determined; wherein, the dialogue samples are used to train the dialogue model. The step of determining the dialogue sample based on the system slot and the model slot includes: if the system response content does not contain the model slot, then filling the model slot into the system response information to obtain the dialogue sample of the first form; if the system slot and the model slot are of the same type but have different values, or if the system slot and the model slot are of different types but have the same values, then using the system response information as the dialogue sample of the second form.

2. The method as described in claim 1, characterized in that, After determining the dialogue samples based on the system slots and the model slots, the method further includes: The slot detection results were obtained by statistically analyzing the dialogue samples of the first and second forms. Based on the statistical results, the dialogue prompts and the parsing rules within the large language model are improved to facilitate the acquisition of a new round of dialogue samples.

3. The method according to any one of claims 1-2, characterized in that, The method further includes generating diverse dialogue samples by modifying the content of the dialogue prompt information.

4. The method according to any one of claims 1-2, characterized in that, Before inputting the dialogue prompt information into the large language model, the method further includes: Seed data is constructed corresponding to different combinations of multiple domains; wherein, the seed data includes slot values ​​of multiple slot types; The description in the seed data is rewritten, and the slot value is replaced according to the replacement rule to obtain new seed data; Based on the new seed data, generate a random combination of dialogue content and the dialogue target; Seed dialogue content is selected from the random dialogue content combination according to the seed selection rules.

5. The method as described in claim 4, characterized in that, The method further includes: Based on the semantic coverage and semantic repetition of the dialogue samples, the replacement rules and / or the seed selection rules are modified to obtain diverse seed dialogue content.

6. The method as described in claim 4, characterized in that, The seed selection rule is slot overlap; the step of selecting the seed dialogue content from the random dialogue content combination according to the seed selection rule includes: Calculate the overlap of slots in the random dialogue content; The dialogue content with the highest slot overlap in the random dialogue content combination is used as the seed dialogue content.

7. An apparatus for generating multi-turn dialogue sample data, characterized in that, The apparatus is used to perform the method as described in claim 1, comprising: The first generation module is used to input dialogue prompt information into a large language model and generate system response information that conforms to the dialogue objective in the dialogue prompt information; wherein, the dialogue prompt information further includes: seed dialogue content; the system response information includes: system action, system response content, and system slots in the system response content; The model processing module is used to input the seed dialogue content into a pre-trained task-oriented dialogue model to obtain the model slots in the output content. A dialogue sample generation module is used to determine dialogue samples based on the system slots and the model slots; wherein the dialogue samples are used to train the dialogue model.

8. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the computer program is executed by the processor to perform the method as claimed in any one of claims 1-6.

9. A computer program product, characterized in that, The computer program product includes a computer program, wherein the computer program is executed by a processor to perform the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Voice conversation method and device, electronic equipment and computer readable storage medium

    CN114510950A

  • Data synthesis method and device, model pre-training method and device, medium and equipment

    CN119862269A

  • Data set generation method and device, electronic equipment, storage medium and vehicle

    CN119988965A