Fine tuning data set generation method and system based on large model, computer and medium

By building prompt word generators and randomness enhancers, fine-tuned data sets on industrial scale are generated, which solves the problem of smaller closed source data sets and improves the diversity and adaptability of large language models in specific fields and tasks.

CN119849611APending Publication Date: 2025-04-18QINGYU VISION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411927487.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The closed source data sets of existing industrial models are relatively small, resulting in poor performance and adaptability of large language models to perform specific tasks in specific domains.

Method used

The prompt word generator is constructed through the cross-mutation algorithm, and the prompt word is automatically generated, and the prompt set is enhanced through the random enhancer to generate a fine-tuned data set of industrial scale.

Benefits of technology

Improves the diversity and adaptability of large language models in specific fields and tasks, avoids the collapse of prompt word generators into a single mode in the same field, and improves the quality and scale of fine-tuning data sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119849611A_ABST
    Figure CN119849611A_ABST
Patent Text Reader

Abstract

The invention discloses a fine tuning data set generation method and system based on a large model, a computer and a medium, and the method comprises the following steps: S1, constructing a plurality of cue word generators through employing a crossover and mutation algorithm according to a pre-trained large language model; s2, inputting a condition instruction to a prompt word generator, and outputting a first prompt set; s3, performing random enhancement on each prompt in the first prompt set by using a randomness enhancer to obtain an enhanced prompt set; and S4, running the enhanced prompt set in the large language model to obtain a fine tuning data set. Through the cue word generator, cue words can be automatically generated; a condition instruction is input into a prompt word generator, so that a corresponding prompt set can be output as required; through the random enhancer, the cue words in the cue set can be enhanced, the cue word generator is prevented from collapsing into a single mode in the same field, and the diversity of output results of the cue words in a large language model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data generation technology, and in particular to a method, system, computer and medium for generating a fine-tuning data set based on a large model. Background Art

[0002] The rapid development of Large Language Models (LLMs) in recent years has opened up many possibilities for AI. Some of the famous LLMs are GPT-3, GPT-4, PaLM, LLaMA, and Qwen. These models have great potential in understanding, generating, and applying natural language. These advances have created a medium for LLM-powered agents, which are now being developed to solve problems in search engines, software engineering, games, recommender systems, and scientific experiments. These agents are often guided by Chains of Thought (CoT) like ReAct and have access to tools such as APIs, code interpreters, and retrievers.

[0003] Although the aforementioned large language models have rich semantic and grammatical knowledge, they often do not have specific knowledge to perform specific tasks in specific fields. In order to improve the performance and adaptability of large language models in performing specific tasks in specific fields, the pre-trained large language models are usually fine-tuned using specific datasets of the specific fields. However, compared with closed-source datasets used to train industry models, most public instruction fine-tuning datasets are relatively small and less diverse. Therefore, fine-tuning the pre-trained large language models using public instruction fine-tuning datasets often does not produce good results. Summary of the invention

[0004] In view of the above-mentioned deficiencies of the prior art, the technical problem to be solved by the present invention is: a method, system, computer and medium for generating a fine-tuning dataset based on a large model are proposed, aiming to solve the problem that the closed source dataset of the existing industrial model is relatively small. With less human intervention, the large language model can write various instruction examples, ranging from simple task completion to complex multi-round dialogues, covering various fields, and providing an industrial-scale dataset for research on the problem of large model fine-tuning.

[0005] In order to solve the above technical problems, a technical solution adopted by the present invention is: providing a method for generating a fine-tuning dataset based on a large model, comprising the following steps:

[0006] S1: Based on the pre-trained large language model, a crossover mutation algorithm is used to build several prompt word generators;

[0007] S2: Input conditional instructions to the prompt word generator and output the first prompt set;

[0008] S3: using a random enhancer to randomly enhance each prompt in the first prompt set to obtain an enhanced prompt set;

[0009] S4: Run the augmented prompt set on the large language model to obtain the fine-tuning dataset.

[0010] Furthermore, the step S1 comprises the following steps:

[0011] S11: constructing an initial prompt group based on a number of prompt words randomly generated by the large language model or manually input;

[0012] S12: using a crossover mutation algorithm to perform differential evolution on the prompt words in the initial prompt group to obtain optimized prompt words;

