← All Test Cases

STOR-004

storage

high
Repetitions
3
Documents
1
Questions
1
Reasoning
DIRECT
persistence multiline raw-text

📖 In Plain English

What this category tests

Does the brain remember exactly what was ingested?

How the test works

A document with a unique canary token is ingested. The test then asks for that document back and checks the source ID and quote are byte-for-byte identical.

Why it matters

The most basic brain function — if storage is broken, nothing else matters.

⚙️ How a single rep runs

① Generate
Model creates 1 synthetic document 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 1 document
→ 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 1277 chars
Generate a two-line document with an explicit line break between the lines. Ingest it.
Generate a question asking to retrieve the full raw document by source_id.

Requirements:
- Document content must have exactly two lines separated by \n:
  Line 1: "Line 1: <fictional event A>."
  Line 2: "Line 2: <fictional fact B>."
- Use fictional events/facts (e.g. "The packet arrived." and "The seal was violet.").
- source_id: KB-{{RUN}}-STOR-004-A-v1
- Question: "Retrieve the full raw content of document KB-{{RUN}}-STOR-004-A-v1."

Output ONLY this JSON:
{
  "run_id": "{{RUN}}",
  "test_id": "STOR-004",
  "repetition": {{REP}},
  "documents": [
    {"source_id": "KB-{{RUN}}-STOR-004-A-v1", "content": "Line 1: <event A>.\nLine 2: <fact B>.", "title": "<title>", "version": 1}
  ],
  "questions": ["Retrieve the full raw content of document KB-{{RUN}}-STOR-004-A-v1."],
  "expected_answers": [{
    "question_index": 0,
    "correct_answer": "Line 1: <event A>.\nLine 2: <fact B>.",
    "required_source_ids": ["KB-{{RUN}}-STOR-004-A-v1"],
    "required_quote": "Line 1: <event A>.\nLine 2: <fact B>.",
    "required_label": "DIRECT",
    "must_refuse": false,
    "notes": "Both lines must be present. Newline preserved. Partial retrieval (one line only) is a failure."
  }]
}
▶ ② Execution Instructions 119 chars
Use ONLY MCP Knowledge Brain retrieval tools.
Question: {{QUESTION}}
Return ONLY this JSON:
{{REQUIRED_ANSWER_SCHEMA}}
⚖ ③ Judge Instructions 303 chars
Ground truth:
{{SETUP_CONTEXT_JSON}}

Tested AI answer:
{{EXEC_ANSWER_JSON}}

Check: both lines present in the answer, line break preserved, correct source_id, DIRECT label.
Critical failures: only one line returned, newline lost, hallucinated source_id.

Return ONLY this JSON:
{{JUDGE_RESULT_SCHEMA}}

Critical Failure Conditions

Recent Run History

2 runs
When Run ID Pass Rate Avg Score Reps
2026-05-24 13:08 20260524T130808Z-kqze 100% 95.0 1/1 View →
2026-05-24 11:37 20260524T113756Z-kduj 100% 100.0 1/1 View →
📄 Raw YAML cases/storage/STOR-004.yaml
schema_version: "1.0"
test_id: "STOR-004"
category: "storage"
severity: "high"
repetitions: 3
reasoning_type: "DIRECT"
num_documents: 1
num_questions: 1
tags: ["persistence", "multiline", "raw-text"]

setup_instructions: |
  Generate a two-line document with an explicit line break between the lines. Ingest it.
  Generate a question asking to retrieve the full raw document by source_id.

  Requirements:
  - Document content must have exactly two lines separated by \n:
    Line 1: "Line 1: <fictional event A>."
    Line 2: "Line 2: <fictional fact B>."
  - Use fictional events/facts (e.g. "The packet arrived." and "The seal was violet.").
  - source_id: KB-{{RUN}}-STOR-004-A-v1
  - Question: "Retrieve the full raw content of document KB-{{RUN}}-STOR-004-A-v1."

  Output ONLY this JSON:
  {
    "run_id": "{{RUN}}",
    "test_id": "STOR-004",
    "repetition": {{REP}},
    "documents": [
      {"source_id": "KB-{{RUN}}-STOR-004-A-v1", "content": "Line 1: <event A>.\nLine 2: <fact B>.", "title": "<title>", "version": 1}
    ],
    "questions": ["Retrieve the full raw content of document KB-{{RUN}}-STOR-004-A-v1."],
    "expected_answers": [{
      "question_index": 0,
      "correct_answer": "Line 1: <event A>.\nLine 2: <fact B>.",
      "required_source_ids": ["KB-{{RUN}}-STOR-004-A-v1"],
      "required_quote": "Line 1: <event A>.\nLine 2: <fact B>.",
      "required_label": "DIRECT",
      "must_refuse": false,
      "notes": "Both lines must be present. Newline preserved. Partial retrieval (one line only) is a failure."
    }]
  }

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: both lines present in the answer, line break preserved, correct source_id, DIRECT label.
  Critical failures: only one line returned, newline lost, hallucinated source_id.

  Return ONLY this JSON:
  {{JUDGE_RESULT_SCHEMA}}

critical_failures:
  - "hallucinated_source_id"
  - "only_partial_content_returned"
  - "newline_lost"