Multi-agent data analysis method, system, computer and medium based on large language model

Through the multi-agent data analysis method based on large language model, programmers and inspector agents are trained, and the problems of diversity of skills and low communication efficiency in big data analysis are solved, efficient data analysis without programming knowledge is achieved, and the reliability and accuracy of the code is ensured.

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

Patent Information

Application Number
CN202411841704.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the field of big data analysis, analysts need to have multiple skills, such as data mining, statistical analysis, mathematical model construction and programming skills. However, experts often only have professional knowledge, which makes it impossible for artificial intelligence models to communicate effectively between experts.

Method used

Through the multi-agent data analysis method based on large language models, programmer agents and inspector agents are trained, and parameters are fine-tuned and optimized using low-rank decomposition and reward models to achieve efficient processing of natural language and code generation.

Benefits of technology

Data analysis is performed without the need for users to have programming knowledge. Multi-agent collaborative algorithms and self-correction mechanisms ensure the reliability and accuracy of the code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759360A_ABST
    Figure CN119759360A_ABST
Patent Text Reader

Abstract

The present invention discloses a multi-agent data analysis method, system, computer and medium based on a large language model, the method comprising the following steps: training a programmer agent and an inspector agent according to a pre-trained large language model; in response to a prompt input to the programmer agent, causing the programmer agent to output a response code and execute it according to the prompt; monitoring the execution result of the response code in real time, and when the response code executes incorrectly, causing the inspector agent to obtain the response code, check the response code, and output modification suggestions; the programmer agent optimizes the response code according to the modification suggestions, and re-outputs the response code. The present invention can perform data analysis without the user having programming knowledge. The multi-agent collaborative algorithm and self-correction mechanism ensure the reliability and accuracy of the code.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data analysis technology, and in particular to a multi-agent data analysis method, system, computer and medium based on a large language model. Background Art

[0002] Over the past decade, data-driven approaches using deep neural networks have driven the success of artificial intelligence in a variety of challenging applications in different fields, such as image processing, video processing, speech recognition, natural language processing, etc.

[0003] However, the above methods face challenges in data science applications, especially in the fields of big data analysis in biology, healthcare, and business. In the task of using data-driven methods of deep neural networks to analyze big data in the above fields, analysts need to have data mining, statistical analysis, mathematical model construction, code writing capabilities, and deep professional knowledge in the corresponding fields. However, experts in the above fields often only have professional knowledge in their respective fields and lack sufficient mathematical model construction and code writing capabilities. As a result, in the task of using data-driven methods of deep neural networks to analyze big data in the above fields, experts in various fields and advanced artificial intelligence models cannot communicate effectively. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the technical problem to be solved by the present invention is to provide a multi-agent data analysis method, system, computer and device based on a large language model that can perform data analysis without the user having programming knowledge.

[0005] In order to solve the above technical problems, a technical solution adopted by the present invention is to provide a multi-agent data analysis method based on a large language model, comprising the following steps:

[0006] S1: Train the programmer agent and the checker agent based on the pre-trained large language model;

[0007] S2: In response to a prompt input to the programmer agent, the programmer agent outputs a response code and executes it according to the prompt;

[0008] S3: monitor the execution result of the response code in real time, and when the response code is executed incorrectly, enable the inspector agent to obtain the response code, check the response code, and output modification suggestions;

[0009] S4: The programmer agent optimizes the response code according to the modification suggestions and re-outputs the response code.

[0010] Furthermore, after step S4, the following steps are also included:

[0011] S5: the inspector agent checks the response code re-output by the programmer agent and outputs modification suggestions;

[0012] S6: Repeat the steps S4-S5 until the response code is successfully executed or the preset number of checks is reached.

[0013] Furthermore, after step S6, the method further includes the following steps:

[0014] S7: If the response code still executes incorrectly after reaching the preset number of checks, the user can directly modify the code.

[0015] Furthermore, the step S1 includes the following sub-steps:

[0016] S11: Determine the programmer weight update matrix and perform low-rank decomposition on the programmer weight update matrix:

[0017]

[0018] Where W represents the programmer agent weight update matrix; W0 represents the pre-trained model weight matrix; α represents the scaling factor, which represents the impact of the updated weight matrices A and B on the original weight matrix W0; n represents the rank of the updated weight matrices A and B; A and B both represent updated weight matrices;

[0019] S12: Obtain a sample set of programmer weight updates, and perform weight update training on the programmer agent to minimize the loss function:

[0020]

