Training method and device for action plan generation model based on large language model

By constructing a multi-stage dataset and fine-tuning training of large language models, the problem of large language models lacking practical feasibility when generating action plans is solved, and a high accuracy and feasibility action plan is generated is achieved.

CN118152528BActive Publication Date: 2024-12-06INST OF AUTOMATION CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410222968.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-28
Publication Date
2024-12-06
Estimated Expiration
2044-02-28

AI Technical Summary

Technical Problem

The large language model lacks a deep understanding of the specific situation when generating action plans, which leads to the lack of practical feasibility of the generated plans that are inconsistent with the specific situation.

Method used

By constructing multi-stage tasks, including building a definite dataset, problem dataset and scheme dataset, using the general large language model and evolutionary prompt text to fine-tune the initial large language model to generate a practical, accurate and practical action plan model to meet the actual action plan .

Benefits of technology

It improves the comprehensiveness, accuracy and feasibility of the action plan generation model, ensuring that the generated plan is highly customizable and practical in practical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118152528B_ABST
    Figure CN118152528B_ABST
Patent Text Reader

Abstract

The present invention provides a training method and device for an action plan generation model based on a large language model, wherein the method comprises: obtaining background information of an action plan sample and an initial large language model; constructing a hypothetical data set of the action plan sample based on the background information and the general large language model; constructing a problem data set of the action plan sample based on the hypothetical data set and the general large language model; constructing a solution data set of the action plan sample based on the problem data set and the general large language model; training the initial large language model based on the problem data set and the solution data set to obtain an action plan generation model. The method provided by the present invention is based on continuous multi-stage data set construction, which improves the comprehensiveness, accuracy, and customizability of the training data. And the initial large language model is fine-tuned and trained by constructing the obtained data set to improve the accuracy, feasibility, and practicality of the action plan generation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a training method and device for an action plan generation model based on a large language model. Background Art

[0002] An action plan is a series of action steps and decision paths planned to achieve a goal. With the widespread application of large language models (LLMs) in various fields, the advent of the era of large language models has injected new vitality into the generation of action plans. Large language models are a type of powerful artificial intelligence model that understands and generates natural language text through deep learning and large-scale neural network training. It performs self-supervised learning on large amounts of text data, allowing the model to capture language context information, grammatical rules, and semantic relationships, and performs well in processing language tasks.

[0003] However, large language models lack a deep understanding of specific contexts, that is, although they are exposed to a large amount of text data during training, this does not guarantee that they can truly understand the specific contexts of a specific task or field. As a result, this may lead to the lack of practical feasibility of the generated action plan and its inconsistency with the specific situation. Summary of the invention

[0004] The present invention provides a training method and device for an action plan generation model based on a large language model, which are used to solve the defects that the action plans generated in the prior art lack practical feasibility and are not consistent with specific situations.

[0005] The present invention provides a training method for an action plan generation model based on a large language model, comprising:

[0006] Obtain background information of action plan samples and an initial large language model;

[0007] Based on the background information and the general large language model, construct a scenario data set of the action plan sample;

[0008] Based on the scenario data set and the universal large language model, construct a question data set of the action plan sample;

[0009] Based on the problem data set and the universal large language model, construct a solution data set of the action plan samples;

[0010] Based on the problem data set and the solution data set, the initial large language model is trained to obtain an action plan generation model.

[0011] According to a training method for an action plan generation model based on a large language model provided by the present invention, the problem data set of the action plan sample is constructed based on the scenario data set and the general large language model, including:

[0012] Based on the assumption data set and the universal large language model, an initial question data set is obtained;

[0013] Based on the universal large language model and the evolution prompt text, the initial question data set is evolved to obtain the question data set.

[0014] According to a training method for an action plan generation model based on a large language model provided by the present invention, the initial question data set is evolved based on the general large language model and the evolution prompt text to obtain the question data set, including:

[0015] Based on the evolution distribution probability, determining the current prompt text from the evolution prompt text;

[0016] Based on the universal large language model and the current prompt text, evolving each question in the initial question data set to obtain the question data set;

[0017] The evolution prompt text includes at least one of: depth prompt text, breadth prompt text, innovation prompt text, condition constraint prompt text, and concept replacement prompt text.

[0018] According to a training method for an action plan generation model based on a large language model provided by the present invention, the scenario data set of the action plan samples is constructed based on the background information and the general large language model, including:

[0019] Performing data cleaning on the background information to obtain key background information;

[0020] Based on the universal large language model, the key background information is improved to obtain the hypothetical data set.

[0021] According to a training method for an action plan generation model based on a large language model provided by the present invention, the solution data set of the action plan samples is constructed based on the problem data set and the general large language model, including:

[0022] Based on a preset standard prompt text, instruct the general large language model to generate an action plan for each question in the question data set to obtain the plan data set;

