Industry intelligent agent automatic fine-tuning method, device, electronic device and storage medium

By using thinking chains and thinking trees in industry agents to build initial instruction response pairs, and generating new instruction response pairs through speculative reasoning and instruction encoders, the problems of low accuracy and slow inference speed in complex industry tasks in the existing technology are solved, and efficient and accurate task processing and reduced manual labeling costs are achieved.

CN119250108BActive Publication Date: 2025-03-04CHINA UNICOM ONLINE INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411765259.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-04
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

The existing industry agent fine-tuning method has a low task completion accuracy in complex industry tasks, the task reasoning speed needs to be improved, and the manual labeling cost is high, which is not conducive to promotion.

Method used

By obtaining industry data for preprocessing, initial instruction response pairs are constructed using thinking chains and thinking trees, and instruction response pairs containing multiple steps are generated through speculative reasoning. Then meta-knowledge is extracted through the instruction encoder, new instruction response pairs are generated, and high-quality instruction data is filtered through multi-dimensional evaluation and similarity discrimination, for fine-tuning of the language model.

Benefits of technology

It improves the task completion accuracy and task reasoning efficiency in complex industry tasks, reduces the cost of manual labeling, and is suitable for scenarios where it is difficult to obtain a large amount of manual instruction data in a short period of time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119250108B_ABST
    Figure CN119250108B_ABST
Patent Text Reader

Abstract

The present invention relates to an automatic fine-tuning method, device, electronic device and storage medium for an industry intelligent agent. The method comprises: preprocessing industry data. An initial instruction response pair is constructed using a thinking chain and a thinking tree, and a first instruction response pair including multiple steps is generated according to the initial instruction response pair through speculative reasoning, and each step is verified. Meta-knowledge is extracted from the first instruction response pair by an instruction encoder, and the instruction encoder is guided by the meta-knowledge to generate a second instruction response pair. The second instruction response pair is evaluated, an evaluation score of the second instruction response pair is obtained, and the second instruction response pair with an evaluation score lower than a first threshold is removed. The second instruction response pair with a difference exceeding a second threshold is added to a fine-tuning data set through similarity discrimination, and the second instruction response pair with a difference lower than the second threshold is discarded. A language model for industry applications is fine-tuned based on the second instruction response pair in the fine-tuning data set combined with the instruction data set of industry data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent agent fine-tuning technology, and in particular to an industry intelligent agent automatic fine-tuning method, device, electronic equipment and storage medium. Background Art

[0002] In many A2P (Application to Person) scenarios such as finance, transportation, culture and tourism, government affairs, and rural areas, there are extensive demands for intelligent interaction, production automation, cost reduction and efficiency improvement, and improving user conversion rate and stickiness. The need for various industries to achieve intelligent transformation and upgrading and enhance market competitiveness with the help of artificial intelligence technology has become increasingly urgent. With the help of multimodal processing capabilities, the intelligent agent can convert various types of data such as text, audio, and images into a form that can be understood by the machine, and then reason and plan the input content through modules such as thinking and memory, and finally call the tool module to perform the corresponding task.

[0003] In industry applications, intelligent agents can decompose complex tasks into smaller subtasks and automatically call tools and APIs, which has great potential in improving work efficiency and automation in various industries. For example, in financial services, intelligent agents can provide a new way of interaction for financial institutions such as banks and securities. Users can complete a variety of financial services such as financial product introductions, trend analysis, and investment consulting through natural language commands, covering multiple stages such as drainage, conversion, and marketing, accelerating the digital transformation and upgrading of the financial industry. In terms of cultural and tourism services, tourist attractions can use intelligent agents to conduct targeted tourism promotions and push related services to tourists, realizing the intelligent upgrade of the cultural and tourism industry in terms of publicity channels, online services, and intelligent interactions. In terms of government services, intelligent agents can allow users to complete possible missing information, track the progress of complaint and suggestion processing, and form a closed service loop through multiple rounds of interaction to solve problems such as the difficulty and complexity of business and people in handling affairs.

[0004] At present, most of the existing intelligent agent applications are based on a general large language model base. By designing a series of targeted prompts (prompt dialog boxes), the intelligent agent has the ability to handle industry application tasks. Since the general large language model lacks prior knowledge of industry knowledge or industry applications, when encountering complex industry tasks, the accuracy of task completion is often low. Secondly, the way to generate thought chains and task planning by designing prompts to induce the model requires multiple model reasoning, and the large language model uses autoregressive method to generate content, which makes the execution time of the entire task longer and difficult to cope with application scenarios with high real-time requirements. In addition, the language model base for the intelligent agent to fine-tune the industry application intelligent agent needs to build a large amount of high-quality instruction data. These instruction data are generally manually labeled, and often require a large number of industry experts to label and proofread the instruction data. The labor cost is high, and it is difficult to quickly promote and replicate in actual applications.

[0005] In summary, the existing industry agent fine-tuning methods have low task completion accuracy in complex industry tasks, and the task reasoning speed needs to be further improved. The manual labeling method also increases the labor cost to a certain extent, which is not conducive to promotion. Summary of the invention

[0006] Based on this, it is necessary to provide an industry intelligent agent automatic fine-tuning method, device, electronic device and storage medium that has high task completion accuracy, high task reasoning efficiency, reduces manual labeling costs and is conducive to popularization and use in response to the above-mentioned technical problems.

[0007] The present invention provides an automatic fine-tuning method for an industry intelligent agent, the method comprising:

[0008] Acquire industry data and pre-process the industry data, wherein the industry data includes original documents of industry tasks and industry knowledge, and the pre-processing includes data analysis and data cleaning;

[0009] An initial instruction-response pair is constructed by using a thinking chain and a thinking tree, and a first instruction-response pair including a plurality of steps is generated according to the constructed initial instruction-response pair by using speculative reasoning, so as to verify each step in the first instruction-response pair based on the preprocessed industry data;

[0010] Extracting meta-knowledge from the first instruction-response pair through an instruction encoder, and guiding the instruction encoder to generate a second instruction-response pair through the meta-knowledge, wherein the meta-knowledge includes a task type, associated industry knowledge, and skill type to which the first instruction-response pair belongs;

[0011] Evaluate the second instruction-response pair from multiple dimensions to obtain an evaluation score of the second instruction-response pair in the industry task, and remove the second instruction-response pair whose evaluation score is lower than a first threshold;

