Needle in a Haystack
Also called NIAH, passkey retrieval.
Needle in a haystack is a long-context evaluation that hides a specific fact at varying depths in a long distractor document and tests whether the model can retrieve it.
Description
It became a standard way to report effective context length, though passing it shows only simple retrieval, not reasoning over many dispersed facts.
Sources
- Kamradt (2023). LLMTest_NeedleInAHaystack.
Cite this entry
Protologue. (2026). Needle in a Haystack. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.0.0, PTL-0099). https://protologue.com/t/needle-in-a-haystack/
BibTeX
@misc{protologue_needle_in_a_haystack,
title = {Needle in a Haystack},
author = {{Protologue}},
year = {2026},
howpublished = {Protologue: A Taxonomy of Prompting and LLM Techniques, v1.0.0},
note = {Entry PTL-0099},
url = {https://protologue.com/t/needle-in-a-haystack/}
}