A table-to-text generation method based on multi-agent collaboration

By employing a multi-agent collaborative table-to-text generation method, the problems of text style alignment and illusion are solved, achieving efficient text generation with controllable style and factual accuracy, making it suitable for demanding natural language generation tasks.

CN120724976BActive Publication Date: 2025-11-21ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511232630.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2025-11-21
Estimated Expiration
2045-09-01

AI Technical Summary

Technical Problem

Existing table-to-text generation methods suffer from difficulties in aligning the generated text style with specific requirements and are prone to producing illusions, especially in scenarios that demand high accuracy and a particular style.

Method used

A multi-agent collaborative approach is adopted, which uses the Sentence-BERT model to encode tabular data and combines it with a large language model to generate text. Real-time error detection and correction are performed through multi-agent collaboration, including the collaborative work of the generating agent, the retrieval agent, the verification agent, and the scheduling agent. Combined with style preference optimization and supervised fine-tuning, the style controllability and factual accuracy of the generated text are achieved.

Benefits of technology

It improves the style expression and factual consistency of the generated text, significantly enhances the semantic consistency and data reliability of the generated results, and is suitable for high-requirement scenarios such as financial statement analysis and data report generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120724976B_ABST
    Figure CN120724976B_ABST
Patent Text Reader

Abstract

The application discloses a table-to-text generation method based on multi-agent cooperation, wherein model training includes two stages of supervised fine-tuning and style preference optimization, enhanced training data is constructed through table replacement invariance, PEFT is used for efficiently fine-tuning a large language model, and SimPO algorithm is adopted to generate text conforming to the golden standard style through positive and negative sample comparison learning. Error correction is performed through a multi-agent cooperation mechanism, BERT model is used to encode table data and store in a Faiss vector database, an agent generates text based on a large language model, a retrieval agent constructs a minimum concern table, a verification agent compares unit statements and classifies errors, a scheduling agent triggers an error correction strategy, and numerical values, knowledge loss and table conflicts are accurately corrected. The whole process is iteratively generated and verified to ensure that the generated text is faithful to the facts, the style is consistent and there is no illusion, and the quality and accuracy of table-to-text generation are significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence and natural language processing technology, specifically relating to a table-to-text generation method based on multi-agent collaboration. Background Technology

[0002] With the rapid development of natural language processing technology, Large Language Models (LLMs) have demonstrated powerful capabilities in text generation tasks, particularly in scenarios involving the generation of natural language text from structured data (such as tables). However, existing table-to-text generation methods face two major challenges: first, the style of the generated text is difficult to precisely align with specific needs (such as classical Chinese style or technical terminology), leading to deviations in tone and wording from expectations; second, LLMs are prone to the "illusion" problem during generation, where the generated content may deviate from the facts presented in the table, containing fabricated or contradictory information. These problems are particularly prominent in scenarios requiring high accuracy and specific styles (such as legal documents and academic reports).

[0003] To address the style alignment problem, existing techniques often employ supervised fine-tuning (SFT) or manually labeled data for model training. However, limited by the diversity of training data and the efficiency of model parameter tuning, data synthesis heavily relies on powerful closed-source models, making efficient style optimization difficult. In recent years, preference optimization algorithms such as DPO (Direct Preference Optimization) and SimPO (Simple Preference Optimization) have shown potential in model alignment, but research on stylistic preference optimization for table-to-text tasks remains limited. On the other hand, to alleviate the illusion problem, some methods proofread the generated text through post-processing or rule verification (e.g., [Jacob Menek et al. Teaching language models to support answers with verified citations. arXiv preprint, 2203.11147, 2022]). However, these methods typically rely on manual intervention or simple rules, making it difficult to handle complex semantic errors and lacking real-time performance. While recent general error detection methods for large language models (such as those proposed in the literature [Tang Liyan et al. Efficient fact checking of large language models based on benchmark documents. Conference on Empirical Methods in Natural Language Processing, November 2024, pp. 8818-8847]) have adopted large-scale data training and meet the requirements for common sense errors and simple factual conflicts, they are mostly limited to the single modality of text, and cannot flexibly design error types. They also lack a systematic multi-agent collaborative mechanism to comprehensively handle problems such as knowledge gaps and table conflicts.

[0004] Therefore, there is an urgent need for a table-to-text generation method that can simultaneously solve the problems of style alignment and illusion, and ensure that the generated text is both faithful to the table data and meets specific style requirements through efficient model training and real-time error correction mechanisms. Summary of the Invention

[0005] To address the technical challenges of grid alignment and illusion problems in existing table-to-text generation technologies, this invention provides a table-to-text generation method based on multi-agent collaboration. This method aims to maintain the complete transmission of core information in the table while ensuring factual accuracy and controllability of language style, thereby improving text generation quality and user satisfaction.

[0006] A table-to-text generation method based on multi-agent collaboration includes the following steps:

[0007] (1) The Sentence-BERT (Bidirectional Encoder Representations from Transformers) model is used to encode the rows and columns of the table data, generate representation vectors and store them in the Faiss (Facebook AI Similarity Search Library) vector database, and at the same time establish an index mapping from the representation vectors to the original rows and columns;

[0008] (2) Call the LLM-based generative agent to generate natural language text based on the semantic information of the table, and perform error detection and correction synchronously during the text generation process;

[0009] (3) During the text generation process, the output text is truncated by the set termination condition (output period or the length of generated content reaches a preset threshold), and the sentence units that can independently express information are extracted from the truncated sentences and recorded as unit declarations.

[0010] (4) Call the retrieval agent, which uses the Sentence-BERT model to encode unit declarations into vectors, and retrieves rows and columns in the Faiss vector database that have a similarity to the vector that is higher than a preset threshold to form a minimum concern table;

[0011] (5) Call the verification agent to compare and analyze the contents of the unit declaration and the minimum concern table to determine whether the unit declaration is supported by the minimum concern table data: if it is supported, the generating agent continues to generate subsequent content; if it is not supported, potential errors are identified and the errors are classified.

[0012] (6) Invoke the scheduling agent and assign the corresponding strategy for error correction according to the error type;

[0013] (7) After each sentence is generated, the verification and error correction process is executed according to steps (4) to (6), and then the process returns to step (2) to continue generating the next sentence until all the generated text content passes the verification.

[0014] Furthermore, the training process for generating the agent in step (2) includes two stages: supervised fine-tuning and style preference optimization, as detailed below:

[0015] 2.1 Construct an enhanced training dataset for supervised fine-tuning;

[0016] 2.2 Using the aforementioned enhanced training dataset, supervised fine-tuning of the large language model is performed using the PEFT (Parameter-Efficient Fine-Tuning) strategy;

[0017] 2.3 Construct a style preference training dataset for style preference optimization training;

[0018] 2.4 Based on the style preference training dataset, the SimPO algorithm is used to optimize the style preference of the large language model to obtain an LLM-based generative agent.

[0019] Furthermore, the specific implementation of step 2.1 is as follows: obtain a certain amount of tabular data, perform transformation operations on the tabular data including row shuffling, column shuffling and transposition, expand a set of tabular data into multiple sets of tabular data with different arrangement orders as training samples, thereby obtaining an enhanced training dataset to enhance the model's ability to identify core facts.

[0020] Furthermore, the specific implementation of step 2.3 is as follows: First, the manually annotated gold standard is used as a training positive sample. Based on the manually annotated gold standard, a large language model is used to delete some content of the gold standard or add table content that it does not include to the gold standard, as a fine-grained style negative sample. Then, the large language model is used to rewrite the gold standard with a more colloquial and popular language style, as a language style negative sample, thereby obtaining the style preference training dataset.

[0021] Furthermore, the SimPO algorithm in step 2.4 guides preference training through the Bradley-Terry model, constructs preference probability functions for positive and negative sample pairs, and combines KL divergence to constrain the stability of the large language model. The large language model is then optimized through the corresponding objective function, thereby improving the ability of the large language model to generate factually consistent text while satisfying style preferences.

[0022] Furthermore, in step (5), the verification agent identifies potential errors and categorizes them, while providing a detailed description. The error types are divided into two categories: missing errors and unsupported errors. Missing errors refer to the fact that the unit declaration content is completely missing in the minimum concern table, which belongs to the model's fictitious information; unsupported errors refer to the fact that the unit declaration content contradicts the data in the minimum concern table, which belongs to the model introducing external error information.

[0023] Furthermore, the specific implementation of step (6) is as follows:

[0024] For errors not included, the scheduling agent instructs the generating agent to regenerate that part of the content, and requires it to generate it based on the current table data;

[0025] For unsupported errors, the scheduling agent calls a specific correction agent to correct them based on the detailed description of the error, ensuring that the generated content is consistent with the table.

[0026] Furthermore, the specific execution method of the corrective agent is as follows:

[0027] If the generated text content conflicts with the values ​​in the least important table, the correct values ​​from the table will be replaced in the text to maintain contextual consistency.

[0028] If the error stems from missing terminology or misunderstanding of abbreviations, call the duckduckgo search library to perform external retrieval and supplement the large language model with relevant background knowledge to assist in the correction.

[0029] If a data conflict exists within the least concerned table, the large language model attempts to process it based on its built-in knowledge; if it cannot determine the conflict, the conflict information is retained and logged for manual review.

[0030] For errors that cannot be categorized, construct prompts to guide the large language model to generate the correct content.

[0031] A computer device includes a memory and a processor, wherein the memory stores a computer program and the processor executes the computer program to implement the above-described method for generating table-to-text based on multi-agent collaboration.

[0032] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described table-to-text generation method based on multi-agent collaboration.

[0033] Based on the above technical solution, the present invention has the following beneficial technical effects:

[0034] 1. This invention comprehensively improves the style expression ability and factual consistency assurance ability of the table-to-text generation system from both the training and inference stages through a style-controllable training mechanism and a multi-agent collaborative error correction mechanism. It can be widely applied to structured data-driven natural language generation tasks and has significant industrial application value and promotion prospects.

[0035] 2. This invention achieves synergistic optimization of factual fidelity and controllability of language style in tabular data by introducing mechanisms such as structural perturbation enhancement, efficient parameter fine-tuning, and style preference comparison learning. It has strong practical value and promising prospects for promotion.

[0036] 3. This invention provides a table-to-text generation error correction method based on multi-agent collaboration, which is used to detect and correct factual errors in real time during the text generation process, significantly enhancing the semantic consistency and data reliability of the generated results.

[0037] 4. This invention solves the illusion problem in table-to-text generation of large language models through a multi-agent collaborative mechanism, and has strong semantic consistency control capabilities. It is suitable for scenarios with high requirements for data accuracy, such as financial statement analysis and data report generation. Attached Figure Description

[0038] Figure 1 This is a schematic diagram of the overall process of the table feature encoding step in an embodiment of the present invention.

[0039] Figure 2 This is a schematic diagram of the two-stage training method for the table-to-text generation model based on style preference optimization in an embodiment of the present invention.

[0040] Figure 3 This is a schematic diagram of the error correction method for multi-agent collaboration in an embodiment of the present invention.

[0041] Figure 4 This is a schematic diagram of an electronic device in an embodiment of the present invention. Detailed Implementation

[0042] To describe the present invention in more detail, the technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0043] This embodiment provides a table-to-text generation method based on multi-agent collaboration, including the following steps:

[0044] (1) The Sentence-BERT model is used to encode the rows and columns of the table data, generate representation vectors, and store them in the Faiss vector database. At the same time, an index mapping from the vectors to the original rows and columns is established. The specific operation process is as follows: Figure 1 As shown.

[0045] Sentence-BERT is a Transformer-based model whose core strength lies in its ability to efficiently map input text into embedding vectors in a high-dimensional semantic space. This allows semantically similar texts to have high similarity within this vector space, thus providing a powerful semantic representation foundation for numerous natural language processing tasks. Sentence-BERT is an improved variant of BERT, employing contrastive learning and pooling strategies to further enhance the semantic quality and discriminative power of its generated text embedding vectors, making it more adept at sentence embedding and semantic similarity calculation tasks.

[0046] Specifically, the Sentence-BERT model transforms the text (rows and columns) in a table into a sequence of tokens. After processing by the Transformer encoder, it obtains the contextual representation of each token. Finally, it integrates the representations of each token through an average pooling operation to form the embedding vector of the complete sentence. The calculation formula is as follows:

[0047]

[0048] in: h i Indicates the first i The context representation of a token, n This indicates the number of tokens in the text sequence. s This is the high-dimensional embedding vector of the sentence; the vector reflects the semantic information of the table content and can be used for subsequent efficient retrieval and verification.

[0049] The Faiss vector database stores and retrieves the aforementioned embedded vectors, employing a cosine similarity-based indexing mechanism to support rapid matching of high-dimensional vectors. In its implementation, the vector dimension is set based on the output of the selected Sentence-BERT model (e.g., 384-dimensional or 768-dimensional), and the index type can be either IVF (Inverted File Index) or HNSW (Hierarchical Nearest Neighbor Graph) structure, depending on retrieval efficiency and accuracy requirements. To improve query performance, the original vectors are normalized during the index building phase to ensure consistency in similarity metrics.

[0050] (2) Call the generative agent based on the large language model to generate natural language text according to the semantic information of the table, and perform error detection and correction simultaneously during the text generation process.

[0051] The large language model used in this embodiment is Qwen2.5-7B-Instruct, developed by the Alibaba Cloud Tongyi Qianwen team. It is based on a decoder-only architecture and is similar to modern large language models (such as the GPT series). It is suitable for a variety of application scenarios and is applicable to multilingual processing and long text generation tasks.

[0052] The training process for the agent generation model employs a two-stage training method based on style preference optimization for table-to-text generation models. This includes two stages: Supervised Fine-Tuning (SFT) and Stylistic Preference Optimization (StylePO). The specific process is as follows: Figure 2 As shown:

[0053] Step S1: Construct enhanced training data for supervised fine-tuning.

[0054] Specifically, based on the permutation invariance of the table, transformation operations are performed on the table, including row shuffling, column shuffling, and transposition, to generate training samples with various permutations to enhance the model's ability to identify core facts.

[0055] Step S2: Supervised fine-tuning of the large language model using enhanced training data. In this step, the PEFT efficient parameter fine-tuning method is used to fine-tune the model by changing only a very small number of parameters.

[0056] Step S3: Construct style preference training data for style preference optimization training, specifically:

[0057] S3.1: Use manually labeled gold standards as training positive samples;

[0058] S3.2: Based on the manually annotated gold standard, use a large language model to delete some content of the gold standard or add table content that is not included in the gold standard as fine-grained style negative samples.

[0059] S3.3: Then, use the large language model to rewrite the gold standard with a more colloquial and popular language style as a negative sample of language style;

[0060] S3.4: The SimPO algorithm is used to optimize stylistic preferences in order to generate text that aligns with the gold standard style preference.

[0061] Specifically, the SimPO algorithm uses positive and negative sample pairs for preference-guided training, and its positive samples... and negative samples The preference probability p is represented by the Bradley-Terry model:

[0062]

[0063] in: This represents the reward score for positive samples. This represents the reward score for negative samples.

[0064] The objective function of SimPO is:

[0065]

