← All Test Cases

SID-002

exact source id

critical
Repetitions
3
Documents
2
Questions
1
Reasoning
DIRECT
source-id disambiguation near-identical-values

📖 In Plain English

What this category tests

Does the brain return the exact KB-* source label, not an internal ID?

How the test works

After ingesting documents, the test asks the brain to cite specific sources. Citations must use the KB-* label format the document was stored with, never the internal src_* IDs.

Why it matters

Source IDs are the brain's contract for provenance. If they're wrong, evidence can't be traced.

⚙️ How a single rep runs

① Generate
Model creates 2 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 2 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 1420 chars
Generate two documents about the same subject but with slightly different values. Ingest both.
Generate a question asking which source_id contains a specific one of the values.

Requirements:
- Both docs are about the same "case" (e.g. "Case alpha") but contain different token numbers (e.g. 913 vs 931 — transposed digits).
- Document A: "Case <name> used token <number-A>."
- Document B: "Case <name> used token <number-B>." (number-B differs from number-A by transposing two digits)
- source_ids: KB-{{RUN}}-SID-002-A-v1 and KB-{{RUN}}-SID-002-B-v1
- Question: "Which source_id contains the statement that token <number-A> was used?"

Output ONLY this JSON:
{
  "run_id": "{{RUN}}",
  "test_id": "SID-002",
  "repetition": {{REP}},
  "documents": [
    {"source_id": "KB-{{RUN}}-SID-002-A-v1", "content": "<Doc A>", "title": "<title A>", "version": 1},
    {"source_id": "KB-{{RUN}}-SID-002-B-v1", "content": "<Doc B>", "title": "<title B>", "version": 1}
  ],
  "questions": ["Which source_id contains the statement that token <number-A> was used?"],
  "expected_answers": [{
    "question_index": 0,
    "correct_answer": "KB-{{RUN}}-SID-002-A-v1",
    "required_source_ids": ["KB-{{RUN}}-SID-002-A-v1"],
    "required_quote": "<exact Doc A sentence>",
    "required_label": "DIRECT",
    "must_refuse": false,
    "notes": "Must return only Doc A's source_id. Doc B's source_id for Doc B's token is wrong."
  }]
}
▶ ② Execution Instructions 119 chars
Use ONLY MCP Knowledge Brain retrieval tools.
Question: {{QUESTION}}
Return ONLY this JSON:
{{REQUIRED_ANSWER_SCHEMA}}
⚖ ③ Judge Instructions 409 chars
Ground truth:
{{SETUP_CONTEXT_JSON}}

Tested AI answer:
{{EXEC_ANSWER_JSON}}

Check: only Doc A's source_id returned. Doc B's source_id must NOT appear in the answer for this question.
The two token numbers differ by transposed digits — the agent must distinguish them exactly.
Critical failures: returned Doc B's source_id, hallucinated source_id, cited both.

Return ONLY this JSON:
{{JUDGE_RESULT_SCHEMA}}

Critical Failure Conditions

Recent Run History

3 runs
When Run ID Pass Rate Avg Score Reps
2026-05-24 13:08 20260524T130808Z-kqze 100% 100.0 1/1 View →
2026-05-24 12:41 20260524T124148Z-z2do 0% 23.0 0/1 View →
2026-05-24 11:37 20260524T113756Z-kduj 100% 100.0 1/1 View →
📄 Raw YAML cases/exact_source_id/SID-002.yaml
schema_version: "1.0"
test_id: "SID-002"
category: "exact_source_id"
severity: "critical"
repetitions: 3
reasoning_type: "DIRECT"
num_documents: 2
num_questions: 1
tags: ["source-id", "disambiguation", "near-identical-values"]

setup_instructions: |
  Generate two documents about the same subject but with slightly different values. Ingest both.
  Generate a question asking which source_id contains a specific one of the values.

  Requirements:
  - Both docs are about the same "case" (e.g. "Case alpha") but contain different token numbers (e.g. 913 vs 931 — transposed digits).
  - Document A: "Case <name> used token <number-A>."
  - Document B: "Case <name> used token <number-B>." (number-B differs from number-A by transposing two digits)
  - source_ids: KB-{{RUN}}-SID-002-A-v1 and KB-{{RUN}}-SID-002-B-v1
  - Question: "Which source_id contains the statement that token <number-A> was used?"

  Output ONLY this JSON:
  {
    "run_id": "{{RUN}}",
    "test_id": "SID-002",
    "repetition": {{REP}},
    "documents": [
      {"source_id": "KB-{{RUN}}-SID-002-A-v1", "content": "<Doc A>", "title": "<title A>", "version": 1},
      {"source_id": "KB-{{RUN}}-SID-002-B-v1", "content": "<Doc B>", "title": "<title B>", "version": 1}
    ],
    "questions": ["Which source_id contains the statement that token <number-A> was used?"],
    "expected_answers": [{
      "question_index": 0,
      "correct_answer": "KB-{{RUN}}-SID-002-A-v1",
      "required_source_ids": ["KB-{{RUN}}-SID-002-A-v1"],
      "required_quote": "<exact Doc A sentence>",
      "required_label": "DIRECT",
      "must_refuse": false,
      "notes": "Must return only Doc A's source_id. Doc B's source_id for Doc B's token is wrong."
    }]
  }

execution_instructions: |
  Use ONLY MCP Knowledge Brain retrieval tools.
  Question: {{QUESTION}}
  Return ONLY this JSON:
  {{REQUIRED_ANSWER_SCHEMA}}

judge_instructions: |
  Ground truth:
  {{SETUP_CONTEXT_JSON}}

  Tested AI answer:
  {{EXEC_ANSWER_JSON}}

  Check: only Doc A's source_id returned. Doc B's source_id must NOT appear in the answer for this question.
  The two token numbers differ by transposed digits — the agent must distinguish them exactly.
  Critical failures: returned Doc B's source_id, hallucinated source_id, cited both.

  Return ONLY this JSON:
  {{JUDGE_RESULT_SCHEMA}}

critical_failures:
  - "hallucinated_source_id"
  - "cited_wrong_document"
  - "confused_near_identical_values"