[0012] By similarity determination, the second instruction response pairs whose difference exceeds the second threshold are added to the fine-tuning data set, and the second instruction response pairs whose difference is lower than the second threshold are discarded;

[0013] Based on the second instruction response in the fine-tuning data set, the language model for industry applications is trained and fine-tuned in combination with the instruction data set of the industry data to improve the performance of the language model in a multi-task environment.

[0014] In one embodiment, the obtaining of industry data and preprocessing of the industry data include:

[0015] Acquire the industry data from a variety of sources, including business introductions, internal company databases, and user interaction data;

[0016] Performing data cleaning operations such as denoising, filling missing values, and data standardization on the industry data, and performing data conversion on the cleaned industry data to adapt to the input requirements of the language model;

[0017] The data conversion includes feature scaling, feature encoding, feature selection and data normalization.

[0018] In one embodiment, the initial instruction-response pair is constructed by using a thinking chain and a thinking tree, and a first instruction-response pair including multiple steps is generated according to the constructed initial instruction-response pair by speculative reasoning, so as to verify each step in the first instruction-response pair based on the pre-processed industry data, including:

[0019] Constructing a command-response parallel generation algorithm through the speculative reasoning to encourage the language model to generate diversified command data, and generating intermediate reasoning steps through the thought chain and thought tree;

[0020] The industry tasks and industry knowledge are retrieved based on the intermediate reasoning steps to obtain factual contents in the industry tasks and industry knowledge that are associated with the intermediate reasoning steps.

[0021] In one embodiment, the method uses a thought chain and a thought tree to construct an initial instruction response pair, and generates a first instruction response pair including multiple steps according to the constructed initial instruction response pair through speculative reasoning, so as to verify each step in the first instruction response pair based on the pre-processed industry data, and further includes:

[0022] The authenticity of each step in the intermediate reasoning steps is verified based on the fact content, and the intermediate reasoning steps are iteratively adjusted according to the verification results to eliminate the step strategies in the intermediate reasoning steps that are inconsistent with the fact content.

[0023] In one embodiment, extracting meta-knowledge from the first instruction-response pair by an instruction encoder, and guiding the instruction encoder to generate a second instruction-response pair by using the meta-knowledge, comprises:

[0024] The first instruction-response pair is encoded into the meta-knowledge by the instruction encoder to reduce noise in the first instruction-response pair, and key information having a correlation with the corresponding industry task higher than a third threshold value is compressed and extracted from the first instruction-response pair;

[0025] A decoder generates new instruction data according to the meta-knowledge and the first instruction-response pair, and the new instruction data is the second instruction-response pair.

[0026] In one embodiment, the multiple dimensions include task completion, tool usage, context consistency, and task relevance;

[0027] The second instruction response in the fine-tuning data set is used to train and fine-tune the language model for industry applications in combination with the instruction data set of the industry data to improve the performance of the language model in a multi-task environment, and the method also includes:

[0028] Evaluating the second instruction response pair based on the task completion, tool usage, context consistency, and task relevance, and marking the data reward of the second instruction response according to the evaluation result;

[0029] Comparing the original output of the language model with the annotated second instruction response pair, filtering out the second instruction response pairs whose data reward is annotated with the first value and whose difference exceeds the second threshold through similarity discrimination, and removing the second instruction response pairs whose data reward is annotated with the second value and whose difference is lower than the second threshold;

[0030] Among them, the data reward of the second instruction response pair whose evaluation score exceeds the first threshold is marked as the first value, and the data reward of the second instruction response pair whose evaluation score is lower than the first threshold is marked as the second value.

[0031] In one embodiment, the second instruction response pair in the fine-tuning data set is a second instruction response pair in which the screened data reward is marked as a first value and the difference exceeds a second threshold;

[0032] The training and fine-tuning of the language model for industry applications based on the second instruction response in the fine-tuning data set combined with the instruction data set of the industry data to improve the performance of the language model in a multi-task environment includes:

[0033] Converting the second instruction response pair in the fine-tuning data set into a ReAct format to obtain a second instruction response pair in the ReAct format;

[0034] A low-rank adaptation technique is used to fine-tune the language model for industry applications based on the second instruction-response pairs in the ReAct format and instruction data sets of different industry tasks and usage scenarios to update the model parameters of the language model.

[0035] The present invention also provides an industry intelligent agent automatic fine-tuning device, the device comprising:

[0036] A data preprocessing module, used to obtain industry data and preprocess the industry data, wherein the industry data includes original documents of industry tasks and industry knowledge, and the preprocessing includes data analysis and data cleaning;

[0037] An instruction-response pair generation module, used for constructing an initial instruction-response pair by using a thinking chain and a thinking tree, and generating a first instruction-response pair including a plurality of steps according to the constructed initial instruction-response pair by speculative reasoning, so as to verify each step in the first instruction-response pair based on the preprocessed industry data;

[0038] An instruction encoder module, configured to extract meta-knowledge from the first instruction-response pair through an instruction encoder, and guide the instruction encoder to generate a second instruction-response pair through the meta-knowledge, wherein the meta-knowledge includes a task type, associated industry knowledge, and skill type to which the first instruction-response pair belongs;

[0039] an instruction data evaluation module, configured to evaluate the second instruction response pair from multiple dimensions to obtain an evaluation score of the second instruction response pair in the industry task, and remove the second instruction response pair whose evaluation score is lower than a first threshold;

[0040] a similarity determination module, configured to add the second instruction response pairs whose difference exceeds a second threshold to the fine-tuning data set through similarity determination, and discard the second instruction response pairs whose difference is lower than the second threshold;

[0041] A model fine-tuning module is used to train and fine-tune a language model for industry applications based on a second instruction response in the fine-tuning data set combined with the instruction data set of the industry data, so as to improve the performance of the language model in a multi-task environment.

[0042] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements any one of the above-described methods for automatic fine-tuning of an industry intelligent agent.

[0043] The present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, implements any of the above-described methods for automatic fine-tuning of industry intelligent agents.

