# Knowing When to Ask -- Bridging Large Language Models and Data

arXiv: https://arxiv.org/abs/2409.13741 · HTML: https://mlsanity.com/paper/2409.13741/

## Key facts

- Cited by 4 papers in the map (data through 14 Oct 2026).
- Builds on 7 of its 14 references that are in the map.
- First posted on arXiv 10 Sep 2024.

## Builds on (most cited first, 7 of 7)

- [Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks](https://mlsanity.com/paper/2005.11401/) (2020)
- [Toolformer: Language Models Can Teach Themselves to Use Tools](https://mlsanity.com/paper/2302.04761/) (2023)
- [Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context](https://mlsanity.com/paper/2403.05530/) (2024)
- [Retrieval-Augmented Generation for Large Language Models: A Survey](https://mlsanity.com/paper/2312.10997/) (2023)
- [Gemma 2: Improving Open Language Models at a Practical Size](https://mlsanity.com/paper/2408.00118/) (2024)
- [LIMA: Less Is More for Alignment](https://mlsanity.com/paper/2305.11206/) (2023)
- [Data Commons](https://mlsanity.com/paper/2309.13054/) (2023)

## Built on by (most cited first, 4 of 4)

- [Large-scale moral machine experiment on large language models](https://mlsanity.com/paper/2411.06790/) (2024)
- [RAGOps: Operating and Managing Retrieval-Augmented Generation Pipelines](https://mlsanity.com/paper/2506.03401/) (2025)
- [SpecHop: Continuous Speculation for Accelerating Multi-Hop Retrieval Agents](https://mlsanity.com/paper/2605.21965/) (2026)
- [A Layered Architecture for Developing and Enhancing Capabilities in Large Language Model-based Software Systems](https://mlsanity.com/paper/2411.12357/) (2024)

## Abstract (arXiv)

Large Language Models (LLMs) are prone to generating factually incorrect information when responding to queries that involve numerical and statistical data or other timely facts. In this paper, we present an approach for enhancing the accuracy of LLMs by integrating them with Data Commons, a vast, open-source repository of public statistics from trusted organizations like the United Nations (UN), Center for Disease Control and Prevention (CDC) and global census bureaus. We explore two primary methods: Retrieval Interleaved Generation (RIG), where the LLM is trained to produce natural language queries to retrieve data from Data Commons, and Retrieval Augmented Generation (RAG), where relevant data tables are fetched from Data Commons and used to augment the LLM's prompt. We evaluate these methods on a diverse set of queries, demonstrating their effectiveness in improving the factual accuracy of LLM outputs. Our work represents an early step towards building more trustworthy and reliable LLMs that are grounded in verifiable statistical data and capable of complex factual reasoning.
