Skip to content

feat(eval): add retrieval quality runner for recall@k, MRR, and nDCG (#134) - #185

Merged
codeforstartups merged 1 commit into
codeforstartups:developmentfrom
Kaap10:feature/retrieval-quality-eval
Sep 12, 2026
Merged

codeforstartups merged 1 commit into
codeforstartups:developmentfrom
Kaap10:feature/retrieval-quality-eval

Conversation

@Kaap10

@Kaap10 Kaap10 commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Resolves #134
Part of Epic #122

Summary of Changes

  • Data Models: Added LabeledQuery, RetrievalMetricResult, and RetrievalEvalSummary for standard ground-truth benchmark datasets and evaluation results.
  • IR Metrics: Implemented zero-dependency mathematical evaluation functions: compute_recall_at_k, compute_mrr, compute_ndcg_at_k (binary & graded relevance), and compute_precision_at_k.
  • Runner & Dataset Loading: Added RetrievalEvalRunner supporting live Dynavec search clients or custom callables, with dataset loading from JSON arrays, JSONL, and Python dicts/objects.
  • Visual Charting: Added plot_retrieval_metrics() in dynavec.eval.chart rendering 2-panel metric curves and aggregate summary bar charts.
  • Telemetry & Dashboard: Integrated retrieval metrics (eval_recall, eval_mrr, eval_ndcg) into TelemetryEvent, aggregate(), aggregate_eval(), and /api/eval/* endpoints with TypeScript definitions.
  • Tests: Added comprehensive test suite in tests/test_retrieval_eval.py (22 unit tests, 100% pass rate).

@Kaap10

Kaap10 commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator Author

Visual Evaluation Preview

Sample 2-panel chart generated with plot_retrieval_metrics():

image

@codeforstartups
codeforstartups merged commit 840bfd6 into codeforstartups:development Sep 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Eval: retrieval quality runner (recall@k / MRR / nDCG)

2 participants