[0044] The above-mentioned industry intelligent agent automatic fine-tuning method, device, electronic device and storage medium obtain industry data and pre-process the industry data, use thinking chain and thinking tree to construct initial instruction response pair, and generate instruction response pair containing multiple steps according to the constructed initial instruction response pair through speculative reasoning, so as to verify each step in the instruction response pair based on the pre-processed industry data. Subsequently, the instruction encoder extracts meta-knowledge from the instruction response pair, and guides the instruction encoder to generate a new instruction response pair through meta-knowledge. After that, the second instruction response pair is evaluated from multiple dimensions to obtain the evaluation score of the new instruction response pair in the industry task, and the instruction response pair with an evaluation score lower than the first threshold is removed. Then, the new instruction response pair with higher difference is added to the fine-tuning data set through similarity judgment, and the new instruction response pair with lower difference is discarded. Finally, the language model for industry application is trained and fine-tuned based on the new instruction response pair in the fine-tuning data set combined with the instruction data set of industry data to improve the performance of the language model in a multi-task environment. This method encodes the thought chains and task planning contents generated in industry applications as meta-knowledge, and evaluates and selects high-quality instruction data during the decoding process for fine-tuning the language model. The model is fine-tuned in the intermediate process of processing the thought chains and task planning generated by industry tasks, and the model parameters of the industry agent are accelerated. It does not rely on data labeling by professionals and is suitable for scenarios in industry applications where it is difficult to obtain a large amount of manual instruction data in a short period of time. It improves the task completion accuracy and task reasoning efficiency in complex industry tasks, and is more conducive to promotion and use. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] 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.

[0046] Figure 1 One of the flow charts of the automatic fine-tuning method of the industry intelligent agent provided by the present invention;

[0047] Figure 2 A schematic diagram of the overall framework of the automatic fine-tuning of an industry agent in the method for automatic fine-tuning of an industry agent in a specific embodiment provided by the present invention;

[0048] Figure 3 The second flowchart of the automatic fine-tuning method of the industry intelligent agent provided by the present invention;

[0049] Figure 4 The third flowchart of the automatic fine-tuning method of the industry intelligent agent provided by the present invention;

[0050] Figure 5 The fourth flowchart of the automatic fine-tuning method of the industry intelligent agent provided by the present invention;

[0051] Figure 6 The fifth flowchart of the automatic fine-tuning method of the industry intelligent agent provided by the present invention;

[0052] Figure 7 The sixth flowchart of the industry intelligent agent automatic fine-tuning method provided by the present invention;

[0053] Figure 8 A schematic diagram of the structure of the automatic fine-tuning device for an industry intelligent body provided by the present invention;

[0054] Fig. 9 This is a diagram of the internal structure of the electronic device provided by the present invention. DETAILED DESCRIPTION

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

[0056] Combine the following Figures 1 to 9 The present invention describes the industry intelligent agent automatic fine-tuning method, device, electronic device and storage medium.

[0057] like Figure 1 As shown, in one embodiment, an industry agent automatic fine-tuning method includes the following steps:

[0058] Step S110, obtaining industry data and preprocessing the industry data, the industry data includes original documents of industry tasks and industry knowledge, and the preprocessing includes data analysis and data cleaning.

[0059] Specifically, the server obtains industry data of original documents containing industry tasks and industry knowledge, and performs preprocessing operations of data analysis and data cleaning on the industry data to obtain preprocessed industry data.

[0060] Combination Figure 2 As shown, in a specific embodiment, the industry agent automatic fine-tuning method provided by the present invention is implemented by an industry agent automatic fine-tuning component based on a language model, and its framework includes a data preprocessing module. In the process of industry data preprocessing, it includes parsing and cleaning the original documents of industry tasks and industry knowledge. Among them, industry tasks refer to user consultation questions, product recommendations, and business that needs to be handled in industry applications, and industry knowledge refers to industry theory and method descriptions, product descriptions, common QA, business process descriptions, etc.

[0061] In this embodiment, the data preprocessing module has the following functions:

[0062] Data collection: Collect data from a variety of sources, including business introductions, internal company databases, user interaction data, etc.

[0063] Data cleaning: Remove noise, fill in missing values, standardize data, and other steps to improve data quality and prepare for subsequent instruction generation.

[0064] Data conversion: including feature scaling, feature encoding, feature selection, and data normalization to adapt to the input requirements of the language model.

[0065] Step S120, using the thinking chain and thinking tree to construct an initial instruction-response pair, and generating a first instruction-response pair containing multiple steps based on the constructed initial instruction-response pair through speculative reasoning, so as to verify each step in the first instruction-response pair based on the preprocessed industry data.

[0066] Specifically, the server uses a thinking chain and a thinking tree to construct an initial instruction-response pair, and generates an instruction-response pair containing multiple steps, namely, a first instruction-response pair, based on the constructed initial instruction-response pair through speculative reasoning, so as to verify the authenticity of each step in the generated first instruction-response pair based on preprocessed industry data.

[0067] Combination Figure 2As shown, in a specific embodiment, the automatic fine-tuning method of the industry intelligent agent provided by the present invention also includes a command-response pair generation module in its framework. In the process of generating the command-response pair, the command-response pair is constructed by using the thinking chain and the thinking tree, and the command-response pair containing multiple steps is generated in parallel by speculative reasoning generation, so as to expand the diversity of the generated command data. Relevant factual content is retrieved from the obtained industry tasks and industry knowledge, and the authenticity of each step in the generated command-response pair is verified to iteratively adjust the generated content and eliminate information that does not conform to the factual content.

[0068] In this embodiment, the instruction-response pair generation module is used to construct an instruction-response parallel generation method using speculative reasoning, encourage the language model to generate diverse instruction data, generate intermediate reasoning steps through the Chain of Thought (CoT) and the Tree of Thoughts (ToT), retrieve industry tasks and knowledge, and provide feedback to adjust the corresponding step strategies, thereby increasing the effectiveness and credibility of the generated instruction data.

[0069] Step S130, extracting meta-knowledge from the first instruction-response pair through the instruction encoder, and guiding the instruction encoder to generate a second instruction-response pair through the meta-knowledge, wherein the meta-knowledge includes the task type, associated industry knowledge and skill types to which the first instruction-response pair belongs.

[0070] Specifically, the server extracts meta-knowledge including the task type, associated industry knowledge and skill type to which the first instruction response pair belongs from the first instruction response pair generated in step S120 through the instruction encoder, and guides the instruction encoder to generate a new instruction response pair, namely, the second instruction response pair, through the meta-knowledge.

