Table data analysis method fusing large language model and ReAct framework

By integrating a large language model with the ReAct framework and introducing multi-level validation and self-correction mechanisms, the problems of error accumulation and resource consumption in tabular data analysis are solved, achieving efficient and accurate data processing, suitable for complex logical reasoning and large-scale data analysis.

CN121052226APending Publication Date: 2025-12-02HOHAI UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511295493.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-11
Publication Date
2025-12-02

AI Technical Summary

Technical Problem

Existing tabular data analysis tools suffer from error accumulation, high resource consumption, and low accuracy when performing complex logical reasoning and multi-step numerical calculations, making it difficult to meet the application needs of high-risk and high-precision fields.

Method used

By integrating a large language model with the ReAct framework, and introducing multi-level verification and self-correction mechanisms, the control flow of the ReAct framework is optimized, and a three-level verification module and a self-correction module are set up to realize code generation, semantic calibration, logic verification and self-correction, forming a closed-loop processing mode.

Benefits of technology

It improves the accuracy and robustness of tabular data processing, reduces resource consumption and runtime latency, and is capable of handling complex logical reasoning and large-scale data, making it suitable for high-precision and high-risk scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121052226A_ABST
    Figure CN121052226A_ABST
Patent Text Reader

Abstract

The invention discloses a table data analysis method fusing a large language model and a ReAct framework. The table data analysis method comprises the following steps: receiving and processing table data and natural language query input by a user through a file analysis module; performing task analysis and code generation in the ReAct framework by using an LLM decision engine; constructing a multi-stage verification module to perform three-stage verification of semantic calibration, code pre-check and logic verification on the generated code to enhance the code robustness and improve the result accuracy; a CNN-BiLSTM hybrid neural network model is adopted to construct a self-correction module, error classification is carried out on codes which fail to be verified, and a correction strategy is fed back; and executing the generated code, and returning a structured result after the ReAct control process is finished. According to the method, the problems that error propagation is not corrected, multi-Agent resource consumption is large and complex query accuracy is low in an existing table analysis technology are effectively solved, the accuracy, efficiency and reliability of data analysis are remarkably improved, and meanwhile computing resource consumption is greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and data analysis, specifically a tabular data analysis method that integrates Large Language Model (LLM) and the ReAct framework. Background Technology

[0002] Tabular data, as one of the most common forms of data organization, is widely used in finance, healthcare, manufacturing monitoring, scientific research, and other fields. With the rapid growth of data volume and the increasing complexity of business needs, how to achieve efficient, accurate, and intelligent analysis of tabular data has become a crucial issue in current artificial intelligence and data management research. Existing data processing still mainly relies on traditional manual operations and general statistical tools, such as Excel and Pandas. While these methods can play a role in data cleaning, statistical calculation, and visualization, they are clearly insufficient in scenarios requiring complex logical reasoning and information processing, making it difficult to meet the requirements of intelligent analysis.

[0003] In recent years, with the development of large language models, some intelligent table analysis tools combining natural language processing capabilities have emerged, such as PandasAI. These tools can generate query or analysis code from natural language input, thus lowering the operational threshold for users to some extent. However, due to the limitations of large models in terms of context length, computational overhead, and reasoning ability, existing methods still face several key problems in complex table tasks: First, once an error occurs in the code generation stage, there is a lack of effective self-correction mechanisms, leading to the accumulation and spread of errors in execution and results; second, although multi-agent collaborative frameworks can functionally decompose complex tasks, each agent relies on large model reasoning, drastically increasing resource consumption and severely restricting response speed; third, the accuracy of complex query processing is low, especially when multi-step numerical reasoning or cross-table logical calculations are involved, where the model often generates unreliable results due to difficulty in correctly identifying supporting information. These problems directly affect the efficiency and reliability of table data analysis, limiting its promotion and application in high-risk and high-precision fields. Summary of the Invention

[0004] Purpose of the invention: To address the aforementioned problems, this invention proposes a tabular data analysis method that integrates a large language model and the ReAct framework. By introducing an interactive mechanism that combines reasoning and operation, and by setting up an additional three-level verification and self-repair mechanism, it solves the problems of insufficient model reasoning ability, inadequate external resource access, and lack of self-correction of results in tabular analysis tasks, thereby improving the accuracy, efficiency, and robustness of tabular data processing.

