lesson 5 of 5 · retrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchlesson 5 of 5 · retrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchlesson 5 of 5 · retrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchlesson 5 of 5 · retrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchlesson 5 of 5 · retrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchlesson 5 of 5 · retrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchlesson 5 of 5 · retrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchlesson 5 of 5 · retrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchlesson 5 of 5 · retrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchlesson 5 of 5 · retrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchlesson 5 of 5 · retrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the searchretrieval metrics and vector-db shape — recall@k, mrr, and why the filter runs before the search
Write recall_at_k(retrieved, relevant, k): take the first k
ids from the ranked retrieved list, count how many are in the
relevant set, and return that count divided by the size of the
relevant set.
The harness runs it at k=1, 3, and 5. Expected output:
recall@1: 0.00
recall@3: 0.50
recall@5: 0.75
Notice the shape of those numbers: recall@k can only go up as k grows. That's why "just raise k" always looks like a fix — until you remember precision falls and the token bill climbs with it.