[0071] Combination Figure 2 As shown, in a specific embodiment, the automatic fine-tuning method of an industry agent provided by the present invention also includes a command encoder module in its framework. During the application of the command encoder, the command encoder is used to extract meta-knowledge from the generated command-response pair. The extracted meta-knowledge includes: the task type to which the command-response pair belongs, the industry knowledge involved, the type of skills used, etc. Then, the command decoder is guided by the obtained meta-knowledge to generate a new command-response pair, and the correlation between the new command-response pair and the original command data is maintained.

[0072] In this embodiment, the instruction encoder module is used to encode the synthesized instruction-response pair into highly abstract meta-knowledge, reduce the noise in the synthesized instruction data, and compress and extract key information that is highly relevant to the industry task. In addition, the decoder is used to combine the meta-knowledge with the original instruction-response pair to generate new instruction data while maintaining the relevance to the original instruction data.

[0073] Step S140, evaluating the second instruction-response pairs from multiple dimensions to obtain evaluation scores of the second instruction-response pairs in the industry task, and removing the second instruction-response pairs whose evaluation scores are lower than a first threshold.

[0074] Specifically, the server evaluates the second instruction-response pair generated in step S130 from multiple dimensions to obtain the evaluation score of the second instruction-response pair in the industry task, and removes the second instruction-response pairs whose evaluation scores are lower than the set first threshold to implement the screening of the newly generated instruction-response pairs.

[0075] Step S150 , adding the second instruction response pairs whose difference exceeds the second threshold to the fine-tuning data set through similarity determination, and discarding the second instruction response pairs whose difference is lower than the second threshold.

[0076] Specifically, the server adds the second instruction response pairs whose difference exceeds the set second threshold to the fine-tuning data set through similarity judgment, and discards the second instruction response pairs whose difference is lower than the second threshold, so as to further screen the generated new instruction response pairs and obtain high-quality instruction data.

[0077] Combination Figure 2 As shown, in a specific embodiment, the automatic fine-tuning method of an industry agent provided by the present invention also includes a framework of an instruction data evaluation and screening module. In the process of instruction data evaluation and screening, the obtained new instruction-response pairs are evaluated from multiple dimensions such as task completion accuracy, tool usage accuracy, context consistency, task relevance, etc. According to the evaluation results, the reward of the data with a higher score is set to 1, and the reward of the data with a lower score is set to 0. Then, the original output of the language model is compared with the newly generated instruction-response pairs, and the synthetic instruction data with a greater improvement in model fine-tuning is screened out using similarity discrimination.

[0078] In this embodiment, the instruction data evaluation and screening module is used to evaluate the effectiveness and correctness of the generated instruction data from the dimensions of accuracy, consistency, relevance, etc., obtain the evaluation score of the generated data in the industry task, and remove the erroneous data with low scores. Through similarity judgment, the instruction data with higher differences are added to the fine-tuning data set, and the instruction data with low differences are discarded. Among them, different differences represent the difficulty of the model to complete the current task. Using instruction data with higher differences to fine-tune the model can more efficiently improve the model's task processing capabilities.

[0079] Step S160 , training and fine-tuning a language model for industry applications based on the second instruction response in the fine-tuning data set and the instruction data set combined with the industry data, so as to improve the performance of the language model in a multi-task environment.

[0080] Specifically, the server trains and fine-tunes the language model for industry applications based on the second instruction response selected from the fine-tuning dataset and the instruction dataset combined with the industry data to update the model parameters, thereby improving the performance of the language model in the industry multi-task environment.

[0081] Combination Figure 2 As shown, in a specific embodiment, the industry agent automatic fine-tuning method provided by the present invention, the framework of which also includes a model fine-tuning module. During the model fine-tuning process, the model parameters of the language model are fine-tuned using previously screened synthetic instruction-response data to enhance the model's ability to handle complex industry tasks.

[0082] In this embodiment, the model fine-tuning module is used to convert the generated command-response data into the ReAct format, and then mix the command data sets of different industry tasks and scenarios to fine-tune the language model for industry applications to improve the performance of the model in a multi-task environment. In addition, low-rank adaptation (LoRA) technology is used in the fine-tuning stage to achieve more efficient parameter updates and model optimization, and improve the model's industry task processing capabilities and reasoning speed.

[0083] In practical applications, for example, the original data:

[0084] Technical guidance for winter vegetable production: Before winter, choose windless weather to replace worn-out greenhouse films. For the production of fruit and vegetable greenhouses, multifunctional plastic films with longevity, non-toxicity, high light transmittance and high heat preservation should be selected, and the film thickness should be above 0.10mm. A scattered light film with a haze of about 40% can also be selected for the solar greenhouse cultivated in the east-west ridge direction. Insulating coverings that are damaged or whose insulation performance does not meet the needs of winter production should be replaced in time. Generally, the weight of straw thatch should reach 3.5-4.0kg / m2, and the thickness of the insulation blanket should reach more than 2cm. When the outdoor temperature is lower than 10℃ at night, the solar greenhouse should be covered with insulation coverings in time to ensure that the night temperature in the greenhouse is above 15℃. From December to February of the following year, the daytime temperature in the greenhouse is controlled at 26-32℃, the temperature in the first half of the night is maintained at 18-20℃, and the minimum temperature in the early morning is maintained at above 8℃. In winter, vegetables should be watered three times and not watered three times, that is, water on sunny days and not on cloudy days, water before noon and not in the afternoon, and water in small amounts and not in large amounts. Watering should be done in the mornings of consecutive sunny days, and the water temperature should be above 10°C. Organic fertilizer + water-fertilizer integrated technology should be used for water and fertilizer management to improve water and fertilizer utilization efficiency. For plants affected by chilling or freezing damage, amino acid foliar fertilizers containing medium and trace elements or low-temperature inducers can be sprayed.

[0085] Command-Response Pair Generation

[0086] {

[0087] <|id|>: 1,

[0088] <|question|>: How to replace and select greenhouse insulation materials?

[0089] <|answer|>: Replace the damaged insulation covering. The weight of the straw thatch should reach 4.0kg / m² and the thickness of the insulation blanket should reach more than 2cm.

[0090] }

[0091] Instruction encoding

