ChainCheck / README.md
thaki-AI's picture
Align card with ThakiCloud card conventions
825d836 verified
|
Raw History Blame Contribute Delete
5.78 kB
---
license: other
license_name: mixed-cc-by-4.0-and-apache-2.0
language:
- en
task_categories:
- text-classification
- question-answering
tags:
- rag
- evidence-sufficiency
- multi-hop-qa
- counterfactual
- benchmark
- evaluation
- chaincheck
pretty_name: ChainCheck
size_categories:
- 1K<n<10K
configs:
- config_name: musique_test
data_files: musique_test.jsonl.gz
- config_name: musique_confirmation
data_files: musique_confirmation.jsonl.gz
- config_name: twowiki_replication
data_files: twowiki_replication.jsonl.gz
---
# ChainCheck
A benchmark kit for **evidence-sufficiency scorers in RAG** that separates two things an ordinary benchmark mixes up: reacting to a broken reasoning chain, and reacting to any edit in the passages. 3,786 items over MuSiQue and 2WikiMultiHopQA, with a standalone evaluator.
An ordinary sufficiency benchmark asks whether a scorer ranks untouched passages above broken ones. Near-perfect scores on that question are common, and they can come from a scorer that flags *every* edited context. ChainCheck adds a matched control, so a scorer that tracks the chain and a scorer that tracks edits no longer look the same.
## Three cells
| Cell | Chain | Edit |
|---|---|---|
| A | intact | none |
| B | intact | consistent bridge-entity swap across all passages |
| D | broken (substitution in the later hop only) | yes |
- Nominal = AUC(A > D): what an ordinary benchmark reports.
- Chain effect CE = AUC(B > D) − 0.5: edit held fixed, chain varied.
- Edit effect EE = AUC(A > B) − 0.5: chain held fixed, edit varied.
- Chain selectivity Σ = CE − |EE|. A 95% lower bound above zero means the scorer reacts more to chain breaks than to edits.
These are matched contrasts, not an additive decomposition (Nominal is not CE + EE), and the fourth cell (broken chain, no edit) is not constructed.
## Getting started
```python
from datasets import load_dataset
ds = load_dataset("ThakiCloud/ChainCheck", "twowiki_replication", split="train")
print(ds[0]["cell"], ds[0]["query"], len(ds[0]["passages"]))
```
## Running the evaluation
Score every item with your system (higher = more sufficient), write one `{"item_id": ..., "score": float}` per line, then:
```bash
python chaincheck_eval.py --data twowiki_replication.jsonl.gz --scores my_scores.jsonl --exclude-cb27b
```
The evaluator needs only numpy. It reports Nominal, CE, EE and Σ with pair-bootstrap intervals (2,000 resamples, seed 0), separately for real and synthetic replacement entities. `--exclude-cb27b` drops pairs that Qwen3.8-27B answers closed-book, as the paper does.
## Files
| File | Rows | Source license |
|---|---|---|
| `musique_test.jsonl.gz` | 1,716 | MuSiQue (Trivedi et al., TACL 2022), CC BY 4.0 |
| `musique_confirmation.jsonl.gz` | 678 | MuSiQue (Trivedi et al., TACL 2022), CC BY 4.0 |
| `twowiki_replication.jsonl.gz` | 1,392 | 2WikiMultiHopQA (Ho et al., COLING 2020), Apache-2.0 |
Each row is one (question, passage set) item: `item_id`, `pair_id`, `variant` (`real`, or `fict` for a synthetic replacement entity), `cell` (A/B/D), `query`, `passages`, `answer`, `bridge`, `replacement`, `chain`, `edit`, `earlier_support`, `later_support`, `label_sufficient`, `cb_27b_correct` and `source`. Only quadruples that pass the Q1 to Q9 validator are included.
## Baseline (Qwen3.8-27B zero-shot judge)
| File | Variant | Pairs | Nominal | Chain effect | Edit effect | Σ [95% CI] |
|---|---|---|---|---|---|---|
| MuSiQue test | real | 324 | 0.895 | +0.309 | +0.108 | +0.201 [+0.123, +0.278] |
| MuSiQue test | fict | 224 | 0.906 | +0.397 | -0.009 | +0.388 [+0.312, +0.420] |
| MuSiQue confirmation | real | 122 | 0.943 | +0.344 | +0.164 | +0.180 [+0.066, +0.295] |
| MuSiQue confirmation | fict | 98 | 0.908 | +0.449 | -0.031 | +0.418 [+0.316, +0.469] |
| 2Wiki replication | real | 295 | 0.905 | +0.320 | +0.192 | +0.129 [+0.054, +0.200] |
| 2Wiki replication | fict | 141 | 0.929 | +0.443 | +0.046 | +0.397 [+0.305, +0.454] |
Scored with the same pipeline as the released judges. The paper's own run of this judge ranks items essentially identically; its Σ values differ from this table within the reported intervals because A and B score almost the same and bf16 differences flip some comparisons.
## What not to trust
- Nominal is near its ceiling for almost every system. Do not rank systems by it alone; that is the failure this kit exists to expose.
- A and B differ by one entity and often score almost the same, so EE is sensitive to small numerical differences in the scorer. Compare systems scored on the same hardware and precision, and read Σ with its interval.
- MuSiQue confirmation has 122 real pairs after filtering; its intervals are wide.
- Edits are entity substitutions on two-hop chains over Wikipedia. Numerical errors, temporal staleness and longer chains are not covered.
## Provenance
Labels follow mechanically from source provenance and the validator; no human or LLM labels. `musique_test` and `musique_confirmation` derive from MuSiQue (Trivedi et al., TACL 2022); `twowiki_replication` derives from 2WikiMultiHopQA (Ho et al., COLING 2020), compositional and inference question types. The confirmation slice and the 2Wiki replication were built after the protocol was frozen.
## License
Each file keeps its source license: MuSiQue-derived files are CC BY 4.0, the 2WikiMultiHopQA-derived file is Apache-2.0, and passage text originates from Wikipedia (CC BY-SA). The evaluator script is Apache-2.0. Cite the original datasets alongside this one.
## Models
Judges trained with these controls (4B, 9B, 27B): [ChainCheck collection](https://huggingface.co/ThakiCloud).
## Paper
ChainCheck: When Near-Perfect Evidence-Sufficiency Scores Fail to Distinguish Chain-Sensitive Systems — preprint forthcoming