[Feature] Add CoFaithfulQA (ParamMute, NeurIPS 2025): natural context-vs-parametric knowledge conflict benchmark for RAG

Open
#2,287 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
python

Research direction

Read the official eval_CoFaithfulQA.py and Section 5 of the cited paper, then inspect existing benchmark DataAdapter implementations and their tests in EvalScope. Implement the six dataset subsets, prompt schema, normalization and scoring described in the issue, and add unit tests plus bilingual benchmark docs. Done means the mock evaluation command passes and the metrics match the official deterministic definitions.

Written by the indexing model from the issue text.

Description

功能描述 / Feature Description

Add CoFaithfulQA (from the NeurIPS 2025 paper ParamMute: Suppressing Knowledge-Critical FFNs for Faithful Retrieval-Augmented Generation, NeurIPS Proceedings · arXiv:2502.15543) as a deterministic RAG contextual-faithfulness benchmark in EvalScope.

  • Public Dataset (MIT): chengpingan/CoFaithfulQA (pinned revision: 0eb28630fe6187a54b1394227457685acead4181, 6 per-source subsets exposed as standard HF configs with test splits, 8,529 public rows total):
    • hotpotqa (hotpotq_kc.jsonl, 1,476 rows)
    • newsqa (NewsQA_kc.jsonl, 934 rows)
    • natural_questions (NaturalQuestionsShort_kc.jsonl, 1,479 rows)
    • searchqa (SearchQA_kc.jsonl, 1,497 rows)
    • squad (SQuAD_kc.jsonl, 2,351 rows)
    • triviaqa (TriviaQA-web_kc.jsonl, 792 rows)
  • Official Scoring & Reference Implementation: OpenBMB/ParamMute/src/3_evaluate/eval_CoFaithfulQA.py and Section 5 of the paper.
  • No external LLM judge or Docker sandbox required: Scoring is fully deterministic and local.

需求背景 / Background

EvalScope covers general QA, reasoning, and agent-safety benchmarks, but does not currently include a dedicated benchmark for RAG contextual faithfulness under natural context–memory knowledge conflicts. Unlike synthetic counterfactual datasets that edit passages into false statements, CoFaithfulQA retains the original accurate QA passages and selects instances where an LLM's closed-book parametric answer consistently disagrees with the passage-supported answer. Evaluating models on CoFaithfulQA directly measures whether an LLM follows accurate retrieved evidence or falls back to conflicting parametric memory.

预期行为 / Expected Behavior

  • Add evalscope/benchmarks/cofaithfulqa/ implementing a DataAdapter subclass covering the 6 QA source subsets (hotpotqa, newsqa, natural_questions, searchqa, squad, triviaqa).
  • Each sample uses the official prompt schema from eval_CoFaithfulQA.py ({context}\nQ: {question}\nA: , with optional instruction prefix) and reads fields question, context, answers (gold context answers), and parametric_answer (conflicting memory answer).
  • Compute the official deterministic metrics after standard QA normalization (lowercase, strip punctuation/articles/extra whitespace):
    • Context Recall (ConR / P_c, higher is better): normalized substring match against any gold reference in answers, counted as 0 if the prediction also matches parametric_answer.
    • Memory Recall (MemR / P_o, lower is better): normalized substring match against parametric_answer.
    • Memorization Ratio (MR, lower is better): MemR / (MemR + ConR) * 100.
    • Standard EM and token-level F1 against answers.
  • Include unit tests for normalization/scoring and pass evalscope eval --datasets cofaithfulqa --model dummy --eval-type mock_llm --limit 5, plus bilingual EN/ZH benchmark docs via make docs-update.

其他信息 / Additional Information

  • I am the first author of ParamMute / CoFaithfulQA and can also mirror the dataset on ModelScope if preferred for MsDataset.load().
  • Note on dataset counts: as documented on the dataset card, the 6 public JSONL files contain 8,529 raw rows, whereas Table 1 in the paper reports deduplicated construction counts; the benchmark documentation will state this explicitly alongside the pinned revision.
  • Once labeled accepted, I am happy to submit the implementation PR linking this issue.
Dominant language
Python
Stars
3.8k
Forks
606
Avg merge
1d 1h
Merged PRs (30d)
189

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from modelscope/evalscope

All issues in modelscope/evalscope

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.