[0092] {

[0093] <|id|>: 1,

[0094] <|question|>: How to replace and select greenhouse insulation materials?

[0095] <|answer|>: Replace the damaged insulation covering. The weight of the straw thatch should reach 4.0kg / m² and the thickness of the insulation blanket should reach more than 2cm.

[0096] <|task_type|>: Agricultural production and management

[0097] <|knowledge|>: Facility agriculture, greenhouse environment control

[0098] <|skills|>: Insulation material selection, greenhouse management, environmental control

[0099] }

[0100] Instruction decoding

[0101] {

[0102] <|id|>: 1,

[0103] <|question|>: How to replace and choose the insulation cover of the greenhouse? ,

[0104] <|answer|>: Replace the insulation covering that is damaged or whose insulation performance does not meet the winter production requirements in time. Generally, the weight of the straw thatch should reach 3.5-4.0kg / m², and the thickness of the insulation blanket should reach more than 2cm. When the outdoor temperature is lower than 10℃ at night, the insulation covering should be covered in time to ensure that the night temperature in the greenhouse is above 15℃.

[0105] }

[0106] Data evaluation screening

[0107] {

[0108] <|id|>: 1,

[0109] <|question|>: How to replace and choose the insulation cover of the greenhouse?

[0110] <|thought|>: In winter vegetable production, the insulation cover directly affects the greenhouse's insulation effect and crop growth, and its replacement timing and standards need to be clarified.

[0111] <|action|>: List the technical standards for thermal insulation coverings and analyze how to choose a covering solution based on temperature.

[0112] <|observation|>: The weight and thickness of the insulation cover must meet production requirements. When the outside temperature is below 10°C at night, timely covering with insulation can maintain the night temperature of the greenhouse.

[0113] <|answer|>: Replace the insulation covering that is damaged or whose insulation performance does not meet the winter production requirements in time. Generally, the weight of the straw thatch should reach 3.5-4.0kg / m², and the thickness of the insulation blanket should reach more than 2cm. When the outdoor temperature is lower than 10℃ at night, the insulation covering should be covered in time to ensure that the night temperature in the greenhouse is above 15℃.

[0114] <|reward|>: 1

[0115] <|similarity|>: 0.76

[0116] }

[0117] The above-mentioned industry agent automatic fine-tuning method obtains industry data and preprocesses the industry data, uses thinking chains and thinking trees to construct initial instruction response pairs, and generates instruction response pairs containing multiple steps based on the constructed initial instruction response pairs through speculative reasoning, so as to verify each step in the instruction response pair based on the preprocessed industry data. Subsequently, the instruction encoder extracts meta-knowledge from the instruction response pair, and guides the instruction encoder to generate new instruction response pairs through meta-knowledge. After that, the second instruction response pair is evaluated from multiple dimensions to obtain the evaluation score of the new instruction response pair in the industry task, and the instruction response pairs with evaluation scores lower than the first threshold are removed. Then, the new instruction response pairs with higher differences are added to the fine-tuning data set through similarity judgment, and the new instruction response pairs with lower differences are discarded. Finally, the language model for industry applications is trained and fine-tuned based on the new instruction response pairs in the screened fine-tuning data set combined with the instruction data set of industry data to improve the performance of the language model in a multi-task environment. This method encodes the thought chains and task planning contents generated in industry applications as meta-knowledge, and evaluates and selects high-quality instruction data during the decoding process for fine-tuning the language model. The model is fine-tuned in the intermediate process of processing the thought chains and task planning generated by industry tasks, and the model parameters of the industry agent are accelerated. It does not rely on data labeling by professionals and is suitable for scenarios in industry applications where it is difficult to obtain a large amount of manual instruction data in a short period of time. It improves the task completion accuracy and task reasoning efficiency in complex industry tasks, and is more conducive to promotion and use.

[0118] like Figure 3 As shown, in one embodiment, the industry agent automatic fine-tuning method provided by the present invention obtains industry data and pre-processes the industry data, specifically comprising the following steps:

[0119] Step S112, obtaining industry data from multiple sources, including business introductions, company internal databases, and user interaction data.

[0120] Step S114, performing data cleaning operations such as denoising, filling missing values, and data standardization on the industry data, and performing data conversion on the cleaned industry data to adapt to the input requirements of the language model.

[0121] Among them, data transformation includes feature scaling, feature encoding, feature selection and data normalization.

[0122] like Figure 4As shown, in one embodiment, the industry agent automatic fine-tuning method provided by the present invention uses a thinking chain and a thinking tree to construct an initial instruction response pair, and generates a first instruction response pair including multiple steps according to the constructed initial instruction response pair through speculative reasoning, so as to verify each step in the first instruction response pair based on the preprocessed industry data, specifically including the following steps:

[0123] Step S122, constructing an instruction-response parallel generation algorithm through speculative reasoning to encourage the language model to generate diversified instruction data, and generate intermediate reasoning steps through thought chains and thought trees.

[0124] Step S124, searching the industry tasks and industry knowledge based on the intermediate reasoning steps to obtain factual contents in the industry tasks and industry knowledge that are associated with the intermediate reasoning steps.

[0125] Step S126, verify the authenticity of each step in the intermediate reasoning steps based on the factual content, and iteratively adjust the intermediate reasoning steps according to the verification results to eliminate the step strategies in the intermediate reasoning steps that are inconsistent with the factual content.

[0126] like Figure 5 As shown, in one embodiment, the industry agent automatic fine-tuning method provided by the present invention extracts meta-knowledge from the first instruction-response pair through the instruction encoder, and guides the instruction encoder to generate the second instruction-response pair through the meta-knowledge, specifically comprising the following steps:

[0127] Step S132, encoding the first instruction-response pair into meta-knowledge through an instruction encoder to reduce noise in the first instruction-response pair, and compressing and extracting key information from the first instruction-response pair whose relevance to the corresponding industry task is higher than a third threshold.

[0128] Step S134: Generate new instruction data according to the meta-knowledge and the first instruction-response pair through the decoder, and the new instruction data is the second instruction-response pair.

[0129] like Figure 6 As shown, in one embodiment, the industry agent automatic fine-tuning method provided by the present invention includes multiple dimensions including task completion, tool usage, context consistency and task relevance. Based on the second instruction response in the fine-tuning data set, the instruction data set combined with the industry data is used to train and fine-tune the language model for industry applications to improve the performance of the language model in a multi-task environment, and the following steps are also included:

