Repository navigation
refactor(ai): rank the benchmark with numpy and pytrec-eval - #6388
Merged
Merged
Conversation
The embedding benchmark of #1928 ranks every query against every chunk in a pure Python loop, with one cosine_similarity call per pair and its own recall, MRR and nDCG code, so the ranking takes 57 seconds on the 7,699-chunk fixture and about 2 minutes of a 27-to-29-minute run. One numpy matrix product over row-normalized vectors and pytrec_eval give the same scores in under a second. Closes #1928 Change: `openspec/changes/archive/2026-11-19-1928-rank-the-benchmark-with-numpy-and/`
dan-petty
force-pushed
the
refactor/1928-rank-the-benchmark-with-numpy-and
branch
from
November 19, 2026 07:16
c8f6faf to
063a1b5
Compare
dan-petty
marked this pull request as ready for review
November 19, 2026 07:30
dan-petty
deleted the
refactor/1928-rank-the-benchmark-with-numpy-and
branch
November 19, 2026 11:14
dan-petty-release Bot
added a commit
that referenced
this pull request
Nov 19, 2026
🤖 I have created a release *beep* *boop* --- ## [0.179.5](v0.179.4...v0.179.5) (2026-11-19) ### Bug Fixes * **ai:** bound the number of prewarm model label values ([#6391](#6391)) ([e3fa4f1](e3fa4f1)) * **ci:** count a changed test that errors on base as proof ([#6379](#6379)) ([6881b4c](6881b4c)) * **deps:** update Helm release argo-cd to v10.18.2 ([#6398](#6398)) ([2604ace](2604ace)) * **infra:** Fix the offline separator of a comma limit ([#6387](#6387)) ([98493e4](98493e4)) * **roadmap:** Name the cause of a stopped verification run ([#6333](#6333)) ([bbf308d](bbf308d)) * **roadmap:** Stage a long plan body and a null optional text ([#6351](#6351)) ([053aabc](053aabc)) * **telemetry:** Keep the age metrics' reads across pods ([#6326](#6326)) ([ad0ee60](ad0ee60)) ### Code Refactoring * **ai:** rank the benchmark with numpy and pytrec-eval ([#6388](#6388)) ([051217e](051217e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The embedding benchmark of #1928 ranks every query against every chunk in a pure Python loop, with one cosine_similarity call per pair and its own recall, MRR and nDCG code, so the ranking takes 57 seconds on the 7,699-chunk fixture and about 2 minutes of a 27-to-29-minute run. One numpy matrix product over row-normalized vectors and pytrec_eval give the same scores in under a second.
Closes #1928
Change:
openspec/changes/archive/2026-11-19-1928-rank-the-benchmark-with-numpy-and/