one move: measure behavior
Evaluate retrieval separately from generation with recall@k and reciprocal rank for one query. In the Hybrid Ranker system, implement this level as a deterministic contract before composing it with the next service.
def retrieval_metrics(relevant, retrieved, k): return {'recall_at_k': ..., 'mrr': ...}
retrieval_metrics(['a', 'b'], ['b', 'x', 'a'], 3)
?
retrieval_metrics(['a', 'b'], ['x', 'a'], 1)