[0130] Step S610, evaluating the second instruction response pair from the perspective of task completion, tool usage, context consistency, and task relevance, and marking the data reward of the second instruction response according to the evaluation result.

[0131] Step S620, compare the original output of the language model with the annotated second instruction response pair, filter out the second instruction response pairs whose data rewards are annotated with the first value and whose difference exceeds the second threshold through similarity judgment, and remove the second instruction response pairs whose data rewards are annotated with the second value and whose difference is lower than the second threshold.

[0132] Among them, the data reward of the second instruction response pair whose evaluation score exceeds the first threshold is marked as a first value, and the data reward of the second instruction response pair whose evaluation score is lower than the first threshold is marked as a second value.

[0133] like Figure 7 As shown, in one embodiment, the industry agent automatic fine-tuning method provided by the present invention trains and fine-tunes the language model for industry applications based on the second instruction response in the fine-tuning data set combined with the instruction data set of the industry data to improve the performance of the language model in a multi-task environment, specifically comprising the following steps:

[0134] Step S162: convert the second instruction-response pair in the fine-tuning data set into a ReAct format to obtain a second instruction-response pair in the ReAct format.

[0135] Step S164, using low-rank adaptation technology to fine-tune the language model for industry applications based on the second instruction-response pairs in ReAct format and instruction data sets of different industry tasks and usage scenarios to update the model parameters of the language model.

[0136] The industry intelligent agent automatic fine-tuning device provided by the present invention is described below. The industry intelligent agent automatic fine-tuning device described below and the industry intelligent agent automatic fine-tuning method described above can be referenced to each other.

[0137] like Figure 8 As shown, in one embodiment, an automatic fine-tuning device for an industry intelligent agent includes a data preprocessing module 810, an instruction response pair generation module 820, an instruction encoder module 830, an instruction data evaluation module 840, a similarity judgment module 850 and a model fine-tuning module 860.

[0138] The data preprocessing module 810 is used to obtain industry data and preprocess the industry data. The industry data includes original documents of industry tasks and industry knowledge. The preprocessing includes data analysis and data cleaning.

[0139] The instruction-response pair generation module 820 is used to construct an initial instruction-response pair using a thinking chain and a thinking tree, and to generate a first instruction-response pair comprising multiple steps based on the constructed initial instruction-response pair through speculative reasoning, so as to verify each step in the first instruction-response pair based on preprocessed industry data.

[0140] The instruction encoder module 830 is used to extract meta-knowledge from the first instruction-response pair through the instruction encoder, and guide the instruction encoder to generate a second instruction-response pair through the meta-knowledge. The meta-knowledge includes the task type, associated industry knowledge and skill types to which the first instruction-response pair belongs.

[0141] The instruction data evaluation module 840 is used to evaluate the second instruction response pairs from multiple dimensions to obtain the evaluation scores of the second instruction response pairs in the industry task, and remove the second instruction response pairs whose evaluation scores are lower than the first threshold.

[0142] The similarity determination module 850 is used to add the second instruction response pairs whose difference exceeds the second threshold to the fine-tuning data set through similarity determination, and discard the second instruction response pairs whose difference is lower than the second threshold.

[0143] The model fine-tuning module 860 is used to train and fine-tune the language model for industry applications based on the second instruction response in the fine-tuning data set combined with the instruction data set of the industry data, so as to improve the performance of the language model in a multi-task environment.

[0144] In this embodiment, the industry agent automatic fine-tuning device provided by the present invention, the data preprocessing module 810 is specifically used for:

[0145] Industry data is obtained from a variety of sources, including business profiles, internal company databases, and user interaction data.

[0146] Perform data cleaning operations on industry data such as denoising, filling missing values, and data standardization, and then perform data conversion on the cleaned industry data to meet the input requirements of the language model.

[0147] Among them, data transformation includes feature scaling, feature encoding, feature selection and data normalization.

[0148] In this embodiment, the industry agent automatic fine-tuning device provided by the present invention, the instruction response pair generation module 820 is specifically used for:

[0149] A command-response parallel generation algorithm is constructed through speculative reasoning to encourage the language model to generate diverse command data, and intermediate reasoning steps are generated through thought chains and thought trees.

[0150] Industry tasks and industry knowledge are retrieved based on the intermediate reasoning steps to obtain factual content associated with the intermediate reasoning steps in the industry tasks and industry knowledge.

[0151] In this embodiment, the industry agent automatic fine-tuning device provided by the present invention, the instruction response pair generation module 820 is specifically used for:

[0152] The authenticity of each step in the intermediate reasoning steps is verified based on the factual content, and the intermediate reasoning steps are iteratively adjusted according to the verification results to eliminate the step strategies in the intermediate reasoning steps that are inconsistent with the factual content.

[0153] In this embodiment, the industry agent automatic fine-tuning device provided by the present invention, the instruction encoder module 830 is specifically used for:

[0154] The first instruction-response pair is encoded into meta-knowledge through an instruction encoder to reduce noise in the first instruction-response pair, and key information with a correlation with the corresponding industry task higher than a third threshold is compressed and extracted from the first instruction-response pair.

[0155] The decoder generates new instruction data according to the meta-knowledge and the first instruction-response pair, and the new instruction data is the second instruction-response pair.

[0156] In this embodiment, the industry agent automatic fine-tuning device provided by the present invention has multiple dimensions including task completion, tool usage, context consistency and task relevance, and also includes an instruction data screening module for:

[0157] The second instruction response pairs are evaluated in terms of task completion, tool usage, context consistency, and task relevance, and the data reward for the second instruction response is labeled based on the evaluation results.

[0158] Compare the original output of the language model with the annotated second instruction response pairs, and screen out the second instruction response pairs whose data rewards are annotated with the first value and whose difference exceeds the second threshold through similarity judgment, and remove the second instruction response pairs whose data rewards are annotated with the second value and whose difference is lower than the second threshold.

[0159] Among them, the data reward of the second instruction response pair whose evaluation score exceeds the first threshold is marked as a first value, and the data reward of the second instruction response pair whose evaluation score is lower than the first threshold is marked as a second value.

[0160] In this embodiment, the industry agent automatic fine-tuning device provided by the present invention, the second instruction response pair in the fine-tuning data set is a second instruction response pair whose screened data reward is marked as a first value and whose difference exceeds a second threshold, and the model fine-tuning module 860 is specifically used for:

[0161] The second instruction response pairs in the fine-tuning data set are converted into the ReAct format to obtain the second instruction response pairs in the ReAct format.

[0162] Low-rank adaptation technology is used to fine-tune the language model for industry applications based on the second instruction-response pairs in the ReAct format and instruction datasets of different industry tasks and usage scenarios to update the model parameters of the language model.

[0163] Fig. 9 An example of a physical structure diagram of an electronic device is shown. The electronic device may be a smart terminal, and its internal structure diagram may be as follows: Fig. 9 As shown. The electronic device includes a processor, an internal memory and a network interface connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes 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 electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, an automatic fine-tuning method for an industry intelligent agent is implemented, and the method includes:

[0164] Obtain industry data and pre-process it. Industry data includes original documents of industry tasks and industry knowledge. Pre-processing includes data analysis and data cleaning.

[0165] An initial instruction-response pair is constructed by using a thinking chain and a thinking tree, and a first instruction-response pair including a plurality of steps is generated according to the constructed initial instruction-response pair by using speculative reasoning, so as to verify each step in the first instruction-response pair based on preprocessed industry data;

[0166] Extracting meta-knowledge from the first instruction-response pair through the instruction encoder, and guiding the instruction encoder to generate a second instruction-response pair through the meta-knowledge, wherein the meta-knowledge includes the task type, associated industry knowledge, and skill types to which the first instruction-response pair belongs;

[0167] Evaluate the second instruction-response pairs from multiple dimensions to obtain evaluation scores of the second instruction-response pairs in the industry task, and remove the second instruction-response pairs whose evaluation scores are lower than a first threshold;

[0168] By similarity determination, the second instruction response pairs whose difference exceeds the second threshold are added to the fine-tuning data set, and the second instruction response pairs whose difference is lower than the second threshold are discarded;

[0169] Based on the second instruction response in the fine-tuning dataset, the language model for industry applications is trained and fine-tuned on the instruction dataset combined with the industry data to improve the performance of the language model in a multi-task environment.

[0170] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present invention, and does not constitute a limitation on the electronic device to which the scheme of the present invention is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0171] On the other hand, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, implements an automatic fine-tuning method for an industry agent, the method comprising:

[0172] Obtain industry data and pre-process it. Industry data includes original documents of industry tasks and industry knowledge. Pre-processing includes data analysis and data cleaning.

[0173] An initial instruction-response pair is constructed by using a thinking chain and a thinking tree, and a first instruction-response pair including a plurality of steps is generated according to the constructed initial instruction-response pair by using speculative reasoning, so as to verify each step in the first instruction-response pair based on preprocessed industry data;

[0174] Extracting meta-knowledge from the first instruction-response pair through the instruction encoder, and guiding the instruction encoder to generate a second instruction-response pair through the meta-knowledge, wherein the meta-knowledge includes the task type, associated industry knowledge, and skill types to which the first instruction-response pair belongs;

[0175] Evaluate the second instruction-response pairs from multiple dimensions to obtain evaluation scores of the second instruction-response pairs in the industry task, and remove the second instruction-response pairs whose evaluation scores are lower than a first threshold;

[0176] By similarity determination, the second instruction response pairs whose difference exceeds the second threshold are added to the fine-tuning data set, and the second instruction response pairs whose difference is lower than the second threshold are discarded;

[0177] Based on the second instruction response in the fine-tuning dataset, the language model for industry applications is trained and fine-tuned on the instruction dataset combined with the industry data to improve the performance of the language model in a multi-task environment.

[0178] In another aspect, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and when the processor executes the computer instructions, an automatic fine-tuning method for an industry agent is implemented, the method comprising:

[0179] Obtain industry data and pre-process it. Industry data includes original documents of industry tasks and industry knowledge. Pre-processing includes data analysis and data cleaning.

[0180] An initial instruction-response pair is constructed by using a thinking chain and a thinking tree, and a first instruction-response pair including a plurality of steps is generated according to the constructed initial instruction-response pair by using speculative reasoning, so as to verify each step in the first instruction-response pair based on preprocessed industry data;

[0181] Extracting meta-knowledge from the first instruction-response pair through the instruction encoder, and guiding the instruction encoder to generate a second instruction-response pair through the meta-knowledge, wherein the meta-knowledge includes the task type, associated industry knowledge, and skill types to which the first instruction-response pair belongs;

[0182] Evaluate the second instruction-response pairs from multiple dimensions to obtain evaluation scores of the second instruction-response pairs in the industry task, and remove the second instruction-response pairs whose evaluation scores are lower than a first threshold;

[0183] By similarity determination, the second instruction response pairs whose difference exceeds the second threshold are added to the fine-tuning data set, and the second instruction response pairs whose difference is lower than the second threshold are discarded;

[0184] Based on the second instruction response in the fine-tuning dataset, the language model for industry applications is trained and fine-tuned on the instruction dataset combined with the industry data to improve the performance of the language model in a multi-task environment.

[0185] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related 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 by the present invention may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory.

[0186] By way of 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), etc.

[0187] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0188] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations 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 subject to the attached claims.

Claims

