Sub-issue of #146 — layer 4 of 6. Depends on #141 (single authoritative evaluation suite).
Goal
Make retrieval quality a merge criterion, so a change cannot silently degrade answers.
The problem this solves
Retrieval quality degrades invisibly. Every test can pass, the application works, and answers are quietly worse — a changed chunk size, a reordered pipeline stage, an upgraded embedding or parsing dependency. Nothing in the current gate would catch it.
This is not hypothetical: #144 upgrades ML and PDF parsing dependencies, and #140 restructures the retrieval pipeline. Both can degrade quality while every unit test passes.
Prerequisite
#141 must land first. Four overlapping evaluation artefacts currently exist with no authoritative baseline; a regression gate on an ambiguous baseline is worse than none, because it manufactures false confidence.
Tasks
Baseline
Threshold
Gate
Cost
Acceptance criteria
- A deliberate quality regression is caught by the gate — verified by introducing one
- The threshold sits above measured noise, with the measurement recorded
- Baseline updates are explicit and justified, never silent
- Runtime cost documented and acceptable
Note
Verify by breaking it: shrink the retrieval pool or disable reranking, confirm the gate fails, then revert. An untested gate is an assumption.
Sub-issue of #146 — layer 4 of 6. Depends on #141 (single authoritative evaluation suite).
Goal
Make retrieval quality a merge criterion, so a change cannot silently degrade answers.
The problem this solves
Retrieval quality degrades invisibly. Every test can pass, the application works, and answers are quietly worse — a changed chunk size, a reordered pipeline stage, an upgraded embedding or parsing dependency. Nothing in the current gate would catch it.
This is not hypothetical: #144 upgrades ML and PDF parsing dependencies, and #140 restructures the retrieval pipeline. Both can degrade quality while every unit test passes.
Prerequisite
#141 must land first. Four overlapping evaluation artefacts currently exist with no authoritative baseline; a regression gate on an ambiguous baseline is worse than none, because it manufactures false confidence.
Tasks
Baseline
Threshold
Gate
Cost
Acceptance criteria
Note
Verify by breaking it: shrink the retrieval pool or disable reranking, confirm the gate fails, then revert. An untested gate is an assumption.