coft-eval
Coarse-to-Fine Highlighting: Reducing Knowledge Hallucination in Large Language Models — Lv et al. (2024) (arXiv:2410.15116, 2024)
What this evaluates
Evaluates the ability of retrieval-augmented language models to mitigate knowledge hallucination and maintain robustness in reading comprehension and question-answering tasks when processing long, noisy contexts with selective highlighting.
Datasets
- FELM — total ?; splits: test (-1)
- RACE-H — total ?; splits: test (-1)
- RACE-M — total ?; splits: test (-1)
- Natural Questions — total ?; splits: test (-1)
- TriviaQA — total ?; splits: test (-1)
- WebQ — total ?; splits: test (-1)
Metrics
F1 score (primary) — range: [0, 1]
- Harmonic mean of precision and recall: 2 * (precision * recall) / (precision + recall).
precision — range: [0, 1]
- Ratio of correctly predicted positive tokens to the total predicted tokens.
recall — range: [0, 1]
- Ratio of correctly predicted positive tokens to the total actual positive tokens.
EM — range: [0, 1]
- Exact-match accuracy: binary score of 1 if the model's prediction exactly matches the ground truth string, 0 otherwise.
Input / output format
Input: Context passages (optionally pre-processed with COFT highlighting), questions, and retrieved documents. All backbone models use greedy decoding with temperature=0.
Output: Free-text answers or responses generated by the backbone LLM.
Scoring recipe
def compute_metrics(preds, golds):
f1s, ems, precisions, recalls = [], [], [], []
for p, g in zip(preds, golds):
p_tok, g_tok = set(normalize(p)), set(normalize(g))
if not p_tok:
precisions.append(0.0); recalls.append(0.0); f1s.append(0.0); ems.append(0.0); continue
tp = len(p_tok & g_tok)
prec = tp / len(p_tok)
rec = tp / len(g_tok)
f1 = 2 * prec * rec / (prec + rec) if (prec + rec) > 0 else 0.0
ems.append(1.0 if p == g else 0.0)
precisions.append(prec); recalls.append(rec); f1s.append(f1)
return {'f1': mean(f1s), 'precision': mean(precisions), 'recall': mean(recalls), 'em': mean(ems)}
Common pitfalls
- Temperature is strictly fixed to 0 for all experiments to guarantee stable and reproducible results.
- In QA tasks, noise ratio is controlled by randomly concatenating relevant and noisy documents to mitigate position bias.
- FELM evaluation is reported separately across three specific domains: WK, Sci/Tech, and Wri/Rec.
Evidence (verbatim from paper)
For knowledge hallucination, we use FELM (Chen et al., [2023c]) as the benchmark with precision, recall, and F1 score as evaluation metrics (Chen et al., [2023c]). For reading comprehension, we use RACE-H (high school level reading comprehension) and RACE-M (middle school level reading comprehension) (Lai et al., [2017]) as benchmarks with precision as the metric (Bi et al., [2024]; Rae et al., [2021]). For question answering, we use Natural Question (Kwiatkowski et al., [2019]), TriviaQA (Joshi et al., [2017]), and WebQ (Berant et al., [2013]) as benchmarks with EM and F1 score as metrics (Chen et al., [2017]; Zhu et al., [2021]).
Citation
@misc{lv2024coarse,
title={Coarse-to-Fine Highlighting: Reducing Knowledge Hallucination in Large Language Models},
author={Lv et al. (2024)},
year={2024},
note={arXiv:2410.15116}
}
1---2name: coft-eval3description: Evaluates the ability of retrieval-augmented language models to mitigate knowledge hallucination and maintain robustness in reading comprehension and question-answering tasks when processing long, noisy contexts with selective highlighting. Use when the user wants to benchmark on FELM, RACE-H, RACE-M, Natural Questions, TriviaQA, WebQ, or asks about evaluating this task. Reports F1 score.4metadata:5 source: https://skillmd.com/skills/qhjqhj00/coft-eval6 skill_kind: dataset_eval7 source_arxiv: 2410.151168 bibtex_key: lv2024coarse9 confidence: high10---1112# coft-eval1314> Coarse-to-Fine Highlighting: Reducing Knowledge Hallucination in Large Language Models — Lv et al. (2024) (arXiv:2410.15116, 2024)1516## What this evaluates1718Evaluates the ability of retrieval-augmented language models to mitigate knowledge hallucination and maintain robustness in reading comprehension and question-answering tasks when processing long, noisy contexts with selective highlighting.1920## Datasets2122- **FELM** — total ?; splits: test (-1)23- **RACE-H** — total ?; splits: test (-1)24- **RACE-M** — total ?; splits: test (-1)25- **Natural Questions** — total ?; splits: test (-1)26- **TriviaQA** — total ?; splits: test (-1)27- **WebQ** — total ?; splits: test (-1)2829## Metrics3031- `F1 score` **(primary)** — range: [0, 1]32 - Harmonic mean of precision and recall: 2 * (precision * recall) / (precision + recall).33- `precision` — range: [0, 1]34 - Ratio of correctly predicted positive tokens to the total predicted tokens.35- `recall` — range: [0, 1]36 - Ratio of correctly predicted positive tokens to the total actual positive tokens.37- `EM` — range: [0, 1]38 - Exact-match accuracy: binary score of 1 if the model's prediction exactly matches the ground truth string, 0 otherwise.3940## Input / output format4142**Input**: Context passages (optionally pre-processed with COFT highlighting), questions, and retrieved documents. All backbone models use greedy decoding with temperature=0.4344**Output**: Free-text answers or responses generated by the backbone LLM.4546## Scoring recipe4748```python49def compute_metrics(preds, golds):50 f1s, ems, precisions, recalls = [], [], [], []51 for p, g in zip(preds, golds):52 p_tok, g_tok = set(normalize(p)), set(normalize(g))53 if not p_tok:54 precisions.append(0.0); recalls.append(0.0); f1s.append(0.0); ems.append(0.0); continue55 tp = len(p_tok & g_tok)56 prec = tp / len(p_tok)57 rec = tp / len(g_tok)58 f1 = 2 * prec * rec / (prec + rec) if (prec + rec) > 0 else 0.059 ems.append(1.0 if p == g else 0.0)60 precisions.append(prec); recalls.append(rec); f1s.append(f1)61 return {'f1': mean(f1s), 'precision': mean(precisions), 'recall': mean(recalls), 'em': mean(ems)}62```6364## Common pitfalls6566- Temperature is strictly fixed to 0 for all experiments to guarantee stable and reproducible results.67- In QA tasks, noise ratio is controlled by randomly concatenating relevant and noisy documents to mitigate position bias.68- FELM evaluation is reported separately across three specific domains: WK, Sci/Tech, and Wri/Rec.6970## Evidence (verbatim from paper)7172> For knowledge hallucination, we use FELM (Chen et al., [2023c]) as the benchmark with precision, recall, and F1 score as evaluation metrics (Chen et al., [2023c]). For reading comprehension, we use RACE-H (high school level reading comprehension) and RACE-M (middle school level reading comprehension) (Lai et al., [2017]) as benchmarks with precision as the metric (Bi et al., [2024]; Rae et al., [2021]). For question answering, we use Natural Question (Kwiatkowski et al., [2019]), TriviaQA (Joshi et al., [2017]), and WebQ (Berant et al., [2013]) as benchmarks with EM and F1 score as metrics (Chen et al., [2017]; Zhu et al., [2021]).7374## Citation7576```bibtex77@misc{lv2024coarse,78 title={Coarse-to-Fine Highlighting: Reducing Knowledge Hallucination in Large Language Models},79 author={Lv et al. (2024)},80 year={2024},81 note={arXiv:2410.15116}82}83```8485- arXiv: 2410.15116