pub struct SearchExplain {
pub route: &'static str,
pub exact_candidates: usize,
pub ann_candidates: usize,
pub bm25_candidates: usize,
pub graph_candidates: usize,
pub fusion_mode: &'static str,
pub rerank_source: RerankSourceKind,
pub recall_estimate: f32,
}Expand description
ADDITIVE per-search provenance, attached to every SearchResult. zero
format bytes, no URNA_FORMAT_VERSION bump: it is computed entirely in
the runtime from the search path and the open file. feeds the lens
--disclose explain honesty line and the agent-native retrieve()
answer-pack. the load-bearing field is rerank_source.
candidate counts are the per-path candidate-set sizes the rerank saw
(0 when that path did not run). recall_estimate is 1.0 only on the
exact path (the recall=1.0 ground truth) and NaN on every candidate-
generating path (ann/hybrid/graph), mirroring SearchResult::recall:
we never claim a recall we did not measure.
Fields§
§route: &'static strthe route taken: “exact” | “hnsw” | “graph” | “hybrid”.
exact_candidates: usizeexact-flat candidates considered (the whole corpus on the exact path and the graph seed path; 0 when the path used an ann shortlist).
ann_candidates: usizeann shortlist size (hnsw / hybrid vector path); 0 otherwise.
bm25_candidates: usizebm25 lexical shortlist size (hybrid path); 0 otherwise.
graph_candidates: usizegraph bfs frontier union size (graph path); 0 otherwise.
fusion_mode: &'static strhow the candidate lists were combined: “none” | “rrf”.
rerank_source: RerankSourceKindthe precision the mandatory exact rerank read from. the honesty
backbone: see RerankSourceKind.
recall_estimate: f321.0 on the exact path, NaN on every candidate-generating path
(we never claim a recall we did not measure).