TableRAG: A Novel Approach for Augmenting LLMs with Information from Retrieved Tables - Souza, Elvis A. de; Silva, Patricia F. da; Gomes, Diogo; Batista, Vitor; Batista, Evelyn; Pacheco, Marco (Anais do Simpósio Brasileiro de Tecnologia da Informação e da Linguagem Humana (STIL), 2024)
We present TableRAG, a novel pipeline designed to integrate tabular data into traditional Retrieval-Augmented Generation (RAG) systems. Our approach is composed of three main parts: (i) generating textual representations of tables; (ii) indexing table representations in vector databases for retrieval, and (iii) employing large language models to generate SQL or Python code for data manipulation over a given table. We assessed the effectiveness of TableRAG by comparing retrieval and re-ranking accuracies over the OTT-QA benchmark and by utilizing both open and closed-source LLMs to generate code for answering questions from the WikiTableQuestions benchmark. Our best results show 86.7% HITS@5 for retrieval and 74% accuracy for Q&A, demonstrating the feasibility of integrating tabular data into RAG systems with high accuracy.