Skip to content
Back to skills

Legalbench Rag Eval

ASecurity

Evaluates the retrieval fidelity of RAG systems in the legal domain by measuring how precisely and completely a model retrieves minimal, highly relevant text snippets from legal documents to answer specific queries. Use when the user wants to benchmark on LegalBench-RAG, or asks about evaluating this task. Reports Precision.

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

Security analysis

A100/100

Scanned September 11, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Legalbench Rag Eval?

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

Security grade badge for Legalbench Rag Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-legalbench-rag-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-legalbench-rag-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: legalbench-rag-eval
description: Evaluates the retrieval fidelity of RAG systems in the legal domain by measuring how precisely and completely a model retrieves minimal, highly relevant text snippets from legal documents to answer specific queries. Use when the user wants to benchmark on LegalBench-RAG, or asks about evaluating this task. Reports Precision.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2408.10343
  bibtex_key: [REDACTED]
  confidence: high
---

# legalbench-rag-eval

> LegalBench-RAG: A Benchmark for Retrieval-Augmented Generation in the Legal Domain — Pipitone et al. (2024) (arXiv:2408.10343, 2024)

## What this evaluates

Evaluates the retrieval fidelity of RAG systems in the legal domain by measuring how precisely and completely a model retrieves minimal, highly relevant text snippets from legal documents to answer specific queries.

## Datasets

- **LegalBench-RAG** — total 6858; splits: test (-1); repo https://github.com/zeroentropy-cc/legalbenchrag

## Metrics

- `Precision` **(primary)** — range: percent
  - Fraction of retrieved chunks in the top-k that are relevant to the query. Calculated as |relevant ∩ top_k| / k.
- `Recall` — range: percent
  - Fraction of all relevant chunks in the document that are successfully retrieved within the top-k results. Calculated as |relevant ∩ top_k| / |relevant|.

## Input / output format

**Input**: A legal query paired with a legal document (or corpus) from which the system must retrieve relevant text chunks.

**Output**: A ranked list of top-k retrieved text chunks/snippets.

## Scoring recipe

```python
def score(retrieved, gold, k):
    top_k = retrieved[:k]
    hits = len(set(top_k) & set(gold))
    prec = (hits / k) * 100
    rec = (hits / len(gold)) * 100
    return prec, rec
# Average per dataset, then equally weight datasets
```

## Common pitfalls

- Averaging scores globally across datasets instead of weighting each dataset equally regardless of size, as explicitly required.
- Failing to account for chunking strategy (fixed-size vs. recursive splitter) and reranker presence, which drastically shift Precision/Recall.
- Choosing k without balancing context richness against noise/hallucination risks, as noted in post-processing design decisions.

## Evidence (verbatim from paper)

> Performance comparison on different datasets for Precision and Recall at various k values for the Naive Method.

## Citation

```bibtex
@misc{pipitone2024legalbenchrag,
  title={LegalBench-RAG: A Benchmark for Retrieval-Augmented Generation in the Legal Domain},
  author={Pipitone et al. (2024)},
  year={2024},
  note={arXiv:2408.10343}
}
```

- arXiv: 2408.10343

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.