[0066] Where: E represents the expectation function. Indicates action a In state x The rewards are based on preference data; Represents the current strategy. θ For model parameters, Representative reference strategy; D KL This represents the KL divergence, used to constrain the differences between the old and new strategies; β The penalty coefficient representing the KL divergence controls the conservatism of policy updates.

[0067] By comparing positive and negative samples, a large language model is guided to generate text that is both factually accurate and possesses a given style. Furthermore, a multi-agent collaborative table-to-text generation error correction method detects and corrects factual errors in real time during text generation. The specific process is as follows: Figure 3 As shown:

[0068] (3) Each text generation process terminates when the output period or the length of the generated content reaches a preset threshold. The system will truncate the output text after the period or punctuation mark (such as a comma) and extract the sentence unit that can independently express information, which is called "unit declaration". It refers to a text fragment that can completely express a certain fact or information, which serves as the basic unit for subsequent verification and error correction.

[0069] (4) Call the retrieval agent and use the Sentence-BERT model to encode the “unit declaration” into a vector. Retrieve the table rows and columns with similarity higher than the preset threshold in the Faiss database and construct the “minimum concern table”, which refers to the subset of tables containing the most relevant information to the current unit declaration, so as to improve the verification efficiency and accuracy.

[0070] The "Minimum Concern Table" is a subset of tables containing data highly relevant to the "Unit Declaration," providing accurate reference for subsequent verification. The cosine similarity threshold can be flexibly adjusted according to the application scenario.

[0071] (5) Call the verification agent to compare and analyze the contents of the "Unit Declaration" and the "Minimum Concern Table" to determine whether the declaration is supported by the table data. If supported, the generating agent continues to generate subsequent content; if not supported, the verification agent will identify potential errors and classify them as "Error Not Included" or "Error Not Supported," and provide a detailed description. The system must clearly indicate the corresponding data conflict point in the error description, such as inconsistent values ​​or semantic discrepancies.

[0072] Specifically, "No error included" means that the declared content is completely missing in the table, which is fictitious information in the model (internal illusion); "No supported error" means that the declared content contradicts the table data, which is external error information introduced by the model (external illusion).

[0073] (6) Invoke the scheduling agent to allocate the corresponding error correction strategy according to the error type. If no error is detected, continue to the next round of generation; if an error is detected, proceed to the following error correction process:

[0074] In response to the "not included" error, the scheduling agent instructs the generating agent to regenerate that part of the content, requiring it to generate it based on the current table data.

[0075] For "unsupported errors," the scheduling agent invokes a specific correction agent based on the error description to ensure that the generated content matches the table. This includes:

[0076] Step S1: Numerical error correction agent: If the generated content conflicts with the table values, the correct values ​​in the table will be replaced in the text to maintain context consistency.

[0077] Step S2: Knowledge Gap Error Correction Agent: If the error stems from missing terminology or misunderstanding of abbreviations, call the duckduckgo_search library to perform external searches and supplement relevant background knowledge to assist in correction.

[0078] Step S3: Table Conflict Error Correction Agent: If there is a data conflict in the table, the model attempts to process it based on its built-in knowledge; if it cannot determine the conflict, the conflict information is retained and logged for manual review.

[0079] Step S4: Other error correction agents: For errors that cannot be classified, guide the large language model to generate correct content by constructing prompts.

[0080] (7) After each sentence is generated, return to step (2) to continue generating, and execute the cyclic generation and verification process until all generated content passes verification.

[0081] This embodiment also provides an electronic device specifically designed for realizing style preference-based table-to-text generation and multi-agent collaborative error correction. This electronic device, through its efficient hardware architecture and optimized computing power, supports supervised fine-tuning, style preference optimization, and multi-agent collaborative error correction, ensuring high accuracy, style consistency, and hallucination-free output of the generated text. Figure 4As shown, this electronic device is equipped with one or more high-performance processors (central computing modules) for performing tasks such as data processing, model training, text generation, and error correction. Processor types include one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), or a tensor processor (TPU). The CPU handles general computing tasks such as data preprocessing, task scheduling, and system management; the GPU supports parallel computing to optimize the training and inference of deep learning models; and the NPU or TPU provides low-power, high-throughput computing capabilities specifically for efficient inference and training of large language models.