[0021] Among them, L represents the cross entropy loss function; M represents the number of samples; y i represents the actual value of the i-th sample, p i represents the predicted probability of the i-th sample.

[0022] Furthermore, the step S1 further includes the following sub-steps:

[0023] S13: Determine the inspector weight update matrix and perform low-rank decomposition on the programmer weight update matrix;

[0024] S14: Obtain an inspector weight update sample set, and perform weight update training on the inspector agent;

[0025] S15: Use the reward model to perform proximal policy optimization on the inspector agent.

[0026] Furthermore, in step S2, the following sub-steps are included:

[0027] S151: Input several prompts to the inspector agent, output several responses to each prompt, and sample each set of input prompts and corresponding responses;

[0028] S152: Rank the responses to each group of prompts in the sample according to human preferences, build a reward database, and build a reward model based on the reward database:

[0029]

[0030] Among them, r θ represents the weight, x represents the prompt, σ represents the sigmoid activation function, i represents the number of responses corresponding to each prompt, and y i ,y 1-i are responses to prompt x, and y i Ranked higher than y 1-i ;

[0031] S153: Constructing a reward model according to the reward database, and using the reward model to perform proximal strategy optimization on the inspector agent:

[0032]

[0033] Where γ represents the discount factor, r T Represents the estimated value of the advantage function at time T, where t is a constant.

[0034] Furthermore, in step S2, the following steps are included:

[0035] S21: The programmer agent obtains the context of the user input prompt;

[0036] S22: the programmer agent outputs a response code according to the context of the user input prompt and the input and output format;

[0037] S23: The programmer agent calls the code execution tool to execute the response code.

[0038] In order to solve the above technical problems, the second technical solution adopted by the present invention is to provide a multi-agent data analysis system based on a large language model, comprising:

[0039] An agent building module for training programmer agents and checker agents based on a pre-trained large language model;

[0040] A programmer response module, for responding to a prompt input to the programmer agent, causing the programmer agent to output a response code and execute it according to the prompt;

[0041] An inspector checking module is used to monitor the execution result of the response code in real time, and when the response code is executed incorrectly, the inspector agent obtains the response code, checks the response code, and outputs modification suggestions;

[0042] The code optimization module is used to enable the programmer agent to optimize the response code according to the modification suggestions and output the optimized code.

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

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

[0045] The multi-agent data analysis method, device, medium and system based on a large language model of the present invention have at least the following beneficial effects: the present invention trains the programmer agent and the inspector agent through a large language model, and fine-tunes the parameters of the programmer agent and the inspector agent through a low-rank adaptation method, thereby ensuring that the programmer agent and the inspector agent are biased towards the perception and processing of natural language and generated code, as well as between modification opinions and optimized code; through the reward model and proximal strategy optimization, the inspector agent can output results that meet human preferences; the present invention does not require the user to have programming knowledge, and can perform data analysis. The multi-agent collaborative algorithm and self-correction mechanism ensure the reliability and accuracy of the code. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0047] Figure 1 This is a flowchart of an implementation of a multi-agent data analysis method based on a large language model of the present invention.

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

[0049] Figure 3 for Figure 2 Sub-flow chart of step S15 in .

[0050] Figure 4 for Figure 1 Sub-flow chart of step S2 in .

[0051] Figure 5 This is a structural block diagram of an implementation scheme of a multi-agent data analysis system of the present invention. DETAILED DESCRIPTION

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

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

[0054] S1: Train the programmer agent and the checker agent based on the pre-trained large language model.

[0055] Specifically, the programmer agent and the inspector agent in this embodiment are trained by a pre-trained large language model. The large language model is a type of natural language processing model based on deep learning. It can use massive text data for training and learn the intrinsic connection between sentences and grammatical structures in natural language, so as to have powerful language understanding and generation capabilities. Based on its powerful language understanding and generation capabilities, the large language model is widely used in data analysis, content creation, and consulting services.

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

[0057] S11: Determine a programmer weight update matrix, and perform low-rank decomposition on the programmer weight update matrix.

[0058] Specifically, in this embodiment, since the programmer agent is trained by a pre-trained large language model, it already has the ability to generate code by recognizing natural language and optimize the code by recognizing modification opinions. However, large language models are often more general, and in order to improve the model's perception and processing capabilities between natural language and generated code, as well as between modification opinions and optimized code, it is also necessary to fine-tune the parameters of the large language model. Therefore, in this embodiment, the weight matrix of the large language model is fine-tuned using a low-rank decomposition method, which can improve the programmer agent's perception and processing capabilities between natural language and generated code, as well as between modification opinions and optimized code. Specifically, it is first necessary to determine the parameters that the programmer agent needs to fine-tune, which in this embodiment are the relationship weights between natural language and generated code, and the relationship weights between modification opinions and optimized code, and then perform a low-rank decomposition on the weight matrix:

