{
  "id": "needle-in-a-haystack",
  "code": "PTL-0099",
  "term": "Needle in a Haystack",
  "aliases": [
    "NIAH",
    "passkey retrieval"
  ],
  "category": "failure-modes",
  "definition": "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.",
  "example": null,
  "broader": [],
  "narrower": [],
  "related": [
    "lost-in-the-middle",
    "context-window"
  ],
  "introduced": 2023,
  "sources": [
    {
      "title": "LLMTest_NeedleInAHaystack",
      "authors": "Kamradt",
      "year": 2023,
      "url": "https://github.com/gkamradt/LLMTest_NeedleInAHaystack"
    }
  ],
  "url": "https://protologue.com/t/needle-in-a-haystack/",
  "citation": "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/"
}