TST: A Schema-Based Top-Down and Dynamic-Aware Agent of Text-to-Table Tasks

Peiwen Jiang, Haitong Jiang, Ruhui Ma, Yvonne Jie Chen, Jinhua ChengACL 2025

Introduction

The "text-to-table" task represents a significant challenge in information extraction: transforming unstructured natural language—such as legal judgments or sports commentaries—into structured, relational database formats. While Large Language Models (LLMs) have advanced this field, they often struggle with "dynamic" information. For instance, in a legal case with multiple defendants or a football match with several goals, standard models frequently lose track of which evidence corresponds to which entity. These models often suffer from hallucinations or miss "tail" information due to the lack of a robust mechanism for handling multiple instances of the same object type within a single document.

The TST Framework

To address these challenges, the authors propose TST (Text-Schema-Table), a framework that shifts from traditional "bottom-up" extraction to a "top-down," schema-guided approach. The TST architecture is built upon three primary components:

  1. Predefined Graph Schema: Unlike static table headers, TST utilizes a dynamic graph schema that defines entities, attributes, and relationships. It specifically identifies "dynamic" fields—those capable of having multiple instances.
  2. Type Recognizer: To mitigate the "lost in the middle" phenomenon common in standard Retrieval-Augmented Generation (RAG), TST employs a sentence-level chunking strategy. It integrates rule-based keyword matching with dense retrieval to isolate the exact sentences serving as evidence for specific fields.
  3. Two-Stage Agent: This core innovation splits the extraction process into two distinct phases:
  4. Stage 1 (Agent Counter): The agent first determines the population size by asking, "How many instances of [Entity X] are there?"
    • Stage 2 (Agent Extractor): Using the count as a structural anchor, the agent then performs targeted extraction (e.g., "What is the name of the first defendant?").
The TST framework architecture, illustrating the Type Recognizer and the Two-Stage Agent process.

Experimental Evaluation

The TST framework was evaluated on two demanding benchmarks:

  • LiveSum: A synthetic dataset of football match commentaries requiring the tracking of multiple players and various game events.
  • CPL (D): A dynamic subset of the Civil Private Lending dataset, featuring real-world legal judgments with varying numbers of plaintiffs, defendants, and lending agreements.

Key Results and Insights

The experimental results demonstrate that TST significantly improves extraction accuracy, particularly for complex documents. A key finding is that LLMs perform better when they are aware of the "population size" beforehand. By separating counting from extraction, the cognitive load on the model is reduced, leading to higher precision.

Furthermore, the TST framework allows smaller, fine-tuned models to compete with or even surpass much larger models. For example, a fine-tuned Llama-3-8B model using TST achieved a Root Mean Square Error (RMSE) of 0.034 on the "Easy" tier of LiveSum, outperforming GPT-4's score of 0.056. In the legal domain (CPL (D)), TST reached an F1-score of 87.15% for data cell extraction, a stark contrast to the 30.48% achieved by zero-shot GPT-4.

Comparative performance of various LLMs and TST-enhanced models across different difficulty levels.

Conclusion and Future Work

TST demonstrates that for specialized industrial tasks, agentic workflows and precise retrieval are often more critical than raw model scale. However, the framework currently relies on predefined domain schemas and some rule-based components in the Type Recognizer. Future research will focus on automating schema generation and enhancing the Type Recognizer's adaptability to diverse linguistic styles and languages.

Summary updated

BibTeX
@inproceedings{jiang2025tst,
  author = {Peiwen Jiang and Haitong Jiang and Ruhui Ma and Yvonne Jie Chen and Jinhua Cheng},
  title = {{TST: A Schema-Based Top-Down and Dynamic-Aware Agent of Text-to-Table Tasks}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure