← All Test Cases
high
NIH-003
needle haystack
Repetitions
3
Documents
12
Questions
1
Reasoning
CROSS_SOURCE
retrieval-precision
cross-source-with-distractors
needle-in-haystack
📖 In Plain English
What this category tests
Can the brain find one specific document among many distractors?
How the test works
One target document with a unique canary token is ingested alongside 10+ similar-sounding distractor documents. The test uses the canary to find only the target.
Why it matters
Precision matters at scale — a brain that returns 'mostly relevant' results is unusable in production.
⚙️ How a single rep runs
① Generate
Model creates 12 synthetic documents and 1 question with unique canary tokens
→ Fresh content per run prevents memorization and proves real retrieval
② Ingest (MCP)
Model calls brain_ingest to store the 12 documents
→ Tests the brain's storage and indexing pipeline
③ Query (MCP)
Model answers the question using brain retrieval tools (search, fetch, context_pack, etc.)
→ Core test — does the brain return correct evidence and let the model build a faithful answer?
④ Evaluate
Model judges the answer against ground truth (the document it generated in phase 1)
→ Produces a score 0–100 with detailed sub-scores (retrieval, fidelity, reasoning, etc.)
This rep is run 3 times per test run. A pass requires score ≥ 85 and no critical failures.
🔬 Technical Instructions (raw prompts sent to AI)
🔧 ① Setup Instructions 1382 chars
Generate TWO target documents that form a cross-source chain, plus 10 distractors.
The question requires joining the two targets while ignoring all distractors.
Requirements:
- Target A: "<Entity> has code <X>."
- Target B: "Code <X> maps to <Property>."
- 10 distractors: mention similar entities, codes, or properties but do NOT form valid chains with A+B.
- source_ids: KB-{{RUN}}-NIH-003-A-v1, KB-{{RUN}}-NIH-003-B-v1, KB-{{RUN}}-NIH-003-D01-v1 through D10-v1.
- Question: "What is the <Property> of <Entity>?" — requires joining A+B, ignoring distractors.
Output ONLY this JSON:
{
"run_id": "{{RUN}}",
"test_id": "NIH-003",
"repetition": {{REP}},
"documents": [
{"source_id": "KB-{{RUN}}-NIH-003-A-v1", "content": "<Entity> has code <X>.", "title": "<title>", "version": 1},
{"source_id": "KB-{{RUN}}-NIH-003-B-v1", "content": "Code <X> maps to <Property>.", "title": "<title>", "version": 1},
... (10 distractors)
],
"questions": ["What is the <Property> of <Entity>?"],
"expected_answers": [{
"question_index": 0,
"correct_answer": "<Property>",
"required_source_ids": ["KB-{{RUN}}-NIH-003-A-v1", "KB-{{RUN}}-NIH-003-B-v1"],
"required_quote": null,
"required_label": "CROSS_SOURCE",
"must_refuse": false,
"notes": "Must join A+B while ignoring 10 distractors. Distractors form false chains that look plausible."
}]
}
▶ ② Execution Instructions 543 chars
You have access to MCP Knowledge Brain tools.
Use brain_search with the exact canary token from the question.
The canary is unique — only ONE document contains it.
Find that document. Return immediately once found — do not search further.
⚠️ OUTPUT RULE: As soon as you find the target document, stop reasoning
and output the JSON. Do not re-examine other documents. Do not verify.
Just output the required JSON schema with the found document's source_id and quote.
Question: {{QUESTION}}
Return ONLY this JSON:
{{REQUIRED_ANSWER_SCHEMA}}
⚖ ③ Judge Instructions 331 chars
Ground truth:
{{SETUP_CONTEXT_JSON}}
Tested AI answer:
{{EXEC_ANSWER_JSON}}
Must use both target docs (A+B) and ignore all distractors. CROSS_SOURCE label required.
Critical failures: used distractor sources in the chain, missing required source_ids, wrong property, DIRECT label.
Return ONLY this JSON:
{{JUDGE_RESULT_SCHEMA}}
Critical Failure Conditions
- used_distractor_in_chain
- missing_required_source_id
- wrong_final_answer
- wrong_label_not_cross_source
Recent Run History
2 runs| When | Run ID | Pass Rate | Avg Score | Reps | |
|---|---|---|---|---|---|
| 2026-05-24 13:08 | 20260524T130808Z-kqze | 0% | 0 | 0/1 | View → |
| 2026-05-24 11:37 | 20260524T113756Z-kduj | 0% | 0 | 0/1 | View → |
📄 Raw YAML cases/needle_haystack/NIH-003.yaml
schema_version: "1.0"
test_id: "NIH-003"
category: "needle_haystack"
severity: "high"
repetitions: 3
reasoning_type: "CROSS_SOURCE"
num_documents: 12
num_questions: 1
tags: ["retrieval-precision", "cross-source-with-distractors", "needle-in-haystack"]
setup_instructions: |
Generate TWO target documents that form a cross-source chain, plus 10 distractors.
The question requires joining the two targets while ignoring all distractors.
Requirements:
- Target A: "<Entity> has code <X>."
- Target B: "Code <X> maps to <Property>."
- 10 distractors: mention similar entities, codes, or properties but do NOT form valid chains with A+B.
- source_ids: KB-{{RUN}}-NIH-003-A-v1, KB-{{RUN}}-NIH-003-B-v1, KB-{{RUN}}-NIH-003-D01-v1 through D10-v1.
- Question: "What is the <Property> of <Entity>?" — requires joining A+B, ignoring distractors.
Output ONLY this JSON:
{
"run_id": "{{RUN}}",
"test_id": "NIH-003",
"repetition": {{REP}},
"documents": [
{"source_id": "KB-{{RUN}}-NIH-003-A-v1", "content": "<Entity> has code <X>.", "title": "<title>", "version": 1},
{"source_id": "KB-{{RUN}}-NIH-003-B-v1", "content": "Code <X> maps to <Property>.", "title": "<title>", "version": 1},
... (10 distractors)
],
"questions": ["What is the <Property> of <Entity>?"],
"expected_answers": [{
"question_index": 0,
"correct_answer": "<Property>",
"required_source_ids": ["KB-{{RUN}}-NIH-003-A-v1", "KB-{{RUN}}-NIH-003-B-v1"],
"required_quote": null,
"required_label": "CROSS_SOURCE",
"must_refuse": false,
"notes": "Must join A+B while ignoring 10 distractors. Distractors form false chains that look plausible."
}]
}
execution_instructions: |
You have access to MCP Knowledge Brain tools.
Use brain_search with the exact canary token from the question.
The canary is unique — only ONE document contains it.
Find that document. Return immediately once found — do not search further.
⚠️ OUTPUT RULE: As soon as you find the target document, stop reasoning
and output the JSON. Do not re-examine other documents. Do not verify.
Just output the required JSON schema with the found document's source_id and quote.
Question: {{QUESTION}}
Return ONLY this JSON:
{{REQUIRED_ANSWER_SCHEMA}}
judge_instructions: |
Ground truth:
{{SETUP_CONTEXT_JSON}}
Tested AI answer:
{{EXEC_ANSWER_JSON}}
Must use both target docs (A+B) and ignore all distractors. CROSS_SOURCE label required.
Critical failures: used distractor sources in the chain, missing required source_ids, wrong property, DIRECT label.
Return ONLY this JSON:
{{JUDGE_RESULT_SCHEMA}}
critical_failures:
- "used_distractor_in_chain"
- "missing_required_source_id"
- "wrong_final_answer"
- "wrong_label_not_cross_source"