Weaver: Interweaving SQL and LLM for Table Reasoning

Rohit Khoja, Devanshu Gupta, Yanjie Fu, Dan Roth, Vivek Gupta


Abstract
Querying tables with unstructured data is challenging due to the presence of text (or image), either embedded in the table or in external paragraphs, which traditional SQL struggles to process, especially for tasks requiring semantic reasoning. While Large Language Models (LLMs) excel at understanding context, they face limitations with long input sequences. Existing approaches that combine SQL and LLM typically rely on rigid, predefined workflows, limiting their adaptability to complex queries. To address these issues, we introduce Weaver, a modular pipeline that dynamically integrates SQL and LLM for table-based question answering (Table QA). Weaver generates a flexible, step-by-step plan that combines SQL for structured data retrieval with LLMs for semantic processing. By decomposing complex queries into manageable subtasks, Weaver improves accuracy and generalization. Our experiments show that consistently outperforms state-of-the-art methods across four Table QA datasets, reducing both API calls and error rates.
Anthology ID:
2025.emnlp-main.1436
Volume:
Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing
Month:
November
Year:
2025
Address:
Suzhou, China
Editors:
Christos Christodoulopoulos, Tanmoy Chakraborty, Carolyn Rose, Violet Peng
Venue:
EMNLP
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
28270–28296
Language:
URL:
https://preview.aclanthology.org/ingest-emnlp/2025.emnlp-main.1436/
DOI:
Bibkey:
Cite (ACL):
Rohit Khoja, Devanshu Gupta, Yanjie Fu, Dan Roth, and Vivek Gupta. 2025. Weaver: Interweaving SQL and LLM for Table Reasoning. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 28270–28296, Suzhou, China. Association for Computational Linguistics.
Cite (Informal):
Weaver: Interweaving SQL and LLM for Table Reasoning (Khoja et al., EMNLP 2025)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest-emnlp/2025.emnlp-main.1436.pdf
Checklist:
 2025.emnlp-main.1436.checklist.pdf