[0005] Technical Solution: The present invention provides a tabular data analysis method integrating a large language model and the ReAct framework, including optimization of the ReAct framework, adding a multi-level validation module and a self-correction module, and synchronously optimizing the ReAct control flow. Specifically, it includes the following steps:

[0006] S1: Utilize the REST API to receive natural language queries and tabular data input from users, preprocess and format the data to form a data summary;

[0007] S2: An application-optimized ReAct framework, with task parsing and code generation performed by the LLM decision engine;

[0008] S3: Employs a multi-level verification module to perform semantic calibration, code pre-inspection, and logical verification on the generated code, thus completing self-correction.

[0009] S4: The self-correcting module performs error analysis and provides feedback on correction strategies for code that fails verification.

[0010] S5: Run the validated code using the code executor and return a structured result.

[0011] Furthermore, the implementation process of step S1 is as follows:

[0012] S11: Data Acquisition: Receives natural language queries and CSV or Excel format table data from users via REST API, with a maximum data volume of 10GB;

[0013] S12: Unified Data Format: Unify the data format, standardize timestamps and numerical fields to facilitate standardized processing of related code in subsequent execution;

[0014] S13: Data Feature Extraction: Establish a data dictionary to record field types and statistical features;

[0015] S14: Generate Data Summary: Detect the table structure, convert it into a Pandas DataFrame, and further generate a data summary containing header information, row and column data, and the first three rows of the table data as sample data.

[0016] Furthermore, step S2 is implemented as follows:

[0017] S21: Task Analysis: Use an LLM model to decompose a natural language query into a sequence of atomic operations;

[0018] S22: Code generation: Generate corresponding data operation code based on atomic operations;

[0019] S23: Resource scheduling: Dynamically allocate computing resources based on task complexity.

[0020] Furthermore, the implementation process of step S21 is as follows:

[0021] S21-1: Pre-set Prompt: This includes AI Character Setting, which clarifies the AI's "role perception" and improves the usability of the table analysis assistant; Constraints, which regulate and restrict model behavior, permissions, and usage strategies; Tool List, which utilizes a tool list, where each tool must contain {"name":"","description":"","type":""}, to facilitate model invocation; Response Format, which defines response templates and clarifies the final analysis report.

[0022] S21-2: Dynamic Task Resolution: The query is resolved using an LLM decision engine to generate a task dependency graph G = (V, E), where vertices V = {v...} i |i=1..n} represents a subtask, and edge E={e {ij}} indicates data dependencies;

[0023] S21-3: Record the atomic operations of the task in sequence according to the optimal combination.

[0024] Furthermore, step S3 is implemented as follows:

[0025] S31: Semantic calibration: The cosine similarity between the user intent vector U and the LLM parsing vector P is calculated using the Sentence-BERT model. Re-parse is triggered when the value falls below a preset threshold; the preset threshold is 0.75.

[0026] S32: Code Pre-check: Through preliminary checks on code syntax and simulated execution, code vulnerabilities are eliminated. First, syntax errors are detected by the AST parser. Then, execution is simulated and monitored in a sandbox. Monitoring indicators include: memory usage > 30% of total memory, number of lines scanned in a single run > 1 million, and nested loop depth > 4 levels. If any one of these three conditions is met, the code pre-check result is considered unsuccessful.

[0027] S33: Logical Verification: Check the reasonableness of the output results based on historical data distribution; construct a historical data distribution model, where μ represents the mean and σ is the standard deviation. When the output field F... k An unreasonable situation is one that meets any of the following conditions:

[0028] Condition 1 Historical Anomalies: |μ current -μ history |>2.5σ; where μ current μ represents the current mean. history Represents the historical average;

[0029] Condition 2: Null value mutation rate detection Among them, NullCount current NullCount represents the current number of null values. history This represents the number of historical null values, and TotalRows represents the total number of rows.

[0030] Furthermore, the historical data distribution model is constructed as follows:

[0031] Calculate for each column of data:

[0032]

[0033] Where μ is the mean of the data in this column, reflecting the central tendency of the data; σ is the standard deviation of the data in this column, reflecting the dispersion of the data; N is the total number of data rows; x k This represents the value of the k-th data point.

[0034] Establish a baseline for the null value rate:

[0035]

[0036] Among them, R null Represents the null value rate, indicating the proportion of null values ​​in this column; Count null This represents the number of empty values ​​in this column; TotalRows represents the total number of rows.

[0037] Incremental learning of the model is triggered when the table is updated:

[0038] μ new =αμ old +(1-α)μ update

[0039] Where, μ new μ represents the updated mean. old μ represents the historical mean before the update. update The mean of the newly added data is α, which is a smoothing coefficient used to control the weight of historical data and new data; α is 0.7.

[0040] Furthermore, step S4 is implemented as follows:

[0041] S41: Error Classification: The CNN-BiLSTM model is used to identify error types, including semantic understanding errors, code syntax errors, and logical conflict errors.

[0042] S42: Correction Strategy Selection: Select the appropriate correction scheme based on the error type. For semantic understanding errors, inject domain knowledge to enhance understanding; for code syntax errors, return to the standard code template library for matching; for logical conflict errors, add constraints and regenerate the code.

[0043] S43: Iterative Correction: Inject the strategy into the prompt to guide the model to fix the code, with a maximum of three correction attempts.

[0044] Furthermore, the implementation process of step S5 is as follows:

[0045] S51: Execute Code: Build a code executor in the sandbox environment and execute the verified code;

[0046] S52: Generate complete results: The front end outputs the data analysis process in Markdown format and allows users to query the data analysis results; when there is statistical data, it draws visual charts to facilitate user viewing and further analysis.

[0047] Beneficial Effects: Compared with existing technologies, the beneficial effects of this invention are as follows: This invention introduces an optimized ReAct (Reasoning and Acting) framework into its design architecture, achieving efficient coordination and dynamic interaction between large language models and external tools, knowledge bases, and data processing modules. This overcomes the technical bottleneck of error accumulation and result distortion caused by the reliance on a single reasoning chain in traditional methods. By setting up multi-level verification and self-correction mechanisms, this invention can achieve dynamic verification and feedback correction throughout the entire process at multiple key stages of code generation, forming a closed-loop processing mode of "generation-verification-correction." This mechanism can not only detect and eliminate potential errors in the early stages, preventing the propagation of errors in subsequent stages, but also adaptively optimize the reasoning path and external tool calling strategy based on feedback results, thereby significantly improving the accuracy and robustness of the analysis results. This invention utilizes reasonable configuration of computational and storage overhead to reduce overall resource consumption and running latency, achieving a balance between high precision and high efficiency. Therefore, this invention can not only meet the needs of conventional tabular data cleaning and statistical tasks, but also be widely applicable to high-difficulty application scenarios involving complex logical reasoning, large-scale data processing, and cross-domain knowledge fusion, possessing significant promotional value and application prospects. Attached Figure Description

[0048] Figure 1 This is a flowchart of the present invention;

[0049] Figure 2 This is a flowchart of the ReAct framework proposed in this invention;

[0050] Figure 3 This is a flowchart of the multi-level verification module proposed in this invention;

[0051] Figure 4 This is a flowchart of the self-correcting module proposed in this invention. Detailed Implementation

[0052] The present invention will now be described in further detail with reference to the accompanying drawings.

[0053] like Figure 1 As shown, this invention provides a tabular data analysis method that integrates a large language model and the ReAct framework, including the following steps:

[0054] Step 1: Utilize the REST API to receive natural language queries and tabular data input from the user. For example, if a user requests "Please help me find people with quick in-and-out records," the submitted table header should include: Transaction Date, Name of Transaction Provider, Name of Transaction Provider's Card Number, Name of Transaction Provider's Card Number, Name of Transaction Provider's Bank, Transaction Amount, Loan / Debit Identifier, Account Balance, Teller Number, Transaction Network Name, Transaction Network Number, Transaction Serial Number, Transaction Channel, Name of Transaction Provider's Bank, Name of Transaction Provider's Bank, Transaction Category, Transaction Remarks, Transaction Summary, IP Address, MAC Address, and Voucher Number. The table contains a large amount of data and includes various data types such as timestamps, numerical values, and text. A file parsing module is used to perform data preprocessing and format conversion to generate a data summary, facilitating subsequent understanding and use of the model.

[0055] The file parsing module performs preprocessing tasks such as format conversion on the tabular data to avoid directly handing the complete tabular data to the LLM for processing. The specific steps include:

[0056] S11: Data Acquisition: Receives natural language queries and CSV / Excel format table data from users via a standardized REST API, supporting a maximum data volume of 10GB.