[0023] The standard prompt text includes the names of the constituent elements of the action plan.

[0024] According to a training method for an action plan generation model based on a large language model provided by the present invention, the names of the constituent elements include: at least one of: action stage, subtask name, time allocation, resource allocation, task goal, and expected effect.

[0025] The present invention also provides a training device for an action plan generation model based on a large language model, comprising:

[0026] Acquisition unit, obtains background information of action plan samples and initial large language model;

[0027] A scenario data set construction unit, which constructs a scenario data set of the action plan sample based on the background information and the general large language model;

[0028] A question data set construction unit, which constructs a question data set of the action plan sample based on the assumption data set and the universal large language model;

[0029] A solution data set construction unit, which constructs a solution data set of the action plan sample based on the problem data set and the universal large language model;

[0030] The model training unit trains the initial large language model based on the problem data set and the solution data set to obtain an action plan generation model.

[0031] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the training method for generating an action plan model based on a large language model as described in any one of the above is implemented.

[0032] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a training method for an action plan generation model based on a large language model as described in any one of the above.

[0033] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-mentioned methods for training an action plan generation model based on a large language model.

[0034] The training method and device of the action plan generation model based on the large language model provided by the present invention constructs a solution data set based on the continuous multi-stage tasks of constructing the assumption data set stage, constructing the problem data set stage, and constructing the solution data set stage, thereby improving the comprehensiveness, accuracy, and customizability of the training data. The initial large language model is fine-tuned and trained by the constructed data set, so that the action plan generation model generates an action plan that is practical, accurate, highly feasible, and fits the actual action situation. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 It is one of the flow charts of the training method of the action plan generation model based on the large language model provided by the present invention;

[0037] Figure 2 It is a flow chart of the method for obtaining problem data provided by the present invention;

[0038] Figure 3 It is a flow chart of the method for constructing a scenario data set provided by the present invention;

[0039] Figure 4 It is a flowchart of the method for constructing a solution data set provided by the present invention;

[0040] Figure 5 This is the second flow chart of the training method of the action plan generation model based on the large language model provided by the present invention;

[0041] Figure 6 It is a structural schematic diagram of a training device for an action plan generation model based on a large language model provided by the present invention;

[0042] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] Traditional action plan generation mainly relies on human expertise, experience and judgment, or machine learning is used to assist humans in plan formulation. With the development of machine learning, machine learning is used to assist humans in plan formulation. Common machine learning methods include: (1) Decision tree: Decision tree models are used for classification and prediction, and corresponding action plans are generated based on the input conditions and features. Decision trees can simulate the logic of human decision-making, making them more interpretable when formulating action plans. (2) Cluster analysis: Clustering algorithms are used to group data, identify similar cases and generate specific action plans for each group. This helps to formulate personalized plans and provide customized suggestions based on the needs and characteristics of different groups. (3) Supervised learning: Supervised learning algorithms are used to train models to predict the best action plan in unknown situations by inputting features and corresponding labels. This can provide suggestions for new situations based on patterns in historical data. (4) Reinforcement learning: Reinforcement learning is applied to train models so that they can generate optimized action plans through trial and error learning in a specific environment, which is particularly useful in dynamic and changing scenarios. The role of machine learning in these processes is auxiliary. It provides the ability to automatically process and analyze large amounts of data, and can identify patterns and associations, but the final decision is still made by domain experts and decision makers. At the same time, machine learning can provide more comprehensive, data-driven information to support the human decision-making process in generating action plans.

[0045] The advent of the era of large language models has injected new vitality into the generation of action plans. However, there are some defects in directly using large language models to output action plans. For example, the generated action plans lack practical feasibility and are not consistent with specific situations.

[0046] To address this problem, the present invention provides a training method for an action plan generation model based on a large language model, so as to generate an action plan that is highly feasible and fits the actual action situation. Figure 1 This is one of the flow charts of the training method of the action plan generation model based on the large language model provided by the present invention, such as Figure 1 As shown, the method includes:

[0047] Step 110, obtaining background information of the action plan sample and an initial large language model;

[0048] Here, the action plan sample refers to a series of action steps and decision paths planned in the industry to achieve a certain goal or solve a certain problem, usually including decisions on resource allocation, action arrangements, timetables, etc. For example, the problem corresponding to the action plan may be "how to generate an efficient production plan that meets the company's requirements within a limited time, while ensuring that various variables and constraints are taken into account", and the action plan corresponding to this problem may be "in the production plan formulation stage, in the early stage, assign a group of people to conduct demand analysis and goal setting; in the middle stage, conduct resource assessment and constraint analysis, and formulate a preliminary plan; in the later stage, assign some personnel to screen and optimize the plan, and conduct risk assessment and provide response strategies through leaders."