[0059]

[0060] Among them, W represents the programmer agent weight update matrix; W0 represents the pre-trained model weight matrix; α represents the scaling factor, which represents the impact of the updated weight matrices A and B on the original weight matrix W0; n represents the rank of the updated weight matrices A and B; A and B both represent updated weight matrices.

[0061] S12: Obtain a programmer weight update sample set, and perform weight update training on the programmer agent to minimize the loss function.

[0062] Specifically, using low-rank decomposition to fine-tune the parameters of the pre-trained large language model requires additional sample data. In this embodiment, the sample data can use the pre-trained large language model to collect several groups of natural language and generated code, as well as prompts and responses for modification opinions and optimized code. At the same time, the collected prompts and responses are manually annotated to generate training samples. Using the training samples, the programmer agent is trained to update the weights to minimize the loss function. In this embodiment, cross entropy is used as the loss function:

[0063]

[0064] Among them, L represents the cross entropy loss function; M represents the number of samples; y i represents the actual value of the i-th sample, p i represents the predicted probability of the i-th sample.

[0065] In some implementations, this step S1 may also include the following sub-steps:

[0066] S13: Determine the inspector weight update matrix and perform low-rank decomposition on the programmer weight update matrix.

[0067] S14: Obtain an inspector weight update sample set, and perform weight update training on the inspector agent.

[0068] Specifically, the training of the inspector agent is similar to the training of the programmer agent mentioned above, and the main difference is that the parameters that the inspector agent needs to update are different from those of the programmer agent. In this embodiment, since the main function of the inspector agent is to check the response code and propose modification suggestions based on the response code and its execution results, the direction of fine-tuning its parameters is also to improve its perception and processing capabilities between the response code, execution results and modification suggestions. Furthermore, the sample data for parameter fine-tuning of the inspector agent can use a pre-trained large language model to collect several groups of response codes and their execution results, and the prompts and responses between the modification suggestions. The subsequent training process is similar to that of the programmer agent and will not be repeated here. It should be noted that the modification suggestions output by the above-mentioned inspector agent may include error detection, error diagnosis and code correction reference of the response code.

[0069] S15: Use the reward model to perform proximal policy optimization on the inspector agent.

[0070] Specifically, in this embodiment, a human feedback mechanism is also introduced into the training of the inspector agent. The proximal strategy of the inspector agent trained through steps S13-S14 is optimized using a reward model, so that the inspector agent can output a response that is most in line with human preferences based on the input prompts.

[0071] See also Figure 3 , this step S15 may include the following sub-steps:

[0072] S151: Input several prompts to the inspector agent, output several responses to each prompt, and sample each set of input prompts and corresponding responses.

[0073] Specifically, in the present embodiment, the reward data is collected by giving a number of prompts to the inspector agent trained through steps S13-S14, and outputting a number of responses to each prompt. In the present embodiment, for each input prompt, the inspector agent outputs 4-6 responses, and samples these prompts and the responses corresponding to the prompts, thereby facilitating the construction of the subsequent reward model.

[0074] S152: Rank the responses to each group of prompts in the sample according to human preferences, build a reward database, and build a reward model based on the reward database.

[0075] Specifically, in this implementation, based on the above sampling results, human preferences are used to rank the preferences of each group of responses. Then, based on the above preference rankings, a reward database is constructed, and a reward model is constructed using the reward database. Here, the construction of the reward model requires sampling of a special loss function, namely:

[0076]

[0077] Among them, r θ represents the weight, x represents the prompt, σ represents the sigmoid activation function, i represents the number of responses corresponding to each prompt, and y i ,y 1-i are responses to prompt x, and y i Ranked higher than y 1-i .

[0078] S153: Utilize the reward model to perform proximal strategy optimization on the inspector agent.

[0079] Specifically, in this embodiment, after the reward model is constructed, the proximal strategy optimization of the reward model can be used to adjust the inspector agent to output according to human preferences. The proximal strategy formula can be specifically expressed as:

[0080]

[0081] Where γ represents the discount factor, r T Represents the estimated value of the advantage function at time T, where t is a constant.

[0082] S2: In response to the prompt input to the programmer agent, the programmer agent outputs a response code and executes it according to the prompt.

