← Research archive
Benchmark published Sep 2, 2026

Clean Pilot Retrieval Gate and Contamination-Metric Correction

A 30-card clean candidate corpus achieved 93.3% exact-card retrieval at rank 1 and 100% expected-topic retrieval at rank 1. The first benchmark run incorrectly treated legitimate cross-topic top-5 retrieval as hard contamination and produced a NO-GO; benchmark v002 separated hard contamination from cross-topic retrieval, after which the recorded public checkpoint reported 0/150 hard synthetic flags and a GO scale gate.

retrieval clean-pilot contamination metric-correction knowledge-factory
MARKDOWN

README.md

4,200 bytes SHA-256 f57d470f6ad06413…

KESPA-BENCH-004 — Clean Pilot Retrieval Gate and Contamination-Metric Correction

Date: 2026-09-02 Status: Published historical benchmark record Project: KESPA AI / NexLabs Studios

Purpose

Before scaling the Knowledge Factory beyond its first clean pilot, KESPA tested whether a small evidence-bound corpus could retrieve the intended knowledge reliably.

The candidate index contained 30 verified clean pilot cards.

The benchmark used 30 queries with top-k = 5 retrieval.

Candidate index

The isolated candidate Chroma collection was built from retrieval_text using:

  • embedding model: all-MiniLM-L6-v2
  • dimension: 384
  • normalized embeddings: YES
  • distance: cosine
  • candidate cards: 30
  • verified=true: 30
  • trust assigned: NO
  • production_ready=true: 0
  • high-stakes cards: 8
  • safety-sensitive cards: 2
  • read-back integrity: PASS

The production collection was not mutated.

Retrieval result

The clean pilot achieved:

  • expected card @1: 28/30 = 93.3%
  • expected card @3: 30/30 = 100%
  • expected card @5: 30/30 = 100%
  • expected topic @1: 30/30 = 100%
  • expected topic @3: 30/30 = 100%
  • expected topic @5: 30/30 = 100%

So every query retrieved the correct topic at rank 1, even though two queries ranked the alternate card from the same topic above the exact expected card.

The first gate said NO-GO

The original forge-kb-v2-retrieval-benchmark-001 run reported:

  • candidate contamination flags: 20/150 top-5 results
  • affected candidate queries: 14/30
  • scale-rebuild gate: NO-GO

The retrieval accuracy itself was already strong.

The problem was the definition of contamination.

Metric defect

The first benchmark treated legitimate cross-topic retrieval inside the new clean corpus as though it were hard synthetic contamination.

That was too broad.

A retrieval benchmark should distinguish:

another clean, evidence-bound topic appeared in top-5

from:

old synthetic/forbidden contamination appeared in retrieval

Those are not the same failure.

Benchmark v002 correction

benchmark_candidate_retrieval.py was revised from v001 to v002.

The correction:

  • separated hard contamination from ordinary cross-topic retrieval;
  • stopped failing the gate merely because another clean topic appeared in top-5;
  • added a whole-candidate hard-contamination scan;
  • made legacy production-topic matching tolerant of generated topic prefixes.

The candidate and production Chroma collections remained query-only.

There were:

  • no Brain changes
  • no corpus changes

Corrected public checkpoint

After the metric correction, the canonical KESPA research checkpoint recorded:

  • clean pilot cards: 30
  • exact-card retrieval @1: 93.3%
  • expected-topic retrieval @1: 100%
  • hard synthetic flags in pilot top-5: 0 / 150
  • clean-corpus scale gate: GO

This is the result later surfaced on the KESPA public landing page as a pilot measurement.

Why this matters

This benchmark contains both a positive retrieval result and a useful measurement failure.

The initial NO-GO was not simply discarded.

Instead, KESPA identified that the gate was measuring the wrong thing, tightened the metric, and preserved the distinction between:

retrieval diversity

and:

synthetic contamination

That correction matters because overly broad safety metrics can reject good systems just as easily as weak safety metrics can admit bad ones.

Safety boundary

The benchmark did not authorize production replacement.

The supplied run explicitly recorded:

  • production mutation methods used: 0
  • candidate writes during benchmark: 0
  • Brain changes: 0

The scale gate only answered whether the clean retrieval design was suitable to continue scaling.

Limitations

