TL;DR
The TACT (Text And Calculations through Tables) paper introduces a new benchmark designed to test the ability of Large Language Models (LLMs) to perform complex, multi-step reasoning and data aggregation across unstructured text. The authors find that even top-tier models like GPT-4o and Claude 3.5 Sonnet struggle significantly with these tasks, and they propose a modular "Information Extraction (IE) as a tool" framework that improves performance by breaking the problem into structured table generation and code execution.
What Problem Does This Paper Address?
While LLMs have become remarkably good at general conversation and simple information retrieval, they often stumble when asked to perform "aggregative reasoning." This involves finding multiple pieces of information scattered throughout a text, organizing them, and then performing a calculation or count based on a complex instruction (e.g., "Calculate the total weight of medium crates if their quantity was equal to the number of small crates").
The core challenge is the "gap" between linguistic understanding and mathematical execution. Current models often try to solve these problems in a single "black box" step, which leads to errors in counting, coreference resolution (tracking which entity is which), and basic arithmetic. The authors argue that we need better benchmarks to diagnose these failures and better modeling strategies to bridge the gap between text and structured data.
Methods
The authors propose a shift from end-to-end generation to a modular approach called IE as a Tool. Instead of asking the LLM to jump straight from text to an answer, the process is decomposed into three distinct stages:
- Table Generation: An information extraction tool (implemented via few-shot prompting) converts the relevant parts of the unstructured text into a structured CSV-style table.
- Pandas Command Generation: A second tool formulates a precise, single-line Python/Pandas command based on the generated table and the user's natural language instruction.
- Execution: The Pandas command is executed against the table (either by a code interpreter or the LLM itself) to derive the final numerical answer.
This "divide and conquer" strategy allows researchers to pinpoint exactly where the reasoning chain breaks down—whether the model failed to extract the data correctly or failed to write the correct logic to process it.
Datasets
The primary contribution is the TACT dataset, which consists of 124 expert-curated examples (plus 4 few-shot examples).
- Source: It is built on top of InstructIE, an existing dataset of texts and associated tables.
- Content: Each TACT instance includes the original text, a complex "Calculate" or "Count" instruction, a natural language query over the table, a gold-standard Pandas command, and the final numerical answer.
- Complexity: The instructions require advanced NLP skills like coreference resolution, multi-document summarization, and numerical range entailment.
Key Insights and Ideas
- The "Black Box" Failure: Standard prompting (Generic) and even Chain-of-Thought (CoT) perform poorly on TACT. The best models achieve less than 38% accuracy on the end-to-end task.
- Table Generation is a Bottleneck: Even when models are capable of writing the correct code, they often fail because the intermediate table they generated was missing data or syntactically invalid.
- Modular Gains: Using "IE as a tool" (even with model-generated tables) provides a significant boost—up to 12% improvement over conventional prompting.
- The "Gold" Gap: There is a massive performance gap between using model-generated artifacts and "Gold" (human-verified) tables and commands. For example, Claude 3.5 Sonnet jumps from ~42% accuracy to ~74% when provided with a perfect table and command, suggesting that the "reasoning" is there, but the "extraction" and "coding" are the current weak links.
Key Results
The authors evaluated a suite of models including GPT-4o, Claude 3.5 Sonnet, Gemini 1.5 Pro, and various Llama/Mistral variants.
- Top Performers: GPT-4o and Claude 3.5 Sonnet led the pack. In the "Generic" setting, GPT-4o achieved 30.1% accuracy.
- Tool-Augmented Success: With the "IE as a tool" (With Pandas) setup, GPT-4o improved to 42.2% and Claude 3.5 Sonnet reached 42.1%.
- Small Model Struggles: Smaller models like Llama-2-13b and Mistral-7b performed very poorly (often <10%), showing that aggregative reasoning is currently an emergent property of much larger models.
- Table Validity: While top models can generate valid CSV structures ~95% of the time, their "Semantic Similarity" to the ground truth remains a hurdle, often missing the specific rows needed for the calculation.
Limitations and Future Work
The authors acknowledge a few key limitations:
- Error Propagation: Because the tools are used sequentially, an error in the table generation phase inevitably leads to a wrong answer, regardless of how good the Pandas command is.
- Numerical Focus: TACT is specifically designed for numerical and aggregative tasks; it doesn't necessarily translate to other types of complex reasoning (like legal or moral reasoning).
- Future Directions: The authors suggest that future work should focus on optimizing the individual "tools"—improving the reliability of information extraction and the robustness of code generation—rather than just scaling the end-to-end model. They also see potential in developing more versatile tools that can handle a broader range of non-numerical tasks.
Summary updated