[0057] S12: Unified Data Format: Unify the data format, standardize fields such as timestamps and numerical values, and facilitate standardized processing of related code in subsequent execution.

[0058] S13: Data Feature Extraction: Establish a data dictionary, record field types and statistical features, and prepare for building a data summary.

[0059] S14: Generate Data Summary: Detect the table structure, convert it into a Pandas DataFrame, and further generate a data summary containing header information, row and column data, and the first three rows of the table data as sample data to facilitate model learning.

[0060] Step 2: As Figure 2 As shown, the optimized ReAct framework control flow is utilized, and the LLM decision engine performs task parsing such as data filtering, aggregation calculation, visualization preparation, and code generation.

[0061] Using optimized ReAct control flow, the LLM decision engine is invoked to parse the query, thereby driving the LLM model to perform logical reasoning, learn knowledge, make decisions, and execute them like a human. The specific steps are as follows:

[0062] S21: Task Analysis: Use the LLM model to decompose natural language queries into a sequence of atomic operations.

[0063] S21-1: Pre-set Prompt: Includes necessary AI Character Settings to clarify the AI's "role recognition" and improve the usability of the spreadsheet analysis assistant. For example, "You are an intelligent spreadsheet analyst. Please respond to the user as helpfully and accurately as possible." Constraints regulate and restrict model behavior, permissions, and usage strategies. For example, "By default, you need to reply and think in Chinese. All your tools are placed in the ToolList. Use a JSON blob to specify a tool by providing an action key (tool name) and an action_input key (tool input). Valid "action" values: "Final Answer" or {{tool_names}}. The Tool List allows you to utilize the tool list. Each tool must contain {"name":"", "description":"", "type":"} for easy model calling. The Response Template defines the reply template and clarifies the final analysis report.

[0064] S21-2: Dynamic Task Resolution: The query is resolved using an LLM decision engine to generate a task dependency graph G = (V, E), where vertices V = {v...} i |i=1..n} represents a subtask, and edge E={e {ij}} indicates data dependencies.

[0065] S21-3: Record the atomic operations of the task in sequence according to the optimal combination.

[0066] S22: Code generation: Generate corresponding data operation code based on atomic operations.

[0067] S23: Resource scheduling: Dynamically allocate computing resources based on task complexity.

[0068] Step 3: As Figure 3As shown, a progressive verification pipeline is constructed, and a multi-level verification module is applied to perform three levels of verification on the generated code, including semantic calibration, code pre-inspection, and logical verification.

[0069] S31: Semantic calibration: The cosine similarity between the user intent vector U and the LLM parsing vector P is calculated using the Sentence-BERT model. The calculation formula is as follows: The threshold is set to 0.75; re-parsing is triggered when the value falls below the threshold.

[0070] S32: Code Pre-check: Through preliminary checks of code syntax and simulated execution, code vulnerabilities are eliminated. First, an AST parser is used to detect syntax errors. The specific execution is as follows:

[0071] Python code: `def ast_check(code): tree = ast.parse(code) for node in ast.walk(tree): if isinstance(node, ast.UnsafeCall): # Custom list of unsafe operations raiseSecurityError(node.lineno)`.

[0072] The code is simulated and monitored in a sandbox. The monitoring indicators include: memory usage > 30% of total memory, number of lines scanned in a single scan > 1 million, and nested loop depth > 4 levels. If any one of these three conditions is met, the code pre-check result will be considered as failing.

[0073] S33: Logical Verification: Check the reasonableness of the output results based on historical data distribution. Load the historical data distribution model, where μ represents the mean and σ is the standard deviation. When the output field F... k An unreasonable situation is one that meets any of the following conditions:

[0074] Condition 1 Historical Anomalies: |μ current -μ history |>2.5σ, where μ current μ represents the current mean. history Represents the historical average;

[0075] Condition 2: Null value mutation rate detection Where NullCount current NullCount represents the current number of null values. history This represents the number of historical null values, and TotalRows represents the total number of rows.

[0076] The construction of a historical data distribution model includes the following operations:

[0077] Calculate for each column of data: Where μ is the mean of the data in this column, reflecting the central tendency of the data; σ is the standard deviation of the data in this column, reflecting the dispersion of the data; N is the total number of data rows; k is the summation index, indicating which data point is being analyzed; and x... k This is the value of the k-th data point.

[0078] Establish a baseline for the null value rate: Where R null Represents the null value rate, indicating the proportion of null values ​​in this column; Count null This represents the number of empty values ​​in this column; TotalRows represents the total number of rows.

[0079] Incremental learning of the model is triggered when the table is updated: μ new =αμ old +(1-α)μ update ;where μ new μ represents the updated mean. old μ represents the historical mean before the update. update α is the mean of the newly added data; α is the smoothing coefficient, used to control the weight of historical data and new data, and here α = 0.7.

[0080] Step 4: As Figure 4 As shown, a closed-loop correction process is initiated for code instances that fail verification, using a self-correction module to perform error analysis and automatic correction on the code that fails verification.

[0081] Error information is vectorized, and an error type is identified using a CNN-BiLSTM error classifier. Its internal structure includes a CNN module with 3 convolutional kernels (sizes 3×1, 5×1, 7×1) and 64 channels; a BiLSTM module with a 128-unit bidirectional LSTM; and an output layer: a Softmax classifier. The self-correction module involves the following steps:

[0082] S41: Error Classification: Error types are identified using CNN-BiLSTM, and the classification includes: semantic understanding errors (Type I), code syntax errors (Type II), and logical conflict errors (Type III).

[0083] S42: Correction Strategy Selection: Select the appropriate correction scheme based on the error type. Type I error: Inject domain knowledge to enhance understanding; Type II error: Return to standard code template library for matching; Type III error: Add constraints and regenerate code.

[0084] S43: Iterative Correction: Inject the strategy into the prompt to guide the model to fix the code, with a maximum of 3 correction attempts.

[0085] Step 5: Run the verified code using a sandboxed code executor and return the structured analysis results.

[0086] S51: Execute code: Build a code executor in the sandbox environment and execute the verified code.

[0087] S52: Generate complete results: The front end outputs the data analysis process in Markdown format and the data analysis results queried by the user. If there is statistical data, it draws visual charts to facilitate user viewing and further analysis.

[0088] This invention expands and improves upon the traditional reasoning-action model, enabling coordinated collaboration between large language models and external resources. It achieves intelligent analysis of complex tabular data through multi-level verification and self-correction mechanisms. The improved ReAct framework enables efficient collaboration between the LLM model and external tools, a three-level verification mechanism ensures the accuracy and security of code generation, a self-correction mechanism automatically identifies and fixes errors, and dynamic resource scheduling optimizes the efficiency of computing resource utilization.

[0089] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A tabular data analysis method integrating a large language model and the ReAct framework, characterized in that, The ReAct framework has been optimized by adding a multi-level verification module and a self-correction module, and the ReAct control flow has been optimized simultaneously. The specific steps include: S1: Utilize the REST API to receive natural language queries and tabular data input from users, preprocess and format the data to form a data summary; S2: An application-optimized ReAct framework, with task parsing and code generation performed by the LLM decision engine; S3: Employs a multi-level verification module to perform semantic calibration, code pre-inspection, and logical verification on the generated code, thus completing self-correction. S4: The self-correcting module performs error analysis and provides feedback on correction strategies for code that fails verification. S5: Run the validated code using the code executor and return a structured result.

2. The tabular data analysis method integrating a large language model and the ReAct framework according to claim 1, characterized in that, The implementation process of step S1 is as follows: S11: Data Acquisition: Receives natural language queries and CSV or Excel format table data from users via REST API, with a maximum data volume of 10GB; S12: Unified Data Format: Unify the data format, standardize timestamps and numerical fields to facilitate standardized processing of related code in subsequent execution; S13: Data Feature Extraction: Establish a data dictionary to record field types and statistical features; S14: Generate Data Summary: Detect the table structure, convert it into a Pandas DataFrame, and further generate a data summary containing header information, row and column data, and the first three rows of the table data as sample data.

3. The tabular data analysis method integrating a large language model and the ReAct framework according to claim 1, characterized in that, The implementation process of step S2 is as follows: S21: Task Analysis: Use an LLM model to decompose a natural language query into a sequence of atomic operations; S22: Code generation: Generate corresponding data operation code based on atomic operations; S23: Resource scheduling: Dynamically allocate computing resources based on task complexity.