[0049] Here, the background information of the action plan sample can be used to describe the data information or preset conditions that the action plan relies on, and can usually be divided into multiple modules. For example, in a manufacturing company, the background information of the action plan can include multiple modules such as production records, material information, and human resource allocation.

[0050] In addition, the initial large language model here refers to a large language model to be fine-tuned for a specific task, for example, it can be the BaiChuan-13B-chat model. It is understandable that the initial large language model has the ability to capture the contextual information, grammatical rules and semantic relationships of the language, and can process language tasks based on the captured semantic information. However, since it has not been trained for a specific task, when it performs a task such as generating an action plan, the action plan it generates still has some defects.

[0051] Specifically, the action plan samples and related information of the action plan samples can be obtained through crawler technology, and the related information of the action plan samples can be used as its background information. In addition, an open source large language model, such as BaiChuan-13B-chat, can be obtained as an initial large language model.

[0052] Step 120, constructing a scenario data set of the action plan sample based on the background information and the general large language model;

[0053] Here, the general large language model can refer to a large language model that has the ability to handle certain language tasks, such as GPT4 (Generative Pre-trained Transformer) and other large language models. In addition, the hypothetical data set here refers to a data set composed of key elements in the background information of the action plan samples, which can reflect the key element information on which the action plan is generated.

[0054] Specifically, the background information can be input into the general large language model, and by inputting prompt text, the general large language model is instructed to obtain the hypothetical data from the background information, thereby obtaining the hypothetical data set. In one embodiment, first, the key text information in the background information is extracted, and the key modules of the background information are pre-acquired. Then, the key modules missing in the background information are output through the general large language model and the corresponding prompt text. The prompt text here can be: "The background information is XXX, and the key modules of the background information should include module A, module B... Please output the key modules missing in this background information." Finally, the general large language model and the corresponding prompt text can be used to complete the data of the key modules missing in the background information to obtain the hypothetical data corresponding to the background information, and the aforementioned steps are repeated to construct the hypothetical data set.

[0055] Step 130, constructing a question dataset of the action plan samples based on the scenario dataset and the universal large language model;

[0056] Specifically, any piece of assumption data in the assumption data set can be input into the general large language model, and the prompt text of the question data can be generated by inputting to instruct the general large language model to generate questions based on the input assumption data and meeting the requirements of the prompt text, and the problem data set for the action plan can be constructed by repeating the process. It should be noted that by generating question data corresponding to the assumption data based on the general large language model, question data of different breadth, depth and type can be generated based on the same piece of assumption data, so that the question data contained in the obtained question data set is more comprehensive and diverse.

[0057] Step 140, constructing a solution dataset of the action plan samples based on the problem dataset and the universal large language model;

[0058] Specifically, any question data in the question data set can be input into the general large language model, and by inputting a prompt text for generating solution data, the general large language model is instructed to generate solution data corresponding to the question data and meeting the requirements of the prompt text, and the aforementioned steps are repeated to construct a solution data set.

[0059] It should be noted that by dividing the acquisition of the solution data set into multiple consecutive stages, namely, the stage of constructing the assumption data set, the stage of constructing the problem data set, and the stage of constructing the solution data set, and through the division of multi-stage tasks, each stage has specific tasks. Compared with the traditional single process, the comprehensiveness and accuracy of the solution data set are improved, thereby improving the accuracy of the trained action plan generation model.

[0060] In addition, compared with the prior art of directly obtaining action plan data sets, for example, through manual analysis, in-depth analysis is performed according to a specific assumed background, and an action plan is designed; or, machine learning methods are used, such as training a reinforcement learning model to form an intelligent agent strategy, thereby directly generating an action plan; or, using a large language model that has not been additionally trained to directly answer solution generation questions raised by users, the embodiments of the present invention construct each data set through the background information of the original action plan samples, and can adaptively adjust each task stage based on the actual application requirements of the action plan generation model at each task stage, so that the constructed solution data set can meet the comprehensive consideration of various aspects of the action plan generation model in actual applications, so that the action plan generation model has high customizability.

[0061] Step 150: Based on the problem data set and the solution data set, the initial large language model is trained to obtain an action plan generation model.

[0062] Specifically, the initial large language model can be supervised fine-tuned by using the problem dataset as training samples, the solution dataset as training labels, and generating prompt text for the action plan. The training is stopped when the loss between the action plan generated by the initial large language model and the solution data in the solution dataset is less than a certain threshold, and the large language model trained at this time is used as the final action plan generation model.

[0063] It should be noted that through supervised learning of the initial large language model, the initial large language model itself has strong language understanding and generation capabilities, which makes the action plan generation model trained more contextual and closer to actual needs.

