← Latest papers
💬 NLP

Faithfulness-QA: A Counterfactual Entity Substitution Dataset for Training Context-Faithful RAG Models

This paper introduces Faithfulness-QA, a large-scale dataset of nearly 100,000 counterfactually modified QA samples designed to train and evaluate Retrieval-Augmented Generation models to prioritize retrieved context over internal parametric memory, thereby addressing the critical issue of unfaithful generation.

Original authors: Li Ju, Junzhe Wang, Qi Zhang

Published 2026-04-29
📖 4 min read☕ Coffee break read

Original authors: Li Ju, Junzhe Wang, Qi Zhang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a very smart student who has read millions of books and memorized a huge amount of facts. This student is great at answering questions, but they have a bad habit: when you give them a new article to read and ask a question about it, they often ignore the article entirely. Instead, they just blurt out what they remember from their own memory, even if their memory is wrong or outdated.

In the world of Artificial Intelligence, this is called a RAG (Retrieval-Augmented Generation) model. The goal of RAG is to make the AI read the new article (the "context") and answer based only on that. But often, the AI is too stubborn and relies on its "parametric memory" (its pre-trained brain) instead.

This paper introduces a solution called Faithfulness-QA. Think of it as a special training camp designed to teach the AI to actually listen to the new article.

The Problem: The "Stubborn Student"

Usually, when we train these AI models, the question and the answer in the article match what the AI already knows. So, the AI gets the answer right, but we don't know why. Did it read the article? Or did it just guess correctly because it already knew the fact?

It's like asking a student, "Who was the first president of the US?" while showing them a picture of George Washington. If they say "George Washington," they might have read the picture, or they might just be reciting what they memorized in kindergarten. We can't tell the difference.

The Solution: The "Trick Question" Method

To fix this, the researchers created a massive dataset of 99,094 "trick questions." They used a clever method called Counterfactual Entity Substitution.

Here is how they built it, using a simple analogy:

  1. The Source Material: They started with two huge libraries of existing questions and answers (SQuAD and TriviaQA).
  2. The "Entity Bank": They built a giant digital Rolodex containing nearly 77,000 names, places, and dates (like "Paris," "Marie Curie," or "July 4th").
  3. The Swap: For every question, they found the specific name or place in the story (the "answer-bearing entity") and swapped it with a different one from their Rolodex that fits the same category.
    • Original Story: "The Virgin Mary appeared to Saint Bernadette in 1858."
    • The Swap: They replaced "Saint Bernadette" with "Kiyomori" (another person).
    • New Story: "The Virgin Mary appeared to Kiyomori in 1858."
  4. The Conflict: Now, the AI's memory says "It was Saint Bernadette!" but the new story says "It was Kiyomori!"

Why This Works

This creates a knowledge conflict. The AI is forced to choose:

  • Option A: Ignore the story and give the answer from its memory (Saint Bernadette).
  • Option B: Ignore its memory and trust the story (Kiyomori).

If the AI is "faithful," it must choose Option B. By training on thousands of these conflicts, the AI learns that when there is a conflict, the new story is the boss.

The Quality Control

The researchers didn't just swap words randomly; they built a strict "quality filter" (like a very picky editor).

  • They checked that the new name actually fit the sentence.
  • They made sure the story wasn't too short or broken.
  • They verified that the new name wasn't already in the story.

They tested this on a random sample of 200 stories, and 100% of them passed these checks. The final dataset is huge (99,000 samples), covering eight different types of entities like people, organizations, dates, and locations.

What They Gave Us

The paper releases three main things to the public:

  1. The Dataset: The 99,000 trick questions ready for training.
  2. The Pipeline: The code that automatically creates these trick questions.
  3. The Entity Bank: The list of 77,000 names and places used for the swaps.

The Bottom Line

The paper claims that by using this dataset, we can train AI models to stop being "stubborn students" who ignore new information. Instead, they become "faithful readers" who prioritize the text in front of them over what they think they already know. The authors note that while the system is very good at swapping names, it doesn't fix pronouns (like changing "he" to "she" if the name changes), and it currently only works in English. But for its specific purpose—teaching AI to trust the context over its memory—it is a massive, high-quality new tool.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →