feat: add NDCG benchmark metrics - #180
Conversation
|
Warning Review limit reached
Next review available in: 50 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughSchema 26 adds binary NDCG@5/10/20/50 metrics, rejects empty ground truth, adds a recall-first direct objective, applies objective-specific guardrails and archive selection, updates reports, and adds validation for metrics, objectives, artifacts, and router results. ChangesRetrieval evaluation and objective selection
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant QueryMeasurement
participant normalizedDiscountedCumulativeGain
participant binaryNdcgAt
participant QualitySummary
QueryMeasurement->>normalizedDiscountedCumulativeGain: pass ranked chunks and resolved targets
normalizedDiscountedCumulativeGain->>binaryNdcgAt: pass chunk indices and cutoff
binaryNdcgAt-->>normalizedDiscountedCumulativeGain: return normalized binary NDCG
normalizedDiscountedCumulativeGain-->>QualitySummary: record NDCG@5/10/20/50
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@benchmarks/README.md`:
- Line 12: Update the benchmark comparison text around the Recall@K and binary
NDCG@K question to use DBSF as the production fusion method, or explicitly
identify RRF as a historical diagnostic rather than production-weighted,
consistent with CONTEXT.md.
In `@benchmarks/retrieval/evaluation/optimization-profiles.ts`:
- Around line 189-190: Update the objective priority lists in optimization
profiles, including the entries near ndcgAt20 and ndcgAt50, so reranker-top20
and reranker-top50 remain recall-oriented after ties among recall, context
recall, and MRR. Remove the NDCG priorities from those reranker lists unless an
explicit ordering contract is already defined.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 509895b4-9fbf-4c41-85c1-c1121ada462b
📒 Files selected for processing (21)
CONTEXT.mdbenchmarks/BASELINE.mdbenchmarks/README.mdbenchmarks/retrieval/evaluation/collect.tsbenchmarks/retrieval/evaluation/metrics-core.d.mtsbenchmarks/retrieval/evaluation/metrics-core.mjsbenchmarks/retrieval/evaluation/metrics.tsbenchmarks/retrieval/evaluation/optimization-profiles.tsbenchmarks/retrieval/evaluation/prepared-fusion-core.mjsbenchmarks/retrieval/evaluation/promotion-evidence.tsbenchmarks/retrieval/evaluation/report.tsbenchmarks/retrieval/evaluation/types.tsbenchmarks/retrieval/evaluation/weight-search.tsbenchmarks/retrieval/runner.tsbenchmarks/tests/channels.test.tsbenchmarks/tests/corpus.test.tsbenchmarks/tests/optimization-profiles.test.tsbenchmarks/tests/promotion-evidence.test.tsbenchmarks/tests/report.test.tsbenchmarks/tests/retrieval.test.tsbenchmarks/tests/worker-pool.test.ts
Summary
Validation
Evidence
The refreshed fd/MiniLM smoke still favors Recall-first on excluded-fold NDCG and R@5 while tying Recall@20 and Context@4k. No Production promotion is claimed.
Closes #172
Parent: #166
Summary by CodeRabbit
New Features
Bug Fixes
Documentation