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

Li Ju, Junzhe Wang, Qi Zhang
4/28/2026
2 citations
cs.CLcs.AI
benchmark-datasetrag

Official code: qzhangFDU/faithfulness-qa-dataset (5 stars, Python, last commit 2026-08-06).

Abstract

Retrieval-Augmented Generation (RAG) models frequently produce answers grounded in parametric memory rather than the retrieved context, undermining the core promise of retrieval augmentation. A fundamental obstacle to fixing this unfaithfulness is the lack of training data that explicitly requires models to prefer context over internal knowledge.

Show full abstract

We introduce Faithfulness-QA, a large-scale dataset of 99,094 samples constructed through counterfactual entity substitution. Starting from two established extractive QA benchmarks--SQuAD and TriviaQA--we automatically identify answer-bearing named entities in each context, replace them with type-consistent alternatives drawn from a curated bank of 76,953 entities, and thereby manufacture controlled knowledge conflicts between context and parametric memory. Rigorous quality filtering ensures 100% pass rates across four automated checks on random 200-sample audits. We release the full dataset, the construction pipeline, and a typed entity bank covering eight named entity categories. Faithfulness-QA is designed as a training resource for attention-based faithfulness objectives and as an evaluation benchmark for measuring context-grounding behavior in RAG systems. Data and code are available at https://github.com/qzhangFDU/faithfulness-qa-dataset.

View on arXivView PDF

Code Implementations(1)

RAG Faithfulness Evaluation Benchmark

51PythonApr 22, 20263 months ago

Similar Papers

Cite this paper

@article{ju2026faithfulnessqa,
  title  = {Faithfulness-QA: A Counterfactual Entity Substitution Dataset for Training Context-Faithful RAG Models},
  author = {Li Ju and Junzhe Wang and Qi Zhang},
  year   = {2026},
  eprint = {2604.25313},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2604.25313v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2604.25313.svg)](https://codeofpaper.com/paper/2604.25313)

Discussion