[0064] In one embodiment, for the application scenario of improving production efficiency with the intelligent planning assistant, the background information may be: Xiao Ming is a production planner at a manufacturing company who needs to deal with various production scheduling, material management, and manpower scheduling challenges every day. When faced with complex production tasks, it is found that traditional methods often take a lot of time, and it is difficult to ensure that the generated production plan meets the company's requirements and is efficient and feasible. The main problem Xiao Ming faces is how to generate an efficient production plan that meets the company's requirements within a limited time, while ensuring that various variables and constraints are taken into account. Therefore, the action plan generation model of the "intelligent planning assistant" can be trained to automatically generate an action plan to solve the problem Xiao Ming faces.

[0065] Specifically, Phase 1: Scenario Dataset Construction: Collect a large amount of production data to construct a scenario data set. The generated data here includes past production records, material information, and human resource allocation. Through the scenario data set construction phase, a detailed and comprehensive data foundation was successfully established, providing strong support for subsequent solution generation.

[0066] Phase 2: Problem dataset construction; this includes a variety of production problem scenarios. Through the problem dataset construction phase, a richer and more challenging training set is obtained, providing a more comprehensive learning experience for the model.

[0067] Phase 3: Construction of solution data set: During the construction phase, production problems were input into the large language model, and through clever instruction engineering technology, the model was guided to generate a series of high-quality action plans that met the company's production standards. Then, the generated high-quality action plans were manually calibrated to further improve the accuracy and feasibility of the action plans.

[0068] Phase 4: Model training: During the model training phase, the large language model is fine-tuned in a supervised manner based on the action plan to ensure that the model better adapts to the company's specific production tasks. This step makes the action plan generation model a true "domain expert" and "business expert."

[0069] Results: Xiao Ming successfully applied the trained action plan generation model to his daily work and created an intelligent planning assistant that can generate efficient and feasible production plans in a short time, greatly improving production efficiency.

[0070] The method provided in the embodiment of the present invention constructs a solution data set based on the continuous multi-stage tasks of constructing a scenario data set stage, constructing a problem data set stage, and constructing a solution data set stage, thereby improving the comprehensiveness, accuracy, and customizability of the training data. The initial large language model is fine-tuned and trained by the constructed data set, so that the action plan generation model generates an action plan that is practical, accurate, highly feasible, and in line with the actual action situation.

[0071] Based on any of the above embodiments, step 130 includes:

[0072] Based on the assumption data set and the universal large language model, an initial question data set is obtained;

[0073] Based on the universal large language model and the evolution prompt text, the initial question data set is evolved to obtain the question data set.

[0074] Specifically, the assumption data in the assumption data set and the prompt text for generating the initial question can be input into the general large language model, and the prompt text can be used to instruct the general large language model to generate the initial question corresponding to the assumption data, thereby obtaining the initial question set. The initial question can be "give an action plan based on the detailed information of the work to be completed." It should be noted that the initial question set obtained here can be the question data for generating the basic type, as well as the general depth and breadth of the assumption data. In addition, the initial question set can also be composed of the initial questions generated manually.

[0075] Furthermore, the initial question data in the initial question data set and the evolution prompt text can be input into the universal large language model. The evolution prompt text can be used to instruct the universal large language model to evolve the initial question data according to the requirements of the evolution prompt text. For example, if the evolution prompt text requires that the generated question data have constraints, the evolved question data can be "give an action plan based on the condition of controlling the construction budget within 100,000 and detailed information of the work to be completed."

[0076] It should be noted that the evolution prompt text can be used to describe the requirements for the breadth and depth of the problem data, and can be customized through the use requirements of the action plan generation model in actual applications. In addition, the same initial problem data can be evolved using different evolution prompt texts to achieve the diversification of the problem data, thereby improving the training effect of the action plan generation model.

[0077] The method provided by the embodiment of the present invention generates initial question data of the hypothetical data, and evolves the initial question data through evolution prompt text and a universal large language model to obtain diverse, comprehensive, and customized question data, thereby improving the diversity of the question data set and realizing a highly customizable question data set. In addition, compared with directly generating a question data set through evolution prompt text and hypothetical data, the question data set is obtained in steps, and the requirements of the question data set are more detailed in the prompt text indicating the generation of the initial question data and the evolution prompt text, thereby ensuring the practicality and accuracy of the question data set.

[0078] Based on any of the above embodiments, the step of evolving the initial question data set based on the universal large language model and the evolution prompt text to obtain the question data set includes:

[0079] Based on the evolution distribution probability, determining the current prompt text from the evolution prompt text;

[0080] Based on the universal large language model and the current prompt text, evolving each question in the initial question data set to obtain the question data set;

[0081] The evolution prompt text includes at least one of: depth prompt text, breadth prompt text, innovation prompt text, condition constraint prompt text, and concept replacement prompt text.