4. The tabular data analysis method integrating a large language model and the ReAct framework according to claim 3, characterized in that, The implementation process of step S21 is as follows: S21-1: Pre-set Prompt: Includes AI Character Setting, which clarifies the AI's "role perception" and improves the usability of the table analysis assistant; Constraints, which standardize and restrict model behavior, permissions, and usage strategies; Tool List, which allows the use of a tool list, where each tool must contain {"name":"","description":"","type":""}, to facilitate model invocation; Response Format, which defines response templates and clarifies the final analysis report. S21-2: Dynamic Task Resolution: The query is resolved using an LLM decision engine to generate a task dependency graph G = (V, E), where vertices V = {v...} i |i=1..n} represents a subtask, and edge E={e {ij} } indicates data dependencies; S21-3: Record the atomic operations of the task in sequence according to the optimal combination.

5. The tabular data analysis method integrating a large language model and the ReAct framework according to claim 1, characterized in that, The implementation process of step S3 is as follows: S31: Semantic calibration: The cosine similarity between the user intent vector U and the LLM parsing vector P is calculated using the Sentence-BERT model. Re-parse is triggered when the value is below a preset threshold; S32: Code Pre-check: Through preliminary checks on code syntax and simulated execution, code vulnerabilities are eliminated. First, syntax errors are detected by the AST parser. Then, execution is simulated and monitored in a sandbox. Monitoring indicators include: memory usage > 30% of total memory, number of lines scanned in a single run > 1 million, and nested loop depth > 4 levels. If any one of these three conditions is met, the code pre-check result is considered unsuccessful. S33: Logical Verification: Check the reasonableness of the output results based on historical data distribution; construct a historical data distribution model, where μ represents the mean and σ is the standard deviation. When the output field F... k An unreasonable situation is one that meets any of the following conditions: Condition 1 Historical Anomalies: |μ current -μ history |>2.5σ; where μ current μ represents the current mean. history Represents the historical average; Condition 2: Null value mutation rate detection Among them, NullCount curren t represents the current number of null values, NullCount history This represents the number of historical null values, and TotalRows represents the total number of rows.

6. The tabular data analysis method integrating a large language model and the ReAct framework according to claim 5, characterized in that, The preset threshold is 0.

75.

7. The tabular data analysis method integrating a large language model and the ReAct framework according to claim 5, characterized in that, The historical data distribution model is constructed as follows: Calculate for each column of data: Where μ is the mean of the data in this column, reflecting the central tendency of the data; σ is the standard deviation of the data in this column, reflecting the dispersion of the data; N is the total number of data rows; x k This is the value of the k-th data point; Establish a baseline for the null value rate: Among them, R null Represents the null value rate, indicating the proportion of null values ​​in this column; Count null This represents the number of empty values ​​in this column; TotalRows represents the total number of rows. Incremental learning of the model is triggered when the table is updated: m new =am old +(1-a)m update Where, μ new μ represents the updated mean. old μ represents the historical mean before the update. update α is the mean of the newly added data, and α is the smoothing coefficient used to control the weight of historical data and new data.

8. The tabular data analysis method integrating a large language model and the ReAct framework according to claim 7, characterized in that, The value of α is 0.

7.

9. The tabular data analysis method integrating a large language model and the ReAct framework according to claim 1, characterized in that, The implementation process of step S4 is as follows: S41: Error Classification: The CNN-BiLSTM model is used to identify error types, including: semantic understanding errors, code syntax errors, and logical conflict errors; S42: Correction Strategy Selection: Select the appropriate correction scheme based on the error type. For semantic understanding errors, inject domain knowledge to enhance understanding; for code syntax errors, return to the standard code template library for matching; for logical conflict errors, add constraints and regenerate the code. S43: Iterative Correction: Inject the strategy into the prompt to guide the model to fix the code, with a maximum of three correction attempts.

10. The tabular data analysis method integrating a large language model and the ReAct framework according to claim 1, characterized in that, The implementation process of step S5 is as follows: S51: Execute Code: Build a code executor in the sandbox environment and execute the verified code; S52: Generate complete results: The front end outputs the data analysis process in Markdown format and the data analysis results queried by the user; Visual charts are created when statistical data is available, making it easier for users to view and analyze the data.

Citation Information

Cited By

  • Automatic code generation method for dynamic intelligent calculation and interactive analysis of power grid

    CN121411755A

  • MDSplus data access code self-correction method based on execution feedback

    CN122594063A