DataFactory: Collaborative Multi-Agent Framework for Advanced Table Question Answering

Tong Wang, Chi Jin, Yongkang Chen, Huan Deng, Xiaohui Kuang, Gang ZhaoarXiv 2026 · DOI

TL;DR

DataFactory is an autonomous multi-agent framework that redefines Table Question Answering (TableQA) by combining structured database querying with relational knowledge graphs. Orchestrated by a "Data Leader" using the ReAct paradigm, the framework replaces rigid, fixed workflows with flexible natural language consultation between specialized teams, yielding massive accuracy improvements over state-of-the-art baselines.

What Problem Does This Paper Address?

While Large Language Models (LLMs) excel at many natural language tasks, Table Question Answering (TableQA)—asking questions about structured tabular data—remains a major hurdle. Current LLM approaches generally suffer from three critical limitations:

  1. Context Length Constraints: Massive enterprise tables simply cannot fit into an LLM's prompt window.
  2. Hallucinations: LLMs frequently invent data or misinterpret structural relationships, leading to unreliable answers.
  3. Reasoning Limitations: Single-agent architectures struggle with complex, multi-hop reasoning that requires both numerical computation (e.g., calculating averages in SQL) and semantic relationship mapping (e.g., tracing connections in a graph).

Existing multi-agent solutions often rely on rigid, pre-programmed workflows that break down when faced with ambiguous queries or unexpected data formats.

Methods

DataFactory introduces a tripartite collaborative architecture that splits the cognitive load across three distinct components:

  • The Data Leader: Acting as the central coordinator, the Data Leader uses the ReAct (Reasoning and Acting) paradigm to execute an "explore-verify-analyze" strategy. Instead of following a hardcoded path, it dynamically consults with specialist teams using natural language, adaptively adjusting its plan based on intermediate findings.
  • The Database Team: Specialized in structured data operations, this team handles precise data filtering, numerical computations, and large-scale aggregations by translating natural language into SQL queries.
  • The Knowledge Graph (KG) Team: This team automatically transforms flat tabular data into semantic networks using a formalized mapping function ($\mathcal{T}: \mathcal{D} \times \mathcal{S} \times \mathcal{R} \rightarrow \mathcal{G}$). It excels at multi-hop reasoning and relationship discovery, querying the generated graph via Cypher.
Figure 1: Overview of the LLM-based multi-agent DataFactory framework for TableQA. The system consists of a Database Team, a Knowledge Graph Team, and a Data Leader that orchestrates their collaboration from an initial data phase through three processing phases: information storage, knowledge extraction, and insight generation.

To combat hallucinations, the framework implements Context Engineering. Retrieval-Augmented Generation (RAG) is applied to inject historical QA records, Data Definition Language (DDL) schemas, and domain knowledge directly into the agents' prompts.

Datasets

The authors evaluated DataFactory across three distinct TableQA benchmarks, each testing a different analytical dimension:

  • TabFact: A large-scale dataset for table-based fact verification (binary classification).
  • WikiTableQuestions (WikiTQ): A dataset focused on complex computational analysis, aggregation, and sorting over Wikipedia tables.
  • FeTaQA: A challenge dataset requiring multi-hop reasoning and free-form, conversational text generation.

Key Insights and Ideas

  • The SQL-Graph Synergy: Tables are great for math; graphs are great for relationships. By allowing the Database and KG teams to work together, the Data Leader can feed quantitative SQL results into the KG team as semantic constraints, creating a highly efficient cross-modal information flow.
  • The Inverted U-Shape of Collaboration: More communication isn't always better. The authors discovered that agent performance peaks at a low-to-medium interaction frequency (1–5 team calls). Beyond 6 calls, performance drops sharply due to decision confusion, error accumulation, and disrupted reasoning chains.
  • Graceful Degradation: The multi-agent architecture acts as a buffer for smaller models. Even when powered by smaller, open-source models (like Qwen3-14B), specialized team coordination allows them to outperform much larger models that rely on simple direct prompting.

Key Results

The framework was rigorously tested using eight LLMs from five different providers (including Claude 4.0 Sonnet, GPT-4o mini, Gemini 2.5 Flash, and DeepSeek-V3).

  • Massive Baseline Gains: DataFactory improved accuracy by an average of 20.2% on TabFact and 23.9% on WikiTQ over standard baselines.
  • The Power of the KG Team: Ablation studies proved the necessity of the graph-based approach. Including the KG team alongside the Database team boosted performance by 5.5% on TabFact, 14.4% on WikiTQ, and 17.1% (ROUGE-2) on FeTaQA compared to a SQL-only setup.
  • Top Performer: Claude 4.0 Sonnet achieved the highest overall scores, leading with 83.2% accuracy on WikiTQ and a 0.6234 ROUGE-1 F-score on FeTaQA.

Limitations and Future Work

Despite its strong performance, DataFactory has a few trade-offs:

  • Token Consumption: The multi-agent deliberation process inherently consumes significantly more tokens than single-agent or direct prompting methods, increasing operational costs.
  • Lack of Adaptive Stopping: The framework currently relies on hard limits for interaction rounds. Implementing an automated, adaptive stopping mechanism is crucial to prevent models from entering the performance-degrading "excessive talking" phase.
  • Scalability to Streaming Data: The current data-to-KG pipeline is batch-optimized. Future work will focus on adapting the framework for real-time streaming and multi-tenant enterprise workloads.

Summary updated

BibTeX
@misc{wang2026datafactory,
  author = {Tong Wang and Chi Jin and Yongkang Chen and Huan Deng and Xiaohui Kuang and Gang Zhao},
  title = {{DataFactory: Collaborative Multi-Agent Framework for Advanced Table Question Answering}},
  year = {2026},
  eprint = {2603.09152},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.09152},
}
Figure