[0082] Here, the evolutionary distribution probability of each evolutionary prompt text refers to the probability distribution of different evolutionary directions of the initial question, which can be used to customize the proportion of question data in different evolutionary directions according to user needs. Therefore, the evolutionary distribution probability of each evolutionary prompt text here can be the same, for example, it can be 0.2. For example, when there are 5 specific evolutionary directions, the probability of selection of each evolutionary direction can be equal, that is, uniformly distributed, and the probability of each evolutionary distribution is 1 / 5=0.2. The evolutionary distribution probability of each evolutionary prompt text can also be different, such as the evolutionary distribution probability of the depth prompt text is 0.6 and the evolutionary distribution probability of the breadth prompt text is 0.4. For example, when there are 2 specific evolutionary directions, the probability of selection of each evolutionary direction can be unequal, that is, unevenly distributed, and the specific probability of selection can be determined according to the actual needs of the question data. It can be understood that the sum of the evolutionary distribution probabilities of each evolutionary prompt text should be 1.

[0083] In addition, the evolution prompt text may include at least one of depth prompt text, breadth prompt text, innovation prompt text, conditional constraint prompt text, and concept replacement prompt text. Among them, the depth prompt text may be to increase the depth and breadth of the query of the problem data; the breadth prompt text may be to make the generated problem data contain a multi-step reasoning process; the innovation prompt text may be to indicate to draw inspiration from the initial problem data and obtain new problems including creating new problem data; the conditional constraint prompt text may be to indicate to add constraints based on the initial problem; the concept replacement prompt text may be to indicate to replace the general concept of the initial problem with a specific concept. It should be noted that the evolution prompt text here can be customized according to user needs and is not limited to the evolution prompt text listed here.

[0084] Specifically, each question data in the initial question data set can be input into the general large language model respectively. When inputting a single initial question data, the current prompt text is determined from all the evolution prompt texts through the evolution distribution probability of each evolution prompt text. The single initial question data and the current prompt text are input into the general large language model, and the evolved question data is generated by the general large language model. It should be noted that the number of times each evolution prompt text is selected as the current prompt text can be determined based on the evolution distribution probability of each evolution prompt text. For example, when the evolution distribution probability of the breadth prompt text is 0.7, and 10 questions need to be generated, the same initial question data and the breadth prompt text can be input into the general large language model 7 times respectively, and 7 question data evolved in the breadth dimension are generated by the general large language model. In addition, due to the randomness of the output of the general large language model, these 7 evolved question data are not consistent, and there is diversity.

[0085] In one embodiment, Figure 2 It is a flow chart of the method for obtaining problem data provided by the present invention, such as Figure 2 As shown, the method includes:

[0086] First, the current prompt text (prompt) is determined from each evolutionary prompt text through the evolutionary distribution probability of each evolutionary prompt text; among them, the evolutionary distribution probability of depth prompt text, breadth prompt text, innovation prompt text, conditional constraint prompt text, and concept replacement prompt text are all 0.2, that is, P = 0.2.

[0087] Next, the current prompt text and the initial question are input into the universal large language model, and the evolved question data is output through the universal large language model.

[0088] The method provided in the embodiment of the present invention evolves the initial question through a plurality of different types of evolution prompt texts and the evolution distribution probability of each evolution prompt text, thereby improving the data diversity and data practicality of the question data set and also realizing customized question data.

[0089] Considering that large language models have information reliability issues, that is, the data that the model is exposed to during pre-training may contain inaccurate, outdated, or biased information. Therefore, directly using the content generated by the model may cause information reliability issues in decision-making scenarios that require accuracy and reliability. To address this issue, based on any of the above embodiments, step 120 includes:

[0090] Performing data cleaning on the background information to obtain key background information;

[0091] Based on the universal large language model, the key background information is improved to obtain the hypothetical data set.

[0092] Here, key background information refers to text content that does not contain literary, emotional, or subjective descriptions.

[0093] Specifically, first, the background information can be input into a general large language model, and a cleaning prompt text can be input, such as "Please remove the literary, emotional and subjective text content in the background information", and the background information can be cleaned by the general large language model to obtain key background information. In another embodiment, other text cleaning tools can be used, such as a text cleaning tool based on NLTK (Natural Language Toolkit, natural language processing toolkit), to clean the background information.

[0094] Next, the key background information obtained through cleaning can be improved through the general large language model and the improvement prompt text. In detail, the pre-built improvement prompt text can be used to instruct the general large language model to obtain the missing text modules in the key background information, and to supplement and improve the missing text modules to obtain the complete hypothetical data of the text modules. For example, if the key background information lacks the text information of the building parameters and task modules, the text information of the missing modules can be improved through the general large language model. In this way, the hypothetical data set can be obtained by improving each key background information.