[0013] S13: continue to perform differential evolution on the optimized prompt words using a crossover mutation algorithm until a preset number of optimized prompt words are obtained, and use the set of optimized prompt words as a prompt word generator;

[0014] S14: Repeat steps S11 to S13 to construct several prompt word generators.

[0015] Furthermore, the step S2 comprises the following steps:

[0016] S21: randomly selecting a prompt word generator, and inputting a conditional instruction into the prompt word generator, wherein the conditional instruction includes a specified field and / or subject;

[0017] S22: Calculate the text similarity between the prompt word and the conditional instruction in the prompt word generator by using cosine similarity, and select a preset number of prompt words as the first prompt set.

[0018] Furthermore, the step S2 further includes the following sub-steps:

[0019] S23: repeating steps S21 and S22 for a preset number of times to obtain a plurality of second prompt sets;

[0020] S24: Calculate the text similarity of the prompt words in the first prompt set and the second prompt set by using cosine similarity, sort them in ascending order of similarity, select a preset number of prompt words from the second prompt set according to the sorting, and add them to the first prompt set.

[0021] Furthermore, the “using cosine similarity to calculate the text similarity between the prompt word and the conditional instruction in the prompt word generator” includes:

[0022] S221: performing word segmentation processing on a random prompt word in the conditional instruction and prompt word generator, and constructing a common corpus of the conditional instruction and the random prompt word respectively according to the word segmentation processing result, wherein the common corpus is a union of the word segments of the conditional instruction and the random prompt word;

[0023] S222: Calculate the frequency of occurrence of the conditional instruction and the random prompt word in the union of the word segments, obtain the word frequencies of the conditional instruction and the random prompt word, and represent them in the form of vectors respectively;

[0024] S223: Calculate the similarity between the conditional instruction word frequency and the random prompt word frequency based on the cosine similarity:

[0025]

[0026] Among them, X i represents the frequency of the i-th word in the conditional instruction X; Y ij represents the frequency of the i-th word in the j-th prompt word in the prompt word generator; cos(θ) represents the relationship between the conditional instruction X and the random prompt word Y ij The similarity between them ranges from 0 to 1; n represents the number of word frequencies;

[0027] S224: Calculate the cosine similarity between the conditional instruction and each prompt word in the prompt word generator, sort them from large to small according to the similarity, and select a preset number of prompt words as the first prompt set according to the sorting.

[0028] Furthermore, in step S3, the following sub-steps are included:

[0029] S31: performing format correction on each prompt word in the first prompt set by using a format template;

[0030] S32: adding context information to each prompt word in the first prompt set;

[0031] S33: Add a reinforcing word at the end of each prompt word in the first prompt set.

[0032] In order to solve the above technical problems, the second technical solution adopted by the present invention is to provide a fine-tuning data set generation system based on a large model, comprising:

[0033] A prompt word generator construction module is used to construct several prompt word generators using a crossover mutation algorithm based on a pre-trained large language model;

[0034] A prompt set generation module, used for inputting conditional instructions to the prompt word generator and outputting a first prompt set;

[0035] a prompt set enhancement module, configured to randomly enhance each prompt in the first prompt set using a random enhancer to obtain an enhanced prompt set;

[0036] A dataset generation module is used to run the enhanced prompt set in the large language model to obtain a fine-tuning dataset.

[0037] Furthermore, the prompt word generator construction module includes:

[0038] An initial prompt group construction submodule is used to construct an initial prompt group according to a number of prompt words randomly generated by a large language model or manually input;

[0039] The prompt word optimization submodule is used to perform differential evolution on the prompt words in the initial prompt group using a crossover mutation algorithm to obtain optimized prompt words;

[0040] An iterative optimization submodule, used for continuing to perform differential evolution on the optimization prompt words by using a crossover mutation algorithm until a preset number of optimization prompt words are obtained, and using the set of optimization prompt words as a prompt word generator;

[0041] The repeated construction submodule is used to repeat the steps of the initial prompt group construction submodule, the prompt word optimization submodule and the content of the iterative optimization submodule to construct a plurality of prompt word generators.

[0042] To solve the above technical problems, the third technical solution adopted by the present invention is: a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any one of the data set generation methods described above.

[0043] In order to solve the above technical problems, the fourth technical solution adopted by the present invention is: a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements any of the above-mentioned data set generation methods.

[0044] The method, system, computer and medium for generating a fine-tuning data set based on a large model of the present invention have at least the following beneficial effects: the present invention can automatically generate prompt words through a prompt word generator; by inputting conditional instructions into the prompt word generator, the corresponding prompt set can be output according to requirements; through a random enhancer, the prompt words in the prompt set can be enhanced to prevent the prompt word generator from collapsing into a single mode in the same field, thereby improving the diversity of the prompt word output results in the large language model. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0046] Figure 1 The present invention is a flowchart of an embodiment of a method for generating a fine-tuning dataset based on a large model.

[0047] Figure 2 for Figure 1 Sub-flow chart of step S1 in .

[0048] Figure 3 for Figure 1 Sub-flow chart of step S2 in .

[0049] Figure 4 for Figure 3 Sub-flow chart of step S22 in .

[0050] Figure 5 for Figure 1 Sub-flow chart of step S3 in .

[0051] Figure 6 A structural block diagram of an implementation of a large model-based fine-tuning dataset generation system. DETAILED DESCRIPTION

[0052] The present invention will be further described below in conjunction with the accompanying drawings.

[0053] See also Figure 1 , is a flow chart of an implementation of a method, device and medium for generating a multi-agent dataset based on a large language model of the present invention. This implementation may specifically include the following steps:

[0054] S1: Based on the pre-trained large language model, a crossover mutation algorithm is used to build several prompt word generators.

[0055] Specifically, the prompt word generator in this embodiment is used to automatically generate prompt words, which is a prompt strategy that enhances the randomness of LLM output. Based on the initial prompt words, it generates new prompt words through an evolutionary algorithm, and guides the optimization process through the evolutionary algorithm, retains prompt words with better performance, and continuously iterates to generate high-quality prompt words.

[0056] In some embodiments, see Figure 2 , this step S1 may include the following sub-steps:

[0057] S11: construct an initial prompt group based on a number of prompt words randomly generated by the large language model or manually input.

[0058] Specifically, in this embodiment, the initial prompt group includes a variety of random prompts, which can be generated by a large language model. In order to improve the diversity of the prompt group, artificially generated prompt words can also be introduced according to needs.

[0059] S12: using a crossover mutation algorithm to perform differential evolution on the prompt words in the initial prompt group to obtain optimized prompt words.

[0060] S13: continue to perform differential evolution on the optimized prompt words using a crossover mutation algorithm until a preset number of optimized prompt words are obtained, and use the set of optimized prompt words as a prompt word generator;

[0061] S14: Repeat steps S11 to S13 to construct several prompt word generators.

[0062] Specifically, in this embodiment, the crossover mutation algorithm in the above step S12 mainly includes a crossover operator and a mutation operator, wherein the crossover operator is used to generate new prompt words according to the existing prompt words in the prompt group in a crossover manner, and the mutation operator is used to determine the degree of variation of the generated prompt words. If the degree of variation is lower than the preset value, the mutation operator is used to perform further variation, thereby further improving the diversity of the prompt group. The specific calculation method of the crossover operator is:

[0063] y · =y0+F*(y1-y2);

[0064] Where F is the scaling factor, which determines the degree of crossover of the generated prompt words, and is generally taken as [0, 2]; y0, y1, y2 are the initial prompt words in the prompt group (i.e., three prompt words randomly selected from several prompt words randomly generated by the large language model or manually input); y · Represents a new prompt word obtained by cross-evolution of three randomly selected prompt words.

[0065] The specific calculation method of the mutation operator is:

[0066] y ·· =y · +K*(y3-y · );

[0067] Among them, K represents the variation factor, which indicates the degree of variation; y3 represents a random prompt word selected from the prompt group except y0, y1, and y2; y ·· According to the cross prompt word y · The new prompt word obtained by mutation (i.e. the optimized prompt word mentioned above).

[0068] It should be noted that the above-mentioned scaling factors and variation factors can be adjusted according to actual needs.