1. An automatic fine-tuning method for an industry agent, characterized in that: The method comprises: Acquire industry data and pre-process the industry data, wherein the industry data includes original documents of industry tasks and industry knowledge, and the pre-processing includes data analysis and data cleaning; An initial instruction-response pair is constructed by using a thinking chain and a thinking tree, and a first instruction-response pair including a plurality of steps is generated according to the constructed initial instruction-response pair by using speculative reasoning, so as to verify each step in the first instruction-response pair based on the preprocessed industry data; The initial instruction response pair is constructed by using the thinking chain and the thinking tree, and a first instruction response pair including multiple steps is generated according to the constructed initial instruction response pair through speculative reasoning, so as to verify each step in the first instruction response pair based on the preprocessed industry data, including: Constructing a command-response parallel generation algorithm through the speculative reasoning to encourage the language model to generate diversified command data, and generating intermediate reasoning steps through the thought chain and thought tree; Retrieving the industry tasks and industry knowledge based on the intermediate reasoning steps to obtain factual contents in the industry tasks and industry knowledge associated with the intermediate reasoning steps; Performing authenticity verification on each step in the intermediate reasoning steps based on the fact content, and iteratively adjusting the intermediate reasoning steps according to the verification results to eliminate step strategies in the intermediate reasoning steps that are inconsistent with the fact content; Extracting meta-knowledge from the first instruction-response pair through an instruction encoder, and guiding the instruction encoder to generate a second instruction-response pair through the meta-knowledge, wherein the meta-knowledge includes a task type, associated industry knowledge, and skill type to which the first instruction-response pair belongs; Evaluate the second instruction-response pair from multiple dimensions to obtain an evaluation score of the second instruction-response pair in the industry task, and remove the second instruction-response pair whose evaluation score is lower than a first threshold; By similarity determination, the second instruction response pairs whose difference exceeds the second threshold are added to the fine-tuning data set, and the second instruction response pairs whose difference is lower than the second threshold are discarded; Based on the second instruction response in the fine-tuning data set, the language model for industry applications is trained and fine-tuned in combination with the instruction data set of the industry data to improve the performance of the language model in a multi-task environment.

2. The automatic fine-tuning method of industry intelligence according to claim 1 is characterized in that: The obtaining of industry data and preprocessing of the industry data include: Acquire the industry data from a variety of sources, including business introductions, internal company databases, and user interaction data; Performing data cleaning operations such as denoising, filling missing values, and data standardization on the industry data, and performing data conversion on the cleaned industry data to adapt to the input requirements of the language model; The data conversion includes feature scaling, feature encoding, feature selection and data normalization.

3. The automatic fine-tuning method of industry intelligence according to claim 1 is characterized in that: The extracting meta-knowledge from the first instruction-response pair by the instruction encoder, and guiding the instruction encoder to generate a second instruction-response pair by the meta-knowledge, comprises: The first instruction-response pair is encoded into the meta-knowledge by the instruction encoder to reduce noise in the first instruction-response pair, and key information having a correlation with the corresponding industry task higher than a third threshold value is compressed and extracted from the first instruction-response pair; A decoder generates new instruction data according to the meta-knowledge and the first instruction-response pair, and the new instruction data is the second instruction-response pair.

4. The automatic fine-tuning method of industry intelligence according to claim 1 is characterized in that: The multiple dimensions include task completion, tool usage, contextual consistency, and task relevance; The second instruction response in the fine-tuning data set is used to train and fine-tune the language model for industry applications in combination with the instruction data set of the industry data to improve the performance of the language model in a multi-task environment, and the method also includes: Evaluating the second instruction response pair based on the task completion, tool usage, context consistency, and task relevance, and marking the data reward of the second instruction response according to the evaluation result; Comparing the original output of the language model with the annotated second instruction response pair, filtering out the second instruction response pairs whose data reward is annotated with the first value and whose difference exceeds the second threshold through similarity discrimination, and removing the second instruction response pairs whose data reward is annotated with the second value and whose difference is lower than the second threshold; Among them, the data reward of the second instruction response pair whose evaluation score exceeds the first threshold is marked as the first value, and the data reward of the second instruction response pair whose evaluation score is lower than the first threshold is marked as the second value.

5. The automatic fine-tuning method of industry intelligence according to claim 4 is characterized in that: The second instruction response pair in the fine-tuning data set is a second instruction response pair in which the screened data reward is marked with a first value and the difference exceeds a second threshold; The training and fine-tuning of the language model for industry applications based on the second instruction response in the fine-tuning data set combined with the instruction data set of the industry data to improve the performance of the language model in a multi-task environment includes: Converting the second instruction response pair in the fine-tuning data set into a ReAct format to obtain a second instruction response pair in the ReAct format; A low-rank adaptation technique is used to fine-tune the language model for industry applications based on the second instruction-response pairs in the ReAct format and instruction data sets of different industry tasks and usage scenarios to update the model parameters of the language model.

6. An automatic fine-tuning device for an industry intelligent agent, characterized in that: Used to implement the industry agent automatic fine-tuning method according to any one of claims 1 to 5, the device comprises: A data preprocessing module, used to obtain industry data and preprocess the industry data, wherein the industry data includes original documents of industry tasks and industry knowledge, and the preprocessing includes data analysis and data cleaning; An instruction-response pair generation module, used for constructing an initial instruction-response pair by using a thinking chain and a thinking tree, and generating a first instruction-response pair including a plurality of steps according to the constructed initial instruction-response pair by speculative reasoning, so as to verify each step in the first instruction-response pair based on the preprocessed industry data; The instruction response pair generation module is specifically used for: Constructing a command-response parallel generation algorithm through speculative reasoning to encourage the language model to generate diverse command data and generate intermediate reasoning steps through thought chains and thought trees; Retrieve industry tasks and industry knowledge based on the intermediate reasoning steps to obtain factual contents in the industry tasks and industry knowledge that are associated with the intermediate reasoning steps; Perform authenticity verification on each step in the intermediate reasoning steps based on the factual content, and iteratively adjust the intermediate reasoning steps according to the verification results to eliminate the step strategies in the intermediate reasoning steps that are inconsistent with the factual content; An instruction encoder module, configured to extract meta-knowledge from the first instruction-response pair through an instruction encoder, and guide the instruction encoder to generate a second instruction-response pair through the meta-knowledge, wherein the meta-knowledge includes a task type, associated industry knowledge, and skill type to which the first instruction-response pair belongs; an instruction data evaluation module, configured to evaluate the second instruction response pair from multiple dimensions to obtain an evaluation score of the second instruction response pair in the industry task, and remove the second instruction response pair whose evaluation score is lower than a first threshold; a similarity determination module, configured to add the second instruction response pairs whose difference exceeds a second threshold to the fine-tuning data set through similarity determination, and discard the second instruction response pairs whose difference is lower than the second threshold; A model fine-tuning module is used to train and fine-tune a language model for industry applications based on a second instruction response in the fine-tuning data set combined with the instruction data set of the industry data, so as to improve the performance of the language model in a multi-task environment.

7. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the industry agent automatic fine-tuning method described in any one of claims 1 to 5 are implemented.

8. A computer storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the industry agent automatic fine-tuning method described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Safety-critical software failure mode identification method based on large language model

    CN117648404A

  • Model training method and device based on thinking chain

    CN118114770A