# Benchmarki długiego kontekstu (igła w stogu siana i dalej)

EN: **Long-context benchmarks (needle-in-a-haystack and beyond)** · id `longcontextbench` · aliases: needle in a haystack, NIAH, long-context evaluation, effective context length, igła w stogu siana

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Ewaluacja i interpretowalność](https://aiatlasgraph.com/t/evaluation.md) › [Metryki i benchmarki](https://aiatlasgraph.com/t/metrics.md) › [Benchmarki modeli językowych](https://aiatlasgraph.com/t/llmbenchmarks.md) › Benchmarki długiego kontekstu (igła w stogu siana i dalej)

## Description

- PL: Syntetyczne i realistyczne testy efektywnej długości kontekstu: wyszukiwanie ukrytych faktów, śledzenie wieloetapowe i agregacja.
- EN: Synthetic and realistic tests of effective context length: retrieving planted facts, multi-hop tracing and aggregation.

## In one sentence

- PL: Testy sprawdzają, czy model naprawdę korzysta z bardzo długiego tekstu, który dostaje, czy gubi informacje ze środka.
- EN: Tests that check whether a model really uses the very long text it is given, or loses information from the middle.

## Problem it solves

- PL: Deklarowana długość tekstu, który model może przyjąć, często jest większa niż ta, z którą faktycznie dobrze pracuje.
- EN: The advertised amount of text a model can take in is often larger than the amount it actually handles well.

## What it does

- PL: Ukrywa w długim tekście fakty do znalezienia, połączenia albo zliczenia, jak zagadki w grubej książce, i patrzy, kiedy wyniki zaczynają spadać.
- EN: It hides facts to find, link or count inside long text, like puzzles in a thick book, and watches when scores start to drop.

## Everyday example

- PL: Wrzucasz do asystenta całą umowę z załącznikami i pytasz o karę umowną z pięćdziesiątej strony; test pokazuje, czy taka odpowiedź jest wiarygodna.
- EN: You give an assistant a whole contract with appendices and ask about a penalty on page fifty; the test shows whether such an answer is trustworthy.

## This concerns you if you…

- PL: wklejasz do modelu bardzo długie dokumenty
- PL: wybierasz model do pracy na całych repozytoriach lub archiwach
- EN: you paste very long documents into a model
- EN: you pick a model to work across whole repositories or archives

## Keywords

needle in a haystack · RULER · multi-hop tracing · effective context length · aggregation tasks

## How it works

- PL: Podstawowy test „igły w stogu siana” umieszcza jeden fakt w długim tekście wypełniającym na różnych głębokościach. Rozszerzenia dodają wiele igieł i dystraktorów, śledzenie łańcuchów zmiennych oraz zliczanie częstych słów, mierząc spadek wyniku wraz z długością. Efektywna długość to największa, przy której wynik zostaje powyżej progu.
- EN: The basic needle-in-a-haystack test plants one fact in long filler text at varying depths. Extensions add multiple needles and distractors, variable-chain tracing and frequent-word counting, measuring score decline as length grows. Effective length is the largest length at which the score stays above a threshold.

## Limits

- PL: Proste wyszukiwanie igły jest już prawie nasycone i nie mówi o rozumieniu całości. Syntetyczne zadania są dalekie od prawdziwych dokumentów. Wyniki zależą od tekstu wypełniającego i progu przyjętego za „dobrze”.
- EN: Simple needle retrieval is nearly saturated and says little about whole-text understanding. Synthetic tasks are far from real documents. Results depend on the filler text and the threshold taken as 'good enough'.

## Key terms

- PL: **igła w stogu siana**: Jeden fakt ukryty w długim tekście do odnalezienia.
- PL: **efektywna długość kontekstu**: Długość tekstu, przy której model nadal działa dobrze.
- PL: **dystraktor**: Podobna, ale fałszywa informacja utrudniająca znalezienie właściwej.
- EN: **needle in a haystack**: One fact hidden in long text to be found.
- EN: **effective context length**: Text length at which the model still works well.
- EN: **distractor**: Similar but false information that hides the right one.

## Know first

- [Wydłużanie okna kontekstu (Context window extension)](https://aiatlasgraph.com/t/contextextension.md)
- [Zarządzanie oknem kontekstu (Context window management: placement, compaction and context rot)](https://aiatlasgraph.com/t/contextmanagement.md)

## Sources

- [RULER: What's the Real Context Size of Your Long-Context Language Models?](<https://arxiv.org/abs/2404.06654>) `ruler-2024` · by Cheng-Ping Hsieh, Simeng Sun, Samuel Kriman, Shantanu Acharya, Dima Rekesh, Fei Jia, Yang Zhang, Boris Ginsburg

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/longcontextbench · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