[0095] In one embodiment, Figure 3 is a flow chart of the method for constructing a scenario data set provided by the present invention, such as Figure 3 As shown, the method includes:

[0096] First, in the data acquisition stage, we crawled the open-source background information of construction project scheduling on the Internet using crawler technology;

[0097] Next, in the data cleaning phase, the chaotic background information is cleaned, and the literary, emotional, and subjective text information is filtered out to obtain the incomplete key background information;

[0098] Finally, in the scenario improvement stage, based on the general large language model and the improved prompt text, key background information is improved and supplemented to obtain a complete scenario data set.

[0099] It should be noted that in this scenario, which takes the scheduling of construction projects as an example, construction workers need to plan an action plan to complete the construction of the room with a reasonable plan. The background information obtained can be: the new partition wall needs to be carried out in the existing space, and the new partition wall is grouted with the existing wall. The details of the room to be partitioned are as follows: the room is rectangular, with a total of 4 meters by 4 meters. The walls are made of concrete blocks. The wall is 3 meters high and 20 centimeters wide. The new partition wall also needs to be made of concrete blocks. The partition is intended to divide the original space into two, forming two separate spaces of approximately 4 meters by 2 meters. The partition needs to consider installing a solid double wooden door with a width of 0.8 meters, a height of 2.1 meters, and a thickness of 35 mm to connect the two new spaces. After the partition is made, two layers of plaster need to be applied and two layers of white latex paint need to be applied on both sides of the wall. No electrical or plumbing installation is required. There is no ceiling work.

[0100] The method provided in the embodiment of the present invention cleans the complex background information and improves the key background information after cleaning, so that the obtained hypothetical data is concise, complete and reliable, thereby improving the data quality of the hypothetical data and further improving the data quality of the subsequent construction of the problem data set and the solution data set.

[0101] Considering that large language models have serious hallucinations, that is, the output content seems reasonable on the surface, but after careful analysis, it may appear unreasonable, absurd, or even misleading. Common hallucinations include information fabrication, lack of rationality, logical errors, etc. In addition, large language models are often difficult to directly generate outputs that meet specific format requirements.

[0102] In view of the above problem, based on any of the above embodiments, step 140 includes:

[0103] Based on a preset standard prompt text, instruct the general large language model to generate an action plan for each question in the question data set to obtain the plan data set;

[0104] The standard prompt text includes the names of the constituent elements of the action plan.

[0105] The name of the constituent element includes at least one of: action stage, subtask name, time allocation, resource allocation, task goal, and expected effect.

[0106] Here, the standard prompt text can be a format for describing the action plan and a text that constitutes the elements of the action plan. The name of the constituent element in the standard prompt text is a necessary text module in the action plan, which can reflect the overall logic of the action plan and can be at least one of the action phase, subtask name, time allocation, resource allocation, task goal, and expected effect. It should be noted that the more complete the name of the constituent element is, the higher the actual applicability, accuracy, and reliability of the action plan.

[0107] Specifically, the preset standard prompt text and each question in the question data set can be input into the general large language model, and the general large language model can be used to generate an action plan that meets the requirements of the standard prompt text to obtain a plan data set. It should be noted that the output format and content of the general large language model can be restricted through instruction engineering, so as to guide the general large language model to generate high-quality action plans that meet the format and content requirements.

[0108] In one embodiment, Figure 4 is a flow chart of the method for constructing a solution data set provided by the present invention, such as Figure 4 As shown, the method includes: first, inputting the question and the preset standard prompt text into GPT4; then, outputting the initial solution data through GPT4; considering that there may be some errors in the output of the large model, further, manually verifying the initial solution data to obtain the verified solution data to ensure the accuracy of the obtained solution data. Therefore, the method provided in this embodiment ensures that the generated action plan not only meets the prescribed format and content standards, but is also technically and semantically accurate.

[0109] The method provided by the embodiment of the present invention uses at least one of the action phase, subtask name, time allocation, resource allocation, task goal, and expected effect as constituent elements, pre-selects and constructs a standard prompt text, and instructs the universal large language model through the preset standard prompt text to generate an action plan for each problem in the problem data set, thereby obtaining the plan data set, thereby realizing plan data that is highly logical, rational, and conforms to a specific format.

[0110] Based on any of the above embodiments, Figure 5 This is a second flow chart of the training method of the action plan generation model based on the large language model provided by the present invention, such as Figure 5 As shown, the method includes:

[0111] Construct the scenario data set, problem data set, and solution data set based on the general large language model.

[0112] First, in phase 1, the scenario data set is constructed, which includes three steps: scenario acquisition, scenario cleaning, and scenario improvement. Among them, scenario cleaning and scenario improvement can be implemented based on the general large language model.

[0113] Next, questions are constructed based on a complete hypothetical dataset and a general large language model.

