{"adoption": {"forks": 246, "observed_at": "2026-08-28T04:06:41.998317+00:00", "stars": 2375}, "canonical_url": "https://ross.abutalabs.com/products/needle-in-a-haystack", "card": {"archived": false, "artifact_type": "cli-tool", "description": "Doing simple retrieval from LLM models at various context lengths to measure accuracy", "domain": ["large-language-models", "artificial-intelligence", "testing", "machine-learning"], "enriched": true, "function": ["benchmarking", "llm-inference", "testing"], "health_score": 91, "homepage": null, "language": "Jupyter Notebook", "license": "NOASSERTION", "license_family": "other", "maturity": "active", "member_repos": ["gkamradt/needle-in-a-haystack"], "name": "gkamradt/needle-in-a-haystack", "platform": ["python", "cli"], "pushed_at": "2026-06-08T18:01:12+00:00", "repo": "gkamradt/needle-in-a-haystack", "stars": 2375, "tags": ["llm-evaluation", "long-context", "context-window", "needle-in-a-haystack", "lost-in-the-middle", "jsonl-results", "yaml-config", "model-comparison", "openai", "anthropic", "cohere", "uuid-chain-reasoning"], "topics": [], "urls": [], "use_cases": ["test how well an LLM retrieves a fact from a long context", "measure retrieval accuracy at different context lengths and depths", "compare long-context performance across OpenAI, Anthropic, and Cohere models", "run a needle-in-a-haystack evaluation sweep", "probe whether models miss information buried in the middle of long prompts", "evaluate multi-step reasoning over long context with UUID chains"], "what_it_is": "A benchmarking tool (niah / needlehaystack) that pressure-tests LLM long-context retrieval by sweeping context length x needle depth cells against configured models and scoring each response. It supports single-fact lookup, multi-fact recall, and UUID-chain multi-step reasoning tasks, writing one JSONL result row per cell.", "when_to_avoid": ["you need a general LLM evaluation harness for coding, math, or reasoning benchmarks beyond context retrieval", "you want to test a RAG pipeline's retriever rather than a model's raw context handling", "you need a production inference client - this is an evaluation tool, not a serving layer"], "when_to_choose": ["you need a reproducible, configurable sweep of context-length vs depth accuracy for LLMs", "you want to benchmark raw long-context retrieval across multiple providers", "you want scored JSONL results you can analyze, including reconstructing the exact context each cell saw"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/needle-in-a-haystack", "repo": "gkamradt/needle-in-a-haystack", "role": "main", "score": 72}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:06:41.998317+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-30T02:35:03.149366+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2b039ddce7a7a361a528274206e696f198db4f2ef5d3eaff11c0af518650a7b9", "fetched_at": "2026-08-28T04:06:41.998317+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gkamradt/needle-in-a-haystack"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:06:41.998317+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-30T02:35:03.149366+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2b039ddce7a7a361a528274206e696f198db4f2ef5d3eaff11c0af518650a7b9", "fetched_at": "2026-08-28T04:06:41.998317+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gkamradt/needle-in-a-haystack"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-30T02:35:03.149366+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2b039ddce7a7a361a528274206e696f198db4f2ef5d3eaff11c0af518650a7b9", "fetched_at": "2026-08-28T04:06:41.998317+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gkamradt/needle-in-a-haystack"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:06:41.998317+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:06:41.998317+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:06:41.998317+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-30T02:35:03.149366+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2b039ddce7a7a361a528274206e696f198db4f2ef5d3eaff11c0af518650a7b9", "fetched_at": "2026-08-28T04:06:41.998317+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gkamradt/needle-in-a-haystack"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:06:41.998317+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:06:41.998317+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-30T02:35:03.149366+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2b039ddce7a7a361a528274206e696f198db4f2ef5d3eaff11c0af518650a7b9", "fetched_at": "2026-08-28T04:06:41.998317+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gkamradt/needle-in-a-haystack"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:06:41.998317+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:06:41.998317+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:06:41.998317+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-30T02:35:03.149366+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2b039ddce7a7a361a528274206e696f198db4f2ef5d3eaff11c0af518650a7b9", "fetched_at": "2026-08-28T04:06:41.998317+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gkamradt/needle-in-a-haystack"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:06:41.998317+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:06:41.998317+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-30T02:35:03.149366+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2b039ddce7a7a361a528274206e696f198db4f2ef5d3eaff11c0af518650a7b9", "fetched_at": "2026-08-28T04:06:41.998317+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gkamradt/needle-in-a-haystack"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-30T02:35:03.149366+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2b039ddce7a7a361a528274206e696f198db4f2ef5d3eaff11c0af518650a7b9", "fetched_at": "2026-08-28T04:06:41.998317+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gkamradt/needle-in-a-haystack"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-30T02:35:03.149366+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2b039ddce7a7a361a528274206e696f198db4f2ef5d3eaff11c0af518650a7b9", "fetched_at": "2026-08-28T04:06:41.998317+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gkamradt/needle-in-a-haystack"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-30T02:35:03.149366+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "2b039ddce7a7a361a528274206e696f198db4f2ef5d3eaff11c0af518650a7b9", "fetched_at": "2026-08-28T04:06:41.998317+00:00", "kind": "readme", "missing": false, "url": "https://github.com/gkamradt/needle-in-a-haystack"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 86, "longevity": 73, "rhythm": 54}, "computed_at": "2026-09-03T02:20:16.233290+00:00", "flags": ["no_license"], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 1027, "days_push": 86, "days_rel": 95, "gap_med": null, "n_releases_24m": 1}, "score": 72, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}