Skip to content
Back to skills

Longreward Eval

ASecurity

This evaluation protocol assesses the long-context understanding, instruction-following, and faithfulness capabilities of LLMs. It combines automated AI-judged scoring on long and short-context benchmarks with human preference alignment tests to validate the effectiveness of the LongReward training method. Use when the user wants to benchmark on LongBench, LongBench-Chat, MT-Bench, AlpacaEval2, or asks about evaluating this task. Reports GPT-4o rating.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 11, 2026
ai-agentspythongo

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add qhjqhj00/research-skills-pool --skill longreward-eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Longreward Eval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Longreward Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-longreward-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-longreward-eval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: longreward-eval
description: This evaluation protocol assesses the long-context understanding, instruction-following, and faithfulness capabilities of LLMs. It combines automated AI-judged scoring on long and short-context benchmarks with human preference alignment tests to validate the effectiveness of the LongReward training method. Use when the user wants to benchmark on LongBench, LongBench-Chat, MT-Bench, AlpacaEval2, or asks about evaluating this task. Reports GPT-4o rating.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2410.21252
  bibtex_key: [REDACTED]
  confidence: high
---

# longreward-eval

> LongReward: Improving Long-context Large Language Models with AI Feedback — Jiajie Zhang et al. (2024) (arXiv:2410.21252, 2024)

## What this evaluates

This evaluation protocol assesses the long-context understanding, instruction-following, and faithfulness capabilities of LLMs. It combines automated AI-judged scoring on long and short-context benchmarks with human preference alignment tests to validate the effectiveness of the LongReward training method.

## Datasets

- **LongBench** — total 2350; splits: test (2350)
- **LongBench-Chat** — total 50; splits: test (50)
- **MT-Bench** — total 80; splits: test (80)
- **AlpacaEval2** — total 805; splits: test (805)

## Metrics

- `GPT-4o rating` **(primary)** — range: other
  - GPT-4o automatically rates model responses based on the query and ground-truth answers using few-shot prompting for LongBench-Chat or zero-shot prompting for LongBench.
- `FactScore` — range: [0, 1]
  - Ratio of supported atomic facts per response. GPT-4o-mini breaks responses into atomic facts and judges whether each is supported by retrieved context chunks.
- `MT-Bench score` — range: [1, 10]
  - GPT-4 rates model responses on a scale of 1-10 across 8 categories.
- `AlpacaEval2 win rate` — range: percent
  - Length-controlled win rate measured by GPT-4-turbo against GPT-4-turbo.

## Input / output format

**Input**: Query paired with a long context document (8k–64k tokens) for long-context tasks; query alone for short-context tasks.

**Output**: Natural language response generated by the model.

## Scoring recipe

```python
def evaluate(model, dataset, judge_model):
    scores = []
    for instance in dataset:
        response = model.generate(instance.query, instance.context)
        if dataset == 'LongBench-Chat':
            score = judge_model.few_shot_rate(instance.query, instance.ground_truth, response)
        elif dataset == 'LongBench':
            score = judge_model.zero_shot_rate(instance.query, instance.ground_truth, response)
        elif dataset == 'MT-Bench':
            score = judge_model.rate_1_10(instance.query, response)
        elif dataset == 'AlpacaEval2':
            score = judge_model.length_controlled_win_rate(instance.query, response)
        scores.append(score)
    return sum(scores) / len(scores)
```

## Common pitfalls

- GPT-4o/GPT-4 judges may exhibit prompt sensitivity; the paper uses few-shot for LongBench-Chat but zero-shot for LongBench, which can cause score distribution shifts.
- FactScore relies on retrieving top-5 context chunks; if retrieval fails, facts may be incorrectly marked as unsupported, lowering the score.
- AlpacaEval2 uses length-controlled win rates, meaning overly verbose or concise responses can artificially inflate or deflate scores regardless of quality.

## Evidence (verbatim from paper)

> Specifically, we employ GPT-4o-mini to first break the model response into atomic facts and then judge whether each fact is supported by the retrieved context chunks. The results in Table[3] show that the DPO models using LongReward achieve higher FactScore (i.e., the ratio of supported facts) than the SFT baseline, demonstrating the effect of LongReward in improving faithfulness as well as reducing hallucinations for long-context LLMs.

## Citation

```bibtex
@misc{zhang2024longreward,
  title={LongReward: Improving Long-context Large Language Models with AI Feedback},
  author={Jiajie Zhang et al. (2024)},
  year={2024},
  note={arXiv:2410.21252}
}
```

- arXiv: 2410.21252

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.