[0083] Specifically, in this embodiment, the main responsibility of the programmer agent is to write code and respond to the user. However, the user generally does not have the ability to write code. Therefore, in this embodiment, the input of the programmer agent is the natural language provided by the user, and the output is the response code. After the user obtains the response code, he can use a specific mathematical model building tool to build a mathematical model based on the response code to perform data analysis.

[0084] In some embodiments, see Figure 4 , this step S2 may include the following sub-steps:

[0085] S21: The programmer agent obtains the context of the user input prompt;

[0086] S22: the programmer agent outputs a response code according to the context of the user input prompt and the input and output format;

[0087] Specifically, in this embodiment, the main responsibility of the programmer is to write code and respond to the user. After the user uploads the data set, the programmer will receive a special system prompt that outlines the programmer's role, environment context, and I / O format.

[0088] S23: The programmer agent calls the code execution tool to execute the response code.

[0089] Specifically, in this embodiment, after the programmer agent outputs a response code, it will not directly reply to the user. Before responding to the user, the response code needs to be executed and tested. The programmer agent based on the large language model can call the code execution tool through the interface, execute the response code, and obtain the execution result.

[0090] S3: Monitor the execution result of the response code in real time, and when the response code is executed incorrectly, enable the inspector agent to obtain the response code, check the response code, and output modification suggestions.

[0091] Specifically, when the programmer agent calls the program execution interface to execute the response code, an execution result will be returned. In this embodiment, the execution result will be obtained by the inspector agent together with the response code, so that the inspector agent can check the response code according to the execution result and the response code, and output modification suggestions, and the above-mentioned modification suggestions may include error codes, kernel error messages and code optimization suggestions.

[0092] S4: The programmer agent optimizes the response code according to the modification suggestions and re-outputs the response code.

[0093] Specifically, the programmer agent can obtain the modification suggestions given by the inspector agent. Since the programmer agent adjusts the relationship weights between the modification suggestions and the optimized code during the fine-tuning of the large language model parameters, the programmer agent can optimize the response code according to the above modification suggestions and output the optimized response code.

[0094] In order to iteratively check the response code and thus improve the code optimization effect, after step S4, the following steps are further included:

[0095] S5: The inspector agent checks the response code re-output by the programmer agent and outputs modification suggestions.

[0096] Specifically, in this embodiment, in order to further improve the optimization effect of the response code, the inspector agent can check the response code optimized by the programmer agent again and re-output modification suggestions.

[0097] S6: Repeat the steps S4-S5 until the response code is successfully executed or the preset number of checks is reached.

[0098] Specifically, in this embodiment, the collaboration process between the programmer agent and the checker agent will iterate multiple times until the code is successfully executed or the preset number of checks is reached.

[0099] In addition, in this embodiment, manual intervention can be introduced in the check of the response code. After step S6, the following steps are also included:

[0100] S7: If the response code still executes incorrectly after reaching the preset number of checks, the user can directly modify the code.

[0101] Specifically, in this embodiment, in order to deal with adverse situations and improve its reliability and flexibility, a manual intervention mechanism is integrated into the workflow. After the inspector agent has checked the response code for a preset number of times, and the response code optimized by the programmer agent still executes incorrectly, this function allows the user to directly modify and run the response code and intervene when necessary.

[0102] See also Figure 5 , is a structural block diagram of an embodiment of a multi-agent data analysis system based on a large language model of the present invention. The multi-agent data analysis system based on a large language model of this embodiment is used to implement the multi-agent data analysis method based on a large language model as described in the above embodiment. Specifically, a multi-agent data analysis system based on a large language model of this embodiment includes an agent construction module 100, a programmer response module 200, an inspector inspection module 300 and a code optimization module 400. Among them:

[0103] An agent building module 100, used to train a programmer agent and an inspector agent based on a pre-trained large language model;

[0104] A programmer response module 200, for responding to a prompt input to the programmer agent, causing the programmer agent to output a response code and execute it according to the prompt;

[0105] The inspector checking module 300 is used to monitor the execution result of the response code in real time, and when the response code is executed incorrectly, the inspector agent obtains the response code, checks the response code, and outputs modification suggestions;

[0106] The code optimization module 400 is used to enable the programmer agent to optimize the response code according to the modification suggestions and output the optimized code.

[0107] In order to ensure the smoothness of the device's motion trajectory, in this embodiment, an iterative inspection module 500 is also provided to control the inspector inspection module 300 and the code optimization module 400 to iteratively inspect the response code until the response code is successfully executed or a preset number of inspections is reached.