[0069] Furthermore, according to the above crossover mutation algorithm, after generating enough optimized prompt words, the set of them is used as a prompt word generator, and at the same time, the same method is used to generate several different prompt word generators.

[0070] S2: Input conditional instructions to the prompt word generator and output the first prompt set.

[0071] Specifically, the conditional instructions in this embodiment are essentially equivalent to specifying different fields or topics, which provide clear guidance for the generator to ensure that the generated data set can accurately cover all required professional fields.

[0072] In some embodiments, see Figure 3 , this step S2 may include the following steps:

[0073] S21: randomly selecting a prompt word generator, and inputting a conditional instruction into the prompt word generator, wherein the conditional instruction includes a specified field and / or subject;

[0074] S22: Calculate the text similarity between the prompt word and the conditional instruction in the prompt word generator by using cosine similarity, and select a preset number of prompt words as the first prompt set.

[0075] Specifically, in this embodiment, the prompt words that meet the conditional instructions are screened from the prompt word generator by text similarity, and a preset number of prompt words are selected as the first prompt set to facilitate subsequent enhancement operations.

[0076] In some implementations, the step S2 may further include the following sub-steps:

[0077] S23: repeating steps S21 and S22 for a preset number of times to obtain a plurality of second prompt sets;

[0078] S24: Calculate the text similarity of the prompt words in the first prompt set and the second prompt set by using cosine similarity, sort them in ascending order of similarity, select a preset number of prompt words from the second prompt set according to the sorting, and add them to the first prompt set.

[0079] In this embodiment, in order to further improve the diversity of prompt words in the first prompt set, multiple prompt word generators can be nested. Specifically, conditional instructions can be input into different prompt word generators to obtain several second prompt sets, so as to calculate the text similarity of the prompt words in the first prompt set and the second prompt set using cosine similarity, sort them from small to large in similarity, and select a preset number of prompt words from the second prompt set according to the sorting and add them to the first prompt set. It should be noted that although the nested prompt word generator can greatly improve the data diversity and randomness, it will be slightly weaker in processing time and performance. Therefore, it can be selected whether to use the nesting of prompt word generators and the number of nestings according to the actual data set demand scale.

[0080] In some embodiments, see Figure 4 The above-mentioned “calculating the text similarity between the prompt word and the conditional instruction in the prompt word generator by using cosine similarity” may include the following steps:

[0081] S221: performing word segmentation processing on a random prompt word in the conditional instruction and prompt word generator, and constructing a common corpus of the conditional instruction and the random prompt word respectively according to the word segmentation processing result, wherein the common corpus is a union of the word segments of the conditional instruction and the random prompt word;

[0082] S222: Calculate the frequency of occurrence of the conditional instruction and the random prompt word in the union of the word segments, obtain the word frequencies of the conditional instruction and the random prompt word, and represent them in the form of vectors respectively;

[0083] S223: Calculate the similarity between the conditional instruction word frequency and the random prompt word frequency based on the cosine similarity:

[0084]

[0085] Among them, X i represents the frequency of the i-th word in the conditional instruction X; Y ij represents the frequency of the i-th word in the j-th prompt word in the prompt word generator; cos(θ) represents the relationship between the conditional instruction X and the random prompt word Y ij The similarity between them ranges from 0 to 1; n represents the word frequency.

[0086] S224: Calculate the cosine similarity between the conditional instruction and each prompt word in the prompt word generator, sort them from large to small according to the similarity, and select a preset number of prompt words as the first prompt set according to the sorting.

[0087] S3: using a random enhancer to randomly enhance each prompt in the first prompt set to obtain an enhanced prompt set.

[0088] Specifically, to further improve the randomness and prevent the prompt word generator from collapsing into a single mode in the same domain, we added a randomness enhancer, and each prompt in the first prompt set was randomly enhanced to obtain an enhanced prompt set.

[0089] In some embodiments, see Figure 5 , this step S3 may include the following steps:

[0090] S31: performing format correction on each prompt word in the first prompt set by using a format template;

[0091] S32: adding context information to each prompt word in the first prompt set;

[0092] S33: Add a reinforcing word at the end of each prompt word in the first prompt set.