[0114] Phase 2: Question dataset construction. Phase 2 includes two steps: initial question construction and initial question evolution. The initial question evolution can include two dimensions: depth evolution and breadth evolution. It should be noted that both initial question construction and initial question evolution can be implemented based on the general large language model.

[0115] Next, the answer is constructed based on the question dataset and the general large language model.

[0116] Phase 3: Construction of solution data set. Phase 3 includes two steps: action plan generation and manual verification, that is, generating action plans based on the problem data set and the general large language model, and manually verifying the generated action plans to obtain the final solution data set;

[0117] Phase 4: Model training: Based on the constructed problem dataset as training samples and the solution dataset as labels, the initial large language model is fine-tuned in a supervised manner to obtain the final solution-generated large language model, that is, the "domain expert" or "business expert".

[0118] It should be noted that the large language model is applied to the training data construction stage, and the initial large language model is fine-tuned in a supervised manner to obtain the final action plan generation model. The method provided by the embodiment of the present invention introduces the large language model throughout all the task stages, and has the following advantages: 1. More comprehensive language understanding; the large language model performs self-supervised learning on a large amount of text data, and can more comprehensively understand the contextual information, grammatical rules and semantic relationships of the language. This enables the model to understand the problem more accurately and provide support for generating more practical and accurate action plans. 2. More efficient information processing; the large language model has the ability to process a large amount of information through deep learning and large-scale neural network training. The model can analyze and synthesize complex information more quickly, thereby generating action plans more efficiently, especially when facing large-scale data or multimodal information. 3. Task adaptability; the fine-tuning mechanism of the large language model enables it to adapt to different tasks. Once pre-training is completed, the model can be fine-tuned to perform specific action plan generation tasks, making it closer to specific fields or specific needs. 4. Diversity in language generation: Large language models have excellent diversity in generating text and can produce more creative and diverse action plans, which is beneficial for providing personalized or innovative solutions.

[0119] Based on any of the above embodiments, Figure 6 is a structural diagram of a training device for an action plan generation model based on a large language model provided by the present invention, such as Figure 6 As shown, the device comprises:

[0120] An acquisition unit 610 acquires background information of an action plan sample and an initial large language model;

[0121] A scenario data set construction unit 620 constructs a scenario data set of the action plan sample based on the background information and the universal large language model;

[0122] A question data set construction unit 630 constructs a question data set of the action plan sample based on the scenario data set and the universal large language model;

[0123] A solution data set construction unit 640 constructs a solution data set of the action plan sample based on the problem data set and the universal large language model;

[0124] The model training unit 650 trains the initial large language model based on the problem data set and the solution data set to obtain an action plan generation model.

[0125] The device provided by the embodiment of the present invention constructs a solution data set based on the continuous multi-stage tasks of constructing a scenario data set stage, constructing a problem data set stage, and constructing a solution data set stage, thereby improving the comprehensiveness, accuracy, and customizability of the training data. The initial large language model is fine-tuned and trained by the constructed data set, so that the action plan generation model generates an action plan that is practical, accurate, highly feasible, and fits the actual action situation.

[0126] Based on any of the above embodiments, the question data set construction unit is specifically used for:

[0127] Based on the assumption data set and the universal large language model, an initial question data set is obtained;

[0128] Based on the universal large language model and the evolution prompt text, the initial question data set is evolved to obtain the question data set.

[0129] Based on any of the above embodiments, the question data set construction unit is further specifically used for:

[0130] Based on the evolution distribution probability, determining the current prompt text from the evolution prompt text;

[0131] Based on the universal large language model and the current prompt text, evolving each question in the initial question data set to obtain the question data set;

[0132] The evolution prompt text includes at least one of: depth prompt text, breadth prompt text, innovation prompt text, condition constraint prompt text, and concept replacement prompt text.

[0133] Based on any of the above embodiments, the scenario data set construction unit is specifically used for:

[0134] Performing data cleaning on the background information to obtain key background information;

[0135] Based on the universal large language model, the key background information is improved to obtain the hypothetical data set.

[0136] Based on any of the above embodiments, the question data set construction unit is specifically used for:

[0137] Based on a preset standard prompt text, instruct the general large language model to generate an action plan for each question in the question data set to obtain the plan data set;

[0138] The standard prompt text includes the names of the constituent elements of the action plan.

[0139] Based on any of the above embodiments, the name of the constituent element includes at least one of: action stage, subtask name, time allocation, resource allocation, task goal, and expected effect.

[0140] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the training method of the action plan generation model based on the large language model, the method comprising: obtaining background information of the action plan sample and the initial large language model; constructing a hypothetical data set of the action plan sample based on the background information and the general large language model; constructing a problem data set of the action plan sample based on the hypothetical data set and the general large language model; constructing a solution data set of the action plan sample based on the problem data set and the general large language model; training the initial large language model based on the problem data set and the solution data set to obtain the action plan generation model.