This was a 30-query pilot, not a production-scale benchmark.

It measured retrieval behavior, not full answer quality.

The final corrected 0/150 / GO checkpoint is preserved in the public KESPA research-positioning record; the supplied raw transcript preserves the earlier v001 run before the contamination metric was corrected.

TEXT

SHA256SUMS.txt

398 bytes SHA-256 9e4c5d20b5fb1844…
f57d470f6ad064139cb758d8bbf2c67bfb0287f0f76e826ff72b1647018f6542  README.md
004d386bec10682bebb35ff9ec17f8a206e157bbc55ba5a33874e66b7f7cc1a2  benchmark.json
db8591e6fc0d391eab5956c578e633a09bbfb6c89d3f55b92bfe55b6d1911e45  metrics.csv
c555c1dd922e08c700955d09d8d6eabc3550aab0d62f32feb79d878cab86a7a5  methodology.md
b1150a690326adb9b197c79072abc7ab4b867d988b46940efae0bf2866a164ca  provenance.json
JSON

benchmark.json

3,694 bytes SHA-256 004d386bec10682b…
{
    "schema": "kespa.public_benchmark.v1",
    "id": "KESPA-BENCH-004",
    "title": "Clean Pilot Retrieval Gate and Contamination-Metric Correction",
    "date": "2026-09-02",
    "status": "published",
    "purpose": "Measure whether the 30-card evidence-bound clean pilot retrieved its intended cards/topics strongly enough to justify scaling, while preserving a contamination gate.",
    "candidate_index": {
        "cards": 30,
        "verified_true": 30,
        "trust_assigned": false,
        "production_ready_true": 0,
        "high_stakes_cards": 8,
        "safety_sensitive_cards": 2,
        "embedding_model": "all-MiniLM-L6-v2",
        "embedding_dimension": 384,
        "normalized_embeddings": true,
        "embedded_field": "retrieval_text",
        "stored_document_field": "content",
        "distance": "cosine",
        "read_back_integrity": "PASS"
    },
    "benchmark_shape": {
        "queries": 30,
        "top_k": 5,
        "device": "CUDA / NVIDIA GeForce RTX 3070"
    },
    "retrieval_results": {
        "expected_card_at_1": "28/30",
        "expected_card_at_1_percent": 93.3,
        "expected_card_at_3": "30/30",
        "expected_card_at_3_percent": 100,
        "expected_card_at_5": "30/30",
        "expected_card_at_5_percent": 100,
        "expected_topic_at_1": "30/30",
        "expected_topic_at_1_percent": 100,
        "expected_topic_at_3": "30/30",
        "expected_topic_at_3_percent": 100,
        "expected_topic_at_5": "30/30",
        "expected_topic_at_5_percent": 100
    },
    "v001_contamination_gate": {
        "candidate_flagged_top5_results": "20/150",
        "candidate_queries_with_flags": "14/30",
        "result": "NO-GO",
        "diagnosis": "The contamination metric conflated legitimate cross-topic retrieval with hard synthetic contamination."
    },
    "v002_metric_correction": {
        "change": [
            "separated hard contamination from cross-topic retrieval",
            "cross-topic top-5 results no longer fail the gate",
            "added whole-candidate hard-contamination scan",
            "made legacy production topic matching tolerant of generated topic prefixes"
        ],
        "candidate_and_production_chroma_query_only": true,
        "brain_changes": false,
        "corpus_changes": false
    },
    "corrected_public_checkpoint": {
        "clean_pilot_cards": 30,
        "exact_card_retrieval_at_1_percent": 93.3,
        "expected_topic_retrieval_at_1_percent": 100,
        "hard_synthetic_flags_in_pilot_top5": "0/150",
        "clean_corpus_scale_gate": "GO"
    },
    "safety": {
        "production_mutation_methods_used": 0,
        "candidate_writes_during_benchmark": 0,
        "brain_changes": 0,
        "production_replacement_authorized_by_benchmark": false
    },
    "interpretation": [
        "The clean pilot demonstrated strong semantic retrieval before large-scale corpus generation.",
        "The first gate failure was caused by an over-broad contamination definition rather than poor retrieval accuracy.",
        "Separating cross-topic retrieval from hard synthetic contamination preserved a meaningful contamination check without treating every neighboring clean topic as contamination.",
        "Passing the scale gate authorized continued clean-corpus scaling work; it did not authorize replacing production by itself."
    ],
    "limitations": [
        "The corrected final checkpoint is preserved in the KESPA public landing/research record, while the supplied raw benchmark transcript contains the earlier v001 pre-correction run.",
        "This was a 30-query pilot and not a broad production workload benchmark.",
        "The benchmark evaluated retrieval behavior only; it did not test Brain reranking or answer-generation quality.",
        "The legacy production corpus comparison was historical and should not be treated as representative of the later clean 423-claim production baseline."
    ]
}
MARKDOWN