[0093] Specifically, in order to further improve the randomness and prevent the prompt word generator from collapsing into a single mode in the same field, we added a randomness enhancer, which adds additional context to each prompt word in the first prompt set, and can correct the format of each prompt word to make it more consistent with the input form of the large language model. At the same time, the prompt statement of the prompt word generator will end with the phrase "have some creativity", such as randomly appending an enhancer to the end of the prompt word: "be creative", "different", "original", "different", "special", "give me your second answer", or an empty string.

[0094] To evaluate the effect of the augmentation, we sampled question and answer pairs generated with and without augmentation for each partition of each domain in the dataset. Our sampling results show that the presence of augmentation improves the diversity of academic, instructional tasks, multiple-choice, and more.

[0095] S4: Run the augmented prompt set on the large language model to obtain the fine-tuning dataset.

[0096] Specifically, after obtaining the enhanced prompt set, it is input into the large language model, and then the large language model can automatically output and obtain a large-scale fine-tuning dataset.

[0097] See also Figure 6 , is a structural block diagram of an embodiment of a multi-agent data analysis system based on a large language model of the present invention. The fine-tuning dataset generation system based on a large model of this embodiment is used to implement the fine-tuning dataset generation method based on a large model as described in the above embodiment. Specifically, the fine-tuning dataset generation system based on a large model of this embodiment includes a prompt word generator construction module 100, a prompt set generation module 200, a prompt set enhancement module 300 and a dataset generation module 400. Among them:

[0098] The prompt word generator construction module 100 is used to construct a plurality of prompt word generators using a crossover mutation algorithm according to a pre-trained large language model;

[0099] The prompt set generation module 200 is used to input conditional instructions to the prompt word generator and output a first prompt set;

[0100] A prompt set enhancement module 300, configured to randomly enhance each prompt in the first prompt set using a random enhancer to obtain an enhanced prompt set;

[0101] The dataset generation module 400 is used to run the enhanced prompt set in the large language model to obtain a fine-tuning dataset.

[0102] In some embodiments, the prompt word generator building block 100 includes:

[0103] An initial prompt group construction submodule is used to construct an initial prompt group according to a number of prompt words randomly generated by a large language model or manually input;

[0104] The prompt word optimization submodule is used to perform differential evolution on the prompt words in the initial prompt group using a crossover mutation algorithm to obtain optimized prompt words;

[0105] An iterative optimization submodule, used for continuing to perform differential evolution on the optimization prompt words by using a crossover mutation algorithm until a preset number of optimization prompt words are obtained, and using the set of optimization prompt words as a prompt word generator;

[0106] The repeated construction submodule is used to repeat the steps of the initial prompt group construction submodule, the prompt word optimization submodule and the content of the iterative optimization submodule to construct a plurality of prompt word generators.

[0107] The present invention can automatically generate prompt words through a prompt word generator; by inputting conditional instructions into the prompt word generator, a corresponding prompt set can be output according to requirements; through a random enhancer, the prompt words in the prompt set can be enhanced to prevent the prompt word generator from collapsing into a single mode in the same field, thereby improving the diversity of prompt word output results in a large language model.

[0108] On the other hand, an embodiment of the present invention further provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-mentioned data set generation methods. The computer device comprises a processor, a memory, a network interface, a display screen, and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a multi-agent data set generation method based on a large language model is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0109] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for generating a data set described in any one of the above is implemented.

[0110] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0111] The above content only expresses the preferred embodiments of the present invention, and its description is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention patent. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.

Claims

1. A method for generating a fine-tuning dataset based on a large model, characterized in that: The following steps are involved: S1: Based on the pre-trained large language model, a crossover mutation algorithm is used to build several prompt word generators; S2: Input conditional instructions to the prompt word generator and output the first prompt set; S3: using a random enhancer to randomly enhance each prompt in the first prompt set to obtain an enhanced prompt set; S4: Run the augmented prompt set on the large language model to obtain the fine-tuning dataset.

2. The method for generating a fine-tuning dataset based on a large model according to claim 1, characterized in that: The step S1 comprises the following steps: S11: constructing an initial prompt group based on a number of prompt words randomly generated by the large language model or manually input; S12: using a crossover mutation algorithm to perform differential evolution on the prompt words in the initial prompt group to obtain optimized prompt words; S13: continue to perform differential evolution on the optimized prompt words using a crossover mutation algorithm until a preset number of optimized prompt words are obtained, and use the set of optimized prompt words as a prompt word generator; S14: Repeat steps S11 to S13 to construct several prompt word generators.

