Expand description
§Guarantee Ladder with Explicit Semantics (Task 2)
This module provides three guarantee modes with well-defined correctness contracts:
-
Fast Approximate (
Approximate): Top-k under proxy score- Fastest, ignores quantization error
- No recall guarantees
-
Calibrated High-Recall (
Calibrated): Probabilistic guarantees- Uses quantile-bounded error envelopes
- P(recall ≥ ρ) ≥ 1-δ
-
Certified (
Certified): Deterministic exact via LB/UB envelopes- Guaranteed correct results
- Uses rerank to verify all candidates
§Math/Algorithm
Let true score be s(x), proxy be ŝ(x) = s(x) + ε(x).
- Mode 1: ε ignored (ranking by ŝ)
- Mode 2: ε bounded in probability (use quantiles)
- Mode 3: ε bounded deterministically (use LB/UB comparisons)
Structs§
- Score
Envelope - Score with error bounds for certified/calibrated modes
- Search
Contract - Complete search contract specifying guarantees
- Stop
Decision - Decision about whether to stop probing
- Stopping
Evaluator - Evaluator for stopping rules
Enums§
- Guarantee
Mode - Guarantee mode for search correctness
- Stop
Reason - Reason for stopping decision
- Stopping
Rule - Stopping rule that matches guarantee mode semantics