methodology.md

1,290 bytes SHA-256 c555c1dd922e08c7…

Methodology

Corpus

An isolated Chroma candidate index contained 30 verified evidence-bound pilot cards.

Embeddings were created from each card's focused retrieval_text using all-MiniLM-L6-v2, normalized to 384 dimensions with cosine distance.

Query set

Thirty reviewed queries were used, one targeting each expected pilot card.

The benchmark requested the top five results for each query.

Retrieval measures

The benchmark recorded exact expected-card rank and expected-topic rank at @1, @3, and @5.

This distinction allowed retrieval of the correct topic but a sibling card to be measured separately from exact-card retrieval.

Initial contamination gate

Benchmark v001 also scanned top-5 retrievals for contamination.

Its first implementation classified some legitimate cross-topic clean retrievals as contamination, causing a NO-GO despite strong retrieval accuracy.

Correction

Benchmark v002 separated cross-topic retrieval from hard synthetic contamination and added a whole-candidate hard-contamination scan.

The retrieval corpus itself was not changed by this benchmark correction.

Production isolation

Both candidate and historical production Chroma were query-only during the benchmark.

No Brain changes or production writes were performed.

CSV

metrics.csv

627 bytes SHA-256 db8591e6fc0d391e…
metric,value,unit_or_status
candidate_cards,30,cards
queries,30,queries
top_k,5,results
exact_card_at_1,28/30,93.3%
exact_card_at_3,30/30,100.0%
exact_card_at_5,30/30,100.0%
expected_topic_at_1,30/30,100.0%
expected_topic_at_3,30/30,100.0%
expected_topic_at_5,30/30,100.0%
v001_candidate_contamination_flags,20/150,pre-correction
v001_candidate_queries_with_flags,14/30,pre-correction
v001_scale_gate,NO-GO,pre-correction
corrected_hard_synthetic_flags_top5,0/150,public checkpoint
corrected_scale_gate,GO,public checkpoint
production_mutation_methods,0,safety
candidate_writes_during_benchmark,0,safety
brain_changes,0,safety
JSON

provenance.json

1,522 bytes SHA-256 b1150a690326adb9…
{
    "schema": "kespa.public_provenance.v1",
    "research_id": "KESPA-BENCH-004",
    "source_basis": "Historical clean-pilot retrieval benchmark transcript, KESPA changelog entry for benchmark_candidate_retrieval.py v001->v002, and the later public KESPA research checkpoint.",
    "source_observations": [
        "The raw v001 benchmark ran 30 queries against a 30-card candidate index with top-k 5.",
        "Expected-card retrieval was 28/30 at rank 1 and 30/30 by rank 3.",
        "Expected-topic retrieval was 30/30 at rank 1.",
        "The initial contamination implementation produced 20/150 candidate flags and a NO-GO.",
        "The benchmark was corrected to separate hard contamination from ordinary cross-topic retrieval and to add whole-candidate hard-contamination scanning.",
        "The later public KESPA checkpoint records 93.3% exact-card retrieval @1, 100% expected-topic retrieval @1, 0/150 hard synthetic flags in pilot top-5 results, and a GO clean-corpus scale gate."
    ],
    "verification_note": "The supplied raw transcript directly contains the v001 pre-correction run. The final corrected 0/150 and GO outcome is preserved in the later KESPA public research checkpoint and public-site source. Because the corrected raw v002 report itself was not supplied in this reconstruction batch, this entry is marked published rather than independently re-verified from the v002 raw artifact.",
    "publication_note": "No raw third-party evidence text, private application code, credentials, or private telemetry are included."
}