[0108] The present invention trains programmer agents and inspector agents through a large language model, and fine-tunes the parameters of the programmer agents and inspector agents through low-rank adaptation, thereby ensuring that the programmer agents and inspector agents are biased towards the perception and processing of natural language and generated code, as well as between modification opinions and optimized code; through reward models and proximal strategy optimization, the inspector agent can output results that meet human preferences; the present invention does not require users to have programming knowledge, and can perform data analysis. The multi-agent collaborative algorithm and self-correction mechanism ensure the reliability and accuracy of the code.

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

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

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

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

Claims

1. A multi-agent data analysis method based on a large language model, characterized in that: The following steps are involved: S1: Train the programmer agent and the checker agent based on the pre-trained large language model; S2: In response to a prompt input to the programmer agent, the programmer agent outputs a response code and executes it according to the prompt; S3: monitor the execution result of the response code in real time, and when the response code is executed incorrectly, enable the inspector agent to obtain the response code, inspect the response code, and output modification suggestions; S4: The programmer agent optimizes the response code according to the modification suggestions and re-outputs the response code.

2. A multi-agent data analysis method based on a large language model as claimed in claim 1, characterized in that: After step S4, the following steps are further included: S5: the inspector agent checks the response code re-output by the programmer agent and outputs modification suggestions; S6: Repeat the steps S4-S5 until the response code is successfully executed or the preset number of checks is reached.

3. A multi-agent data analysis method based on a large language model as claimed in claim 2, characterized in that: After step S6, the following steps are further included: S7: If the response code is still executed incorrectly after reaching the preset number of checks, the response code can be modified directly by the user.

4. A multi-agent data analysis method based on a large language model as claimed in claim 1, characterized in that: The step S1 includes the following sub-steps: S11: Determine the programmer weight update matrix and perform low-rank decomposition on the programmer weight update matrix: Where W represents the programmer agent weight update matrix; W0 represents the pre-trained model weight matrix; α represents the scaling factor, which represents the impact of the updated weight matrices A and B on the original weight matrix W0; n represents the rank of the updated weight matrices A and B; A and B both represent updated weight matrices; S12: Obtain a sample set of programmer weight updates, and perform weight update training on the programmer agent to minimize the loss function: Among them, L represents the cross entropy loss function; M represents the number of samples; y i represents the actual value of the i-th sample, p i represents the predicted probability of the i-th sample.

5. A multi-agent data analysis method based on a large language model as claimed in claim 1, characterized in that: The step S1 also includes the following sub-steps: S13: Determine the inspector weight update matrix and perform low-rank decomposition on the programmer weight update matrix; S14: Obtain an inspector weight update sample set, and perform weight update training on the inspector agent; S15: Use the reward model to perform proximal policy optimization on the inspector agent.

6. A multi-agent data analysis method based on a large language model as claimed in claim 4, characterized in that: The step S2 includes the following sub-steps: S151: Input several prompts to the inspector agent, output several responses to each prompt, and sample each set of input prompts and corresponding responses; S152: Rank the responses to each group of prompts in the sample according to human preferences, build a reward database, and build a reward model based on the reward database: Among them, r θ represents the weight, x represents the prompt, σ represents the sigmoid activation function, i represents the number of responses corresponding to each prompt, and y i ,y 1-i are responses to prompt x, and y i Ranked higher than y 1-i ; S153: Optimizing the proximal strategy of the inspector agent using the reward model: Where γ represents the discount factor, r T Represents the estimated value of the advantage function at time T, where t is a constant.

7. A multi-agent data analysis method based on a large language model as claimed in claim 1, characterized in that: In the step S2, the following steps are included: S21: The programmer agent obtains the context of the user input prompt; S22: the programmer agent outputs a response code according to the context of the user input prompt and the input and output format; S23: The programmer agent calls the code execution tool to execute the response code.

8. A multi-agent data analysis system based on a large language model, characterized in that: An agent building module for training programmer agents and checker agents based on a pre-trained large language model; A programmer response module, for responding to a prompt input to the programmer agent, causing the programmer agent to output a response code and execute it according to the prompt; An inspector checking module is used to monitor the execution result of the response code in real time, and when the response code is executed incorrectly, the inspector agent obtains the response code, checks the response code, and outputs modification suggestions; The code optimization module is used to enable the programmer agent to optimize the response code according to the modification suggestions and output the optimized code.

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

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