TL;DR
Large Language Models (LLMs) are surprisingly poor at retrieving structured, multi-record data from their internal memory, even when they "know" the individual facts. This paper introduces RelationalFactQA (RFQA), a benchmark that reveals even frontier models fail to exceed 25% factual accuracy when generating tables, with performance degrading linearly as the requested output grows in complexity and size.
What Problem Does This Paper Address?
While we know LLMs hallucinate, most research focuses on "point-wise" factuality—asking for a single date, name, or entity. However, real-world applications in finance, medicine, and data analysis often require relational retrieval: generating a structured table of multiple entities and their attributes (e.g., "List all Nobel Prize winners in Physics from the 1990s with their country and discovery").
The authors identify a critical gap: an LLM might correctly state the area of Maricopa County in a single-value query but provide a completely different, incorrect value when asked to include that same data in a larger table of US counties. This suggests that the challenge isn't just a lack of knowledge, but a failure in the model's ability to compose and maintain factual consistency across structured, high-dimensional outputs.
Methods
The researchers define the task of Relational Fact Retrieval as a closed-book generation problem where the LLM acts as a "parametric database." They evaluated nine LLMs (ranging from 7B to 235B parameters) using three distinct retrieval techniques:
- Natural Language (NL): Direct prompting with a question.
- SQL: Providing the query in SQL syntax to see if formal semantics improve retrieval.
- Chain-of-Thought (CoT): A two-step process where the model first retrieves a broad base dataset and then applies relational algebra (filtering/sorting) in its "working memory" to produce the final table.
To handle long outputs that might hit token limits, they employed an iterative prompting strategy, asking the model to "list more values" until it returned an empty JSON object.
Datasets
The authors introduced the RelationalFactQA (RFQA) benchmark, which is significantly more demanding than existing datasets. While previous benchmarks like WikiSQL or TruthfulQA typically expect an answer of one tuple and one attribute, RFQA averages 27 tuples and 5.3 attributes per answer.
The dataset consists of 696 triples (NL question, SQL query, and gold-standard table) built through a hybrid pipeline:
- Manual Curation: High-quality examples adapted from the Spider, Bird, and Galois datasets, focusing on temporally stable world knowledge.
- Synthetic Generation: Tables derived from the YAGO 4.5 knowledge base, allowing for controlled variation in schema size and query complexity.
Key Insights and Ideas
- Output Size is a Factual Tax: The most striking finding is that accuracy for a specific fact (like a person's surname) drops as you ask for more surrounding attributes. The model's "working memory" appears to strain under the pressure of concurrent retrieval.
- Position Matters: Models exhibit "position sensitivity." An attribute is more likely to be correct if it is placed in the first column of the generated table rather than the middle.
- Structure Amplifies Latent Errors: Errors that remain hidden during simple Q&A become glaringly obvious in a tabular format, where the inflexible nature of the structure makes hallucinations easier to quantify at the cell level.
- Numerical vs. Categorical: LLMs are reasonably good at filtering by categories (e.g., "Nationality = American") but struggle significantly with numerical conditions (e.g., "Population > 1,000,000"), often returning partial results or hallucinating values to satisfy the filter.
Key Results
The experiments show a sobering reality for LLM factuality:
- Low Ceiling: Even the best-performing models (like GPT-4o and Qwen 3) rarely exceed 25% accuracy in Tuple Similarity (TS), a metric requiring the entire row to be correct.
- Linear Degradation: As shown in the figures below, Tuple Similarity scores plummet as the number of requested attributes or total cells increases.
- NL > SQL: Interestingly, querying with Natural Language generally outperformed SQL, suggesting that LLMs are better at mapping intent to their internal weights through language than through formal code.
- CoT Helps (Mostly): Breaking the task into steps (retrieval then filtering) improved cell-level recall (F1 score) but still struggled to fix row-level alignment issues.
Limitations and Future Work
The authors acknowledge several limitations:
- Static Knowledge: The benchmark uses static facts; it doesn't test the ability to retrieve fast-changing data (like current GDP).
- Cultural Bias: The sources are primarily English-language and Western-centric.
- Lexical Matching: The evaluation uses string/numeric matching, which might penalize semantically correct but lexically different answers (e.g., synonyms).
Future work suggests exploring architectural changes to improve structured recall and developing hybrid strategies that combine LLM generation with traditional database filtering techniques to mitigate numerical reasoning failures.
Summary updated