[0141] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0142] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the training method of the action plan generation model based on the large language model provided by the above methods, and the method includes: obtaining background information of the action plan sample and an initial large language model; based on the background information and a general large language model, constructing a hypothetical data set of the action plan sample; based on the hypothetical data set and the general large language model, constructing a problem data set of the action plan sample; based on the problem data set and the general large language model, constructing a solution data set of the action plan sample; based on the problem data set and the general large language model, training the initial large language model to obtain the action plan generation model.

[0143] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the training method of the action plan generation model based on the large language model provided by the above-mentioned methods, the method comprising: obtaining background information of the action plan sample and an initial large language model; constructing a hypothetical data set of the action plan sample based on the background information and a general large language model; constructing a problem data set of the action plan sample based on the hypothetical data set and the general large language model; constructing a solution data set of the action plan sample based on the problem data set and the general large language model; and training the initial large language model based on the problem data set and the solution data set to obtain the action plan generation model.

[0144] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0145] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0146] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A training method for an action plan generation model based on a large language model, characterized in that: include: Obtain background information of action plan samples and an initial large language model; Based on the background information and the general large language model, construct a scenario data set of the action plan sample, wherein the scenario data set is used to reflect the key elements on which the action plan is generated; Based on the scenario data set and the universal large language model, construct a question data set of the action plan sample; Based on the problem data set and the universal large language model, construct a solution data set of the action plan samples; Based on the problem data set and the solution data set, the initial large language model is trained to obtain an action plan generation model; The step of constructing the problem dataset of the action plan sample based on the scenario dataset and the universal large language model includes: Based on the assumption data set and the universal large language model, an initial question data set is obtained; Based on the universal large language model and the evolution prompt text, evolving the initial question data set to obtain the question data set; The step of evolving the initial question data set based on the universal large language model and the evolution prompt text to obtain the question data set includes: Based on the evolution distribution probability, determining the current prompt text from the evolution prompt text; Based on the universal large language model and the current prompt text, evolving each question in the initial question data set to obtain the question data set; The evolution prompt text includes: at least one of: depth prompt text, breadth prompt text, innovation prompt text, condition constraint prompt text, and concept replacement prompt text; The step of constructing a solution dataset of the action plan samples based on the problem dataset and the universal large language model includes: Based on a preset standard prompt text, instruct the general large language model to generate an action plan for each question in the question data set to obtain the plan data set; The standard prompt text includes the names of the constituent elements of the action plan.

2. The training method for the action plan generation model based on the large language model according to claim 1 is characterized in that: The constructing of the scenario data set of the action plan sample based on the background information and the general large language model includes: Performing data cleaning on the background information to obtain key background information; Based on the universal large language model, the key background information is improved to obtain the hypothetical data set.

3. The training method for the action plan generation model based on a large language model according to claim 1, characterized in that: The name of the constituent element includes at least one of: action stage, subtask name, time allocation, resource allocation, task goal, and expected effect.

4. A training device for an action plan generation model based on a large language model, characterized in that: include: Acquisition unit, obtains background information of action plan samples and initial large language model; A scenario data set construction unit, which constructs a scenario data set of the action plan sample based on the background information and the general large language model, wherein the scenario data set is used to reflect the key elements on which the action plan is generated; A question data set construction unit, which constructs a question data set of the action plan sample based on the assumption data set and the universal large language model; A solution data set construction unit, which constructs a solution data set of the action plan sample based on the problem data set and the universal large language model; A model training unit, based on the problem data set and the solution data set, trains the initial large language model to obtain an action plan generation model; The problem data set construction unit is specifically used for: Based on the assumption data set and the universal large language model, an initial question data set is obtained; Based on the universal large language model and the evolution prompt text, evolving the initial question data set to obtain the question data set; The question data set construction unit is also specifically used for: Based on the evolution distribution probability, determining the current prompt text from the evolution prompt text; Based on the universal large language model and the current prompt text, evolving each question in the initial question data set to obtain the question data set; The evolution prompt text includes: at least one of: depth prompt text, breadth prompt text, innovation prompt text, condition constraint prompt text, and concept replacement prompt text; The step of constructing a solution dataset of the action plan samples based on the problem dataset and the universal large language model includes: Based on a preset standard prompt text, instruct the general large language model to generate an action plan for each question in the question data set to obtain the plan data set; The standard prompt text includes the names of the constituent elements of the action plan.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the training method for the action plan generation model based on the large language model as described in any one of claims 1 to 3 is implemented.

6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the training method for an action plan generation model based on a large language model as described in any one of claims 1 to 3 is implemented.

7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the training method for an action plan generation model based on a large language model as described in any one of claims 1 to 3 is implemented.