3. The method for generating a fine-tuning dataset based on a large model as claimed in claim 2, characterized in that: The step S2 comprises the following steps: S21: randomly selecting a prompt word generator, and inputting a conditional instruction into the prompt word generator, wherein the conditional instruction includes a specified field and / or subject; S22: Calculate the text similarity between the prompt word and the conditional instruction in the prompt word generator by using cosine similarity, and select a preset number of prompt words as the first prompt set.

4. The method for generating a fine-tuning dataset based on a large model as claimed in claim 3, characterized in that: The step S2 further comprises the following sub-steps: S23: repeating steps S21 and S22 for a preset number of times to obtain a plurality of second prompt sets; S24: Calculate the text similarity of the prompt words in the first prompt set and the second prompt set by using cosine similarity, sort them in ascending order of similarity, select a preset number of prompt words from the second prompt set according to the sorting, and add them to the first prompt set.

5. The method for generating a fine-tuning dataset based on a large model according to claim 3 or 4, characterized in that: The “using cosine similarity to calculate the text similarity between the prompt word and the conditional instruction in the prompt word generator” includes: S221: performing word segmentation processing on a random prompt word in the conditional instruction and prompt word generator, and constructing a common corpus of the conditional instruction and the random prompt word respectively according to the word segmentation processing result, wherein the common corpus is a union of the word segments of the conditional instruction and the random prompt word; S222: Calculate the frequency of occurrence of the conditional instruction and the random prompt word in the union of the word segments, obtain the word frequencies of the conditional instruction and the random prompt word, and represent them in the form of vectors respectively; S223: Calculate the similarity between the conditional instruction word frequency and the random prompt word frequency based on the cosine similarity: Among them, X i represents the frequency of the i-th word in the conditional instruction X; Y ij represents the frequency of the i-th word in the j-th prompt word in the prompt word generator; cos(θ) represents the relationship between the conditional instruction X and the random prompt word Y ij The similarity between them ranges from 0 to 1; n represents the number of word frequencies; S224: Calculate the cosine similarity between the conditional instruction and each prompt word in the prompt word generator, sort them from large to small according to the similarity, and select a preset number of prompt words as the first prompt set according to the sorting.

6. The method for generating a fine-tuning dataset based on a large model according to claim 1, characterized in that: In the step S3, the following sub-steps are included: S31: performing format correction on each prompt word in the first prompt set by using a format template; S32: adding context information to each prompt word in the first prompt set; S33: Add a reinforcing word at the end of each prompt word in the first prompt set.

7. A fine-tuning dataset generation system based on a large model, characterized in that: include: A prompt word generator construction module is used to construct several prompt word generators using a crossover mutation algorithm based on a pre-trained large language model; A prompt set generation module, used for inputting conditional instructions to the prompt word generator and outputting a first prompt set; a prompt set enhancement module, configured to randomly enhance each prompt in the first prompt set using a random enhancer to obtain an enhanced prompt set; A dataset generation module is used to run the enhanced prompt set in the large language model to obtain a fine-tuning dataset.

8. The system for generating a fine-tuning dataset based on a large model according to claim 7, characterized in that: The prompt word generator building block includes: An initial prompt group construction submodule is used to construct an initial prompt group according to a number of prompt words randomly generated by a large language model or manually input; The prompt word optimization submodule is used to perform differential evolution on the prompt words in the initial prompt group using a crossover mutation algorithm to obtain optimized prompt words; An iterative optimization submodule, used for continuing to perform differential evolution on the optimization prompt words by using a crossover mutation algorithm until a preset number of optimization prompt words are obtained, and using the set of optimization prompt words as a prompt word generator; The repeated construction submodule is used to repeat the steps of the initial prompt group construction submodule, the prompt word optimization submodule and the content of the iterative optimization submodule to construct a plurality of prompt word generators.

9. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the data set generation method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for generating a data set according to any one of claims 1 to 6 is implemented.