longbench-write-eval
LongWriter: Unleashing 10,000+ Word Generation from Long Context LLMs — Bai et al. (2024) (arXiv:2408.07055, 2024)
What this evaluates
Evaluates an LLM's ability to generate ultra-long, coherent, and high-quality text (up to 20k words) while strictly adhering to explicit length constraints. It probes long-context generation capabilities, structural coherence over extended outputs, and instruction-following for length requirements.
Datasets
Metrics
Sq (Quality Score) (primary) — range: [0, 100]
- Overall quality score rated on a 0-100 scale, aggregating sub-dimensions (Relevance, Accuracy, Coherence, Clarity, Breadth and Depth, Reading Experience). Higher values indicate better generation quality.
Sl (Length Score) — range: [0, 100]
- Score measuring adherence to the required output length constraint, rated on a 0-100 scale. Evaluated separately across four output length brackets: [0, 500), [500, 2k), [2k, 4k), [4k, 20k).
Input / output format
Input: A writing prompt specifying a topic and a required output length (e.g., 'Write a 20,000-word article about...').
Output: A single continuous text generation of arbitrary length.
Scoring recipe
# For each sample in LongBench-Write test set:
predictions = model.generate(prompt)
gold_length = extract_required_length(prompt)
actual_length = count_words(predictions)
# Quality & Length scores (0-100) are obtained via human/LLM annotation per sub-dimension
sq = compute_quality_score(predictions)
sl = compute_length_adherence_score(predictions, gold_length)
# Aggregate by length bracket
bracket = assign_bracket(actual_length)
record(sq, sl, actual_length, bracket)
# Final metric: mean Sq and Sl per bracket, plus overall mean
overall_sq = mean(sq for all samples)
overall_sl = mean(sl for all samples)
Common pitfalls
- Models frequently truncate outputs well before the required length, especially beyond 4k words.
- Quality scores (Sq) often degrade significantly in longer brackets due to coherence loss, even when length is met.
- Length constraints in prompts are sometimes ignored or misinterpreted, leading to severe under-generation.
Evidence (verbatim from paper)
Table 7: Evaluation results on English samples in LongBench-Write.
Citation
@misc{bai2024longwriter,
title={LongWriter: Unleashing 10,000+ Word Generation from Long Context LLMs},
author={Bai et al. (2024)},
year={2024},
note={arXiv:2408.07055}
}
1---2name: longbench-write-eval3description: Evaluates an LLM's ability to generate ultra-long, coherent, and high-quality text (up to 20k words) while strictly adhering to explicit length constraints. It probes long-context generation capabilities, structural coherence over extended outputs, and instruction-following for length requirements. Use when the user wants to benchmark on LongBench-Write, or asks about evaluating this task. Reports Sq (Quality Score).4metadata:5 source: https://skillmd.com/skills/qhjqhj00/longbench-write-eval6 skill_kind: dataset_eval7 source_arxiv: 2408.070558 bibtex_key: bai2024longwriter9 confidence: high10---1112# longbench-write-eval1314> LongWriter: Unleashing 10,000+ Word Generation from Long Context LLMs — Bai et al. (2024) (arXiv:2408.07055, 2024)1516## What this evaluates1718Evaluates an LLM's ability to generate ultra-long, coherent, and high-quality text (up to 20k words) while strictly adhering to explicit length constraints. It probes long-context generation capabilities, structural coherence over extended outputs, and instruction-following for length requirements.1920## Datasets2122- **LongBench-Write** — total ?; splits: test (-1); repo https://github.com/THUDM/LongWriter2324## Metrics2526- `Sq (Quality Score)` **(primary)** — range: [0, 100]27 - Overall quality score rated on a 0-100 scale, aggregating sub-dimensions (Relevance, Accuracy, Coherence, Clarity, Breadth and Depth, Reading Experience). Higher values indicate better generation quality.28- `Sl (Length Score)` — range: [0, 100]29 - Score measuring adherence to the required output length constraint, rated on a 0-100 scale. Evaluated separately across four output length brackets: [0, 500), [500, 2k), [2k, 4k), [4k, 20k).3031## Input / output format3233**Input**: A writing prompt specifying a topic and a required output length (e.g., 'Write a 20,000-word article about...').3435**Output**: A single continuous text generation of arbitrary length.3637## Scoring recipe3839```python40# For each sample in LongBench-Write test set:41predictions = model.generate(prompt)42gold_length = extract_required_length(prompt)43actual_length = count_words(predictions)4445# Quality & Length scores (0-100) are obtained via human/LLM annotation per sub-dimension46sq = compute_quality_score(predictions)47sl = compute_length_adherence_score(predictions, gold_length)4849# Aggregate by length bracket50bracket = assign_bracket(actual_length)51record(sq, sl, actual_length, bracket)5253# Final metric: mean Sq and Sl per bracket, plus overall mean54overall_sq = mean(sq for all samples)55overall_sl = mean(sl for all samples)56```5758## Common pitfalls5960- Models frequently truncate outputs well before the required length, especially beyond 4k words.61- Quality scores (Sq) often degrade significantly in longer brackets due to coherence loss, even when length is met.62- Length constraints in prompts are sometimes ignored or misinterpreted, leading to severe under-generation.6364## Evidence (verbatim from paper)6566> Table 7: Evaluation results on English samples in LongBench-Write. 6768<table><tr><td rowspan="2"></td><td colspan="3">Overall</td><td colspan="2">[0, 500)</td><td colspan="2">[500, 2k)</td><td colspan="2">[2k, 4k)</td><td colspan="2">[4k, 20k)</td></tr><tr><td>S̅</td><td>Sl</td><td>Sq</td><td>Sl</td><td>Sq</td><td>Sl</td><td>Sq</td><td>Sl</td><td>Sq</td><td>Sl</td><td>Sq</td></tr>6970## Citation7172```bibtex73@misc{bai2024longwriter,74 title={LongWriter: Unleashing 10,000+ Word Generation from Long Context LLMs},75 author={Bai et al. (2024)},76 year={2024},77 note={arXiv:2408.07055}78}79```8081- arXiv: 2408.07055