Skip to content
Back to skills

Document Haystack Eval

ASecurity

This benchmark evaluates Vision Language Models' ability to retrieve specific textual or multimodal "needles" embedded within long documents ranging from 5 to 200 pages. It probes visual-text alignment, long-context retrieval capabilities, and performance degradation as document length and token consumption increase. Use when the user wants to benchmark on Document Haystack, or asks about evaluating this task. Reports Accuracy.

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

Works with

  • api

Security analysis

A100/100

Scanned September 11, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Document Haystack Eval?

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

Security grade badge for Document Haystack Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-document-haystack-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-document-haystack-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: document-haystack-eval
description: This benchmark evaluates Vision Language Models' ability to retrieve specific textual or multimodal "needles" embedded within long documents ranging from 5 to 200 pages. It probes visual-text alignment, long-context retrieval capabilities, and performance degradation as document length and token consumption increase. Use when the user wants to benchmark on Document Haystack, or asks about evaluating this task. Reports Accuracy.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2507.15882
  bibtex_key: [REDACTED]
  confidence: high
---

# document-haystack-eval

> Document Haystack: A Long Context Multimodal Image/Document Understanding Vision LLM Benchmark — Huybrechts et al. (2025) (arXiv:2507.15882, 2025)

## What this evaluates

This benchmark evaluates Vision Language Models' ability to retrieve specific textual or multimodal "needles" embedded within long documents ranging from 5 to 200 pages. It probes visual-text alignment, long-context retrieval capabilities, and performance degradation as document length and token consumption increase.

## Datasets

- **Document Haystack** — total 400; splits: test (-1); repo https://github.com/amazon-science/document-haystack

## Metrics

- `Accuracy` **(primary)** — range: percent
  - Percentage of correctly retrieved needles out of the total evaluated. Calculated as (number of correct retrievals / total needles) * 100.

## Input / output format

**Input**: Long documents (5–200 pages) provided either as images or parsed text, accompanied by a natural language query asking to retrieve a specific embedded needle (e.g., “What is the secret fruit in the document?”).

**Output**: Extracted text or description corresponding to the queried needle. Exact formatting is not strictly enforced, but retrieval must match the ground truth needle.

## Scoring recipe

```python
def compute_accuracy(predictions, gold):
    correct = sum(1 for p, g in zip(predictions, gold) if p.strip().lower() == g.strip().lower())
    return (correct / len(gold)) * 100
```

## Common pitfalls

- API token limits cause models like GPT-4o-mini to fail or truncate on documents exceeding 50 pages, artificially lowering reported accuracy.
- Preprocessing method (converting PDFs to images vs. extracting raw text) drastically changes performance; comparing models that use different preprocessing pipelines directly is misleading.
- Token compression strategies vary widely across models (e.g., Nova Lite uses ~6x more tokens per image than Gemini), which impacts context window utilization and retrieval accuracy independently of model capability.

## Evidence (verbatim from paper)

> The table shows the retrieval accuracy across different document lengths of three API providers: Nova Lite, Gemini Flash-2.0, and GPT-4o-mini.

## Citation

```bibtex
@misc{huybrechts2025documenthaystack,
  title={Document Haystack: A Long Context Multimodal Image/Document Understanding Vision LLM Benchmark},
  author={Huybrechts et al. (2025)},
  year={2025},
  note={arXiv:2507.15882}
}
```

- arXiv: 2507.15882

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.