[0082] The electronic device also includes a storage module for storing computer programs, model parameters, enhanced training data, the Faiss vector database, and intermediate computation results. The storage module encompasses both non-volatile and volatile memory. Non-volatile memory, such as solid-state drives, hard disk drives, or flash memory, is used for persistent storage of model weights, training data, and program code. Volatile memory, such as dynamic random access memory (DRAM) or static random access memory (SRAM), is used to cache temporary data, encoding results, and intermediate states during multi-agent collaboration. Furthermore, the cache is integrated into the processor or deployed independently to accelerate data access and optimize the real-time performance of multi-agent tasks.

[0083] To support efficient input and output of external data, this electronic device is equipped with a communication interface module, including a universal serial bus interface for importing tabular data or exporting generated text, network interfaces such as Ethernet ports or high-speed fiber optic interfaces to support data interaction with cloud servers, databases, or client devices, and a serial communication interface to meet the low-bandwidth communication requirements of embedded devices or IoT devices. The communication interface module further provides wired or wireless data transmission capabilities, ensuring seamless interaction between the device and external systems such as cloud training clusters or edge computing nodes. The communication interface module includes a network adapter supporting high-speed Ethernet connectivity, suitable for distributed model training and inference, and wireless communication modules such as Wi-Fi, 5G, or Bluetooth to meet the low-latency data transmission requirements of mobile devices or IoT scenarios.

[0084] Depending on the application scenario, this electronic device can also integrate auxiliary hardware modules to enhance performance and stability. An efficient cooling system, such as an air-cooled radiator, liquid-cooled module, or heat pipe, ensures stability during prolonged high-load computing; a power management unit optimizes energy consumption distribution, supporting continuous operation of large language model training and inference; a hardware security module protects the confidentiality and integrity of model parameters, training data, and generated text, making it particularly suitable for sensitive data processing scenarios. These hardware components work together to enable the electronic device to efficiently and stably perform the entire process of style preference-optimized table-to-text generation and multi-agent collaborative error correction.

[0085] The above description of the embodiments is provided to enable those skilled in the art to understand and apply the present invention. Those skilled in the art can readily make various modifications to the above embodiments and apply the general principles described herein to other embodiments without creative effort. Therefore, the present invention is not limited to the above embodiments, and any improvements and modifications made to the present invention by those skilled in the art based on the disclosure thereof should be within the scope of protection of the present invention.

Claims

1. A table-to-text generation method based on multi-agent collaboration, characterized in that, The method comprises the following steps: (1) using a Sentence-BERT model to encode the rows and columns of the table data, generating representation vectors and storing them in a Faiss vector database, and establishing an index mapping of the representation vectors to the original rows and columns; (2) calling an LLM-based generation agent to generate natural language text according to the semantic information of the table, and simultaneously performing error detection and correction during text generation; (3) truncating the output text by setting a termination condition during text generation, extracting a sentence unit that can independently express information from the truncated sentence, and recording it as a unit declaration; (4) calling a retrieval agent, which uses a Sentence-BERT model to encode the unit declaration into a vector, retrieves rows and columns with a similarity higher than a preset threshold in the Faiss vector database, and forms a minimum interest table; (5) calling a verification agent to compare and analyze the content of the unit declaration and the minimum interest table to determine whether the unit declaration is supported by the minimum interest table data: if supported, the generation agent continues to generate subsequent content; if not supported, potential errors are identified and classified; (6) calling a scheduling agent to assign appropriate strategies for error correction according to the error type; (7) after each sentence is generated, the verification and correction process in steps (4) to (6) is performed, and then step (2) is returned to continue generating the next sentence until the generated text content passes the verification.

2. The table-to-text generation method based on multi-agent collaboration according to claim 1, characterized in that: The training process of the generation agent in step (2) includes two stages of supervised fine-tuning and style preference optimization, and the specific process is as follows: 2.1 Construct an enhanced training dataset for supervised fine-tuning; 2.2 Use the enhanced training dataset to fine-tune the large language model using the PEFT strategy; 2.3 Construct a style preference training dataset for style preference optimization training; 2.4 According to the style preference training dataset, use the SimPO algorithm to optimize the style preference of the large language model to obtain the LLM-based generation agent.

3. The table-to-text generation method based on multi-agent collaboration according to claim 2, characterized in that: The specific implementation of step 2.1 is to obtain a certain amount of table data, perform conversion operations including row shuffling, column shuffling, and transposition on the table data, expand a group of table data into multiple groups of table data with different arrangement orders as training samples, and thus obtain an enhanced training dataset.

4. The table-to-text generation method based on multi-agent collaboration according to claim 2, characterized in that: The specific implementation of step 2.3 is as follows: first, use the artificially annotated gold standard as a training positive sample, and based on the artificially annotated gold standard, use the large language model to delete part of the content of the gold standard or add table content not contained in the gold standard to the gold standard as a fine-grained style negative sample; then use the large language model to rewrite the gold standard in a more colloquial and popular language style as a language style negative sample, thereby obtaining a style preference training dataset.

5. The table-to-text generation method based on multi-agent collaboration according to claim 2, characterized in that: The SimPO algorithm in step 2.4 guides the preference training through the Bradley-Terry model, constructs a preference probability function for positive and negative sample pairs, and combines the KL divergence constraint to stabilize the large language model. The corresponding objective function is used to optimize the large language model, thereby improving the ability of the large language model to generate consistent factual text while meeting the style preference.

6. The table-to-text generation method based on multi-agent collaboration according to claim 1, characterized in that: In step (5), the verification agent identifies potential errors and classifies them, providing detailed descriptions. Errors are classified into two categories: not contained and not supported. Not contained errors refer to missing unit declaration content in the minimal interest table, which is considered as fabricated information by the model. Not supported errors refer to contradictions between unit declaration content and minimal interest table data, which are considered as external error information introduced by the model.

7. The table-to-text generation method based on multi-agent collaboration according to claim 6, characterized in that: The specific implementation of step (6) is as follows: For not contained errors, the scheduling agent instructs the generation agent to regenerate the content based on the current table data. For not supported errors, the scheduling agent calls specific correction agents based on the detailed description of the error to ensure consistency between the generated content and the table.

8. The table-to-text generation method based on multi-agent collaboration according to claim 7, characterized in that: The specific implementation of the correction agent is as follows: If the generated text content conflicts with the minimal interest table values, replace the correct values in the table with the text to maintain consistency. If the error is due to missing terminology or misinterpretation of abbreviations, use the duckduckgo search library for external retrieval to supplement relevant background knowledge for the large language model to assist in correction. If there is a data conflict in the minimal interest table, the large language model attempts to process it based on built-in knowledge. If it cannot be determined, the conflicting information is retained, and logs are recorded for manual review. For unclassified errors, construct prompts to guide the large language model to generate correct content.

9. A computer device comprising a memory and a processor, said memory having stored therein a computer program, characterized in that: The processor is configured to execute the computer program to implement the table-to-text generation method based on multi-agent collaboration as claimed in any one of claims 1-8.

10. A computer readable storage medium storing a computer program, characterized in that: The computer program is executed by the processor to implement the table-to-text generation method based on multi-agent collaboration as claimed in any one of claims 1-8.

Citation Information

Patent Citations

  • Joint multi-task table semantic parsing method based on pre-training model

    CN120011390A

  • Natural language rule table information extraction system based on large model

    CN120031004A