Skip to content

refactor(ai): rank the benchmark with numpy and pytrec-eval - #6388

Merged
dan-petty merged 1 commit into
mainfrom
refactor/1928-rank-the-benchmark-with-numpy-and
Nov 19, 2026
Merged

dan-petty merged 1 commit into
mainfrom
refactor/1928-rank-the-benchmark-with-numpy-and

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

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 dan-petty added type/refactor Type refactor: a new structure, same behavior scope/ai AI review pipeline, personas, prompts, LLM client, or RAG labels Nov 19, 2026
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
dan-petty force-pushed the refactor/1928-rank-the-benchmark-with-numpy-and branch from c8f6faf to 063a1b5 Compare November 19, 2026 07:16
@dan-petty
dan-petty marked this pull request as ready for review November 19, 2026 07:30
@dan-petty
dan-petty merged commit 051217e into main Nov 19, 2026
46 of 48 checks passed
@dan-petty
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/ai AI review pipeline, personas, prompts, LLM client, or RAG type/refactor Type refactor: a new structure, same behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(ai): rank the benchmark with numpy and pytrec-eval

1 participant