schema · evergreen
Saying no: three bands
kNN never says nothing is close; cosine overlaps in the grey zone, so a floor, a note, and a judge.
Nearest-neighbour search has no concept of "nothing is close". Ask a codebase whether you have been to a five-star resort and it returns eight chunks (best score 0.366). Hallucination starts right there.
Why not one threshold
Cosine does not separate the grey zone on this model and corpus: real answers have a top-1 dense median of 0.636 and a minimum of 0.526; irrelevant questions have a median of 0.524 and a maximum of 0.587. They overlap. A single cut either drops real answers or lets junk through.
| Gate | abstain on 13 negatives | false alarm on 42 positives | extra latency |
|---|---|---|---|
| note below 0.55 | 0.833 | 0.048 | 0 |
| floor 0.45 + note 0.55 ✓ | 0.846 | 0.048 | 0 |
| reranker score below 0.05 | 1.000 | 0.286 | +550 ms |
The floor removed nothing from the golden set and turned the resort question into an empty result. The two negatives that still slip through are questions with genuinely similar code in the repo — there the call belongs to the reader.