Skip to content
Back to skills

Ruler Eval

ASecurity

This benchmark evaluates long-context language models' ability to retrieve, trace, aggregate, and answer questions across varying context lengths and task complexities. It probes whether models genuinely attend to injected information or rely on parametric knowledge and context copying as sequence length increases. Use when the user wants to benchmark on RULER, or asks about evaluating this task. Reports exact-match accuracy.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 11, 2026
researchpythongogitperformance

Security analysis

A100/100

Scanned September 11, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Ruler Eval?

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

Security grade badge for Ruler Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-ruler-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-ruler-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: ruler-eval
description: This benchmark evaluates long-context language models' ability to retrieve, trace, aggregate, and answer questions across varying context lengths and task complexities. It probes whether models genuinely attend to injected information or rely on parametric knowledge and context copying as sequence length increases. Use when the user wants to benchmark on RULER, or asks about evaluating this task. Reports exact-match accuracy.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2404.06654
  bibtex_key: hsieh2024ruler
  confidence: high
---

# ruler-eval

> RULER: What's the Real Context Size of Your Long-Context Language Models? — Cheng-Ping Hsieh et al. (2024) (arXiv:2404.06654, 2024)

## What this evaluates

This benchmark evaluates long-context language models' ability to retrieve, trace, aggregate, and answer questions across varying context lengths and task complexities. It probes whether models genuinely attend to injected information or rely on parametric knowledge and context copying as sequence length increases.

## Datasets

- **RULER** — total ?; splits: test (-1); repo https://github.com/hsiehjackson/RULER

## Metrics

- `exact-match accuracy` **(primary)** — range: [0, 1]
  - Percentage of test instances where the model's generated output exactly matches the gold answer string. Evaluated across all task categories (NIAH variants, VT, CWE, FWE, QA).

## Input / output format

**Input**: A long text sequence containing a 'haystack' of distractor text (e.g., essays, noise sentences, or random paragraphs), with injected key-value pairs, variable chains, or golden paragraphs. A query or question is appended at the end.

**Output**: The model must generate the retrieved values, tracked variable names, top-K frequent words, or the answer to the question, typically as a short string or list of tokens.

## Scoring recipe

```python
def compute_exact_match_accuracy(predictions, golds):
    correct = 0
    for pred, gold in zip(predictions, golds):
        if pred.strip().lower() == gold.strip().lower():
            correct += 1
    return correct / len(golds)
```

## Common pitfalls

- Models may rely on parametric knowledge or memorization rather than attending to the long context, especially as length increases.
- Hard distractors in multi-key NIAH tasks can cause retrieval failures if the model confuses needles with noise.
- Performance degradation is often non-monotonic and highly sensitive to specific context lengths and task configurations, making single-point comparisons misleading.

## Evidence (verbatim from paper)

> Evaluation examples in Ruler are automatically generated based on input configurations (see Table 2) that define the length and complexity of each input. The objective is to return all variable names pointing to the same value V.

## Citation

```bibtex
@misc{hsieh2024ruler,
  title={RULER: What's the Real Context Size of Your Long-Context Language Models?},
  author={Cheng-Ping Hsieh et al. (2024)},
  year={2024},
  note={arXiv:2404.06654}
}
```

- arXiv: 2404.06654

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.