TabRAG: Tabular Document Retrieval via Structured Language Representations

Jacob Si, Mike Qu, Michelle Lee, Yingzhen Li

TL;DR

Standard Retrieval-Augmented Generation (RAG) pipelines often collapse when ingesting documents with complex tables because naive text extraction destroys 2D spatial layouts. TabRAG resolves this with an end-to-end, parsing-based framework that extracts tabular data into structured row-column-value triples via a Vision Language Model (VLM), converts them into natural language sentences using an LLM, and indexes them into standard dense vector stores. This produces massive leaps in downstream question-answering accuracy—improving generation accuracy by up to ~25%—without requiring any model fine-tuning.

What Problem Does This Paper Address?

Traditional RAG pipelines rely heavily on the sequential nature of standard text. In contrast, tables encode meaning across two dimensions: cell interpretations depend strictly on row headers, column hierarchies, merged cells, and subtle alignment cues.

Existing approaches hit two major roadblocks:

  1. Fine-tuning multimodal/tabular embedding models directly on target corpora requires expensive hardware and does not generalize easily to unseen documents.
  2. Standard parsing tools (such as PyMuPDF or Tesseract OCR) flatten documents linearly, stripping structural context and garbling hierarchical headers. While VLMs can parse visual layout into machine-readable structures (like JSON), raw JSON syntax mismatches the natural text distributions foundational embedding models were trained on, degrading dense retrieval.

Methods

TabRAG bridges the gap between tabular layout and dense embedding models through a modular, four-step pipeline:

[Document Page] 
   └──> 1. Layout Detection (Crop tables, text, figures)
   └──> 2. VLM Semantic Extraction (Extract cells into JSON triples)
   └──> 3. LLM Naturalization (Convert triples to natural declarative text)
   └──> 4. Dense Retrieval & Generation (Standard Vector DB + LLM QA)
  1. Layout Detection: A vision model segments the document page into localized components (tables, figures, text, titles) to prevent global attention from blurring fine-grained cell relationships. A full-page fallback mechanism triggers if layout segmentation fails.
  2. VLM Structured Extraction: Using Qwen2.5-VL-32B-Instruct, tabular regions are parsed into explicit JSON arrays containing {"row": ..., "column": ..., "value": ...} triples. Hierarchical multi-level headers are explicitly preserved via arrow notation (e.g., 2024 -> Q1 -> Revenue).
  3. LLM Language Naturalization: To make the representation embedding-friendly, Qwen3-14B verbalizes each JSON triple into a concise, natural language sentence (e.g., "In Q1 of 2024, the Sales Revenue is 1,000"), explicitly banning meta-table phrases like "the value for row A column B is C".
  4. Retrieval & In-Context Generation: The generated textual rationales are encoded with Qwen3-Embedding-8B, indexed into a vector database, retrieved via dense similarity (Top-$k$), and answered using Qwen3-8B.

Datasets

The authors evaluate TabRAG across four document QA benchmarks covering diverse visual and tabular structures:

  • TAT-DQA: 312 financial PDF pages containing semi-structured tables and hybrid textual data (1,640 QA pairs).
  • MP-DocVQA: Multi-page real-world document images filtered for tabular content (500 pages, 515 QA pairs).
  • WikiTableQuestions (WikiTQ): Complex QA over semi-structured web tables involving comparisons, superlatives, and arithmetic (243 pages, 511 QA pairs).
  • SPIQA: Scientific paper question answering on arXiv PDF articles featuring complex tables and domain-specific figures (1,090 pages, 300 QA pairs).

Key Insights and Ideas

  • JSON is great for parsers, bad for embedding models: Pretrained embedding models are optimized on natural text. Feeding raw JSON strings causes a token distribution mismatch that damages semantic similarity search. Verbalizing cell triples into fluent sentences bridges this modality gap.
  • Two-stage translation avoids hallucination: Instead of asking a VLM to describe a table directly in freeform text (which risks hallucinations or missed rows), TabRAG first locks down the exact coordinates and values in JSON triples, then uses an LLM solely to rephrase those grounded facts.
  • Explicit region extraction beats whole-page visual embeddings: Global page embeddings often wash out micro-level dependencies (such as row-column header alignment). Segmenting individual components beforehand preserves local geometry.

Key Results

  • Substantial Generation Gains: On generation accuracy (exact match / LLMLogScore), TabRAG substantially outperforms text-based (PyMuPDF), OCR-based (PyTesseract), and direct VLM baselines:
  • TAT-DQA: 92.44% accuracy (vs. 66.83% for PyMuPDF and 63.54% for direct Qwen2.5-VL).
  • MP-DocVQA: 86.26% accuracy (vs. 83.59% for Qwen2.5-VL and 59.73% for PyTesseract).
  • WikiTQ: 69.08% accuracy (vs. 67.32% for Qwen2.5-VL and 59.49% for PyMuPDF).
  • SPIQA: 60.63% L3Score (outperforming all baselines, which scored 52.28%–56.14%).
  • Competitive Dense Retrieval: On MRR@10, TabRAG achieved the highest retrieval rank on TAT-DQA (77.86%) and MP-DocVQA (84.98%), and performed competitively on WikiTQ (86.27%) and SPIQA (64.86%).
  • Compute Overhead: Total inference time remains comparable to directly calling a full-page VLM, as the overhead of layout detection and LLM naturalization is negligible relative to high-resolution visual processing.

Limitations and Future Work

  • Pipeline Cascading: Errors in earlier steps (e.g., misidentified bounding boxes or incorrect cell extractions by the VLM) can propagate into the LLM summaries, although the full-page fallback helps mitigate catastrophic detection failures.
  • Ablation Studies: The paper leaves systematic ablations regarding model selection (varying the VLM, LLM, or embedding backbones) and individual module contributions for future work.
  • Large Table Verbosity: Generating one natural language sentence per table cell could inflate token counts for massive tables with hundreds of rows, potentially straining context windows.

Summary updated

BibTeX
@inproceedings{si2025tabrag,
  author = {Jacob Si and Mike Qu and Michelle Lee and Yingzhen Li},
  title = {{TabRAG: Tabular Document Retrieval via Structured Language Representations}},
  booktitle = {AITD @ EurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=T4aApVYr7x},
}

Loading related content...

Figure