Skip to content

benchmarks: Add zvec-grep to benchmarks - #268

Merged
Pringled merged 8 commits into
mainfrom
add-zvec-grep-baseline
Sep 12, 2026
Merged

benchmarks: Add zvec-grep to benchmarks#268
Pringled merged 8 commits into
mainfrom
add-zvec-grep-baseline

Conversation

@Pringled

Copy link
Copy Markdown
Member

This PR adds zvec-grep to our benchmarks.

Adds benchmarks/baselines/zvecgrep.py following the existing baseline
pattern (index + hybrid query, parsed from its markdown CLI output
since it has no --json flag), plus results from a full 63-repo run
(avg NDCG@10 0.670, index 3.95s, query p50 386ms) folded into the
README tables, by-language breakdown, and speed/quality plots.

Claude-Session: https://claude.ai/code/session_013GB3H6NiUFKsyAVC3aQNZf
Regenerate the conflicting cold plot from the merged plot.py (main's new
semble index time plus the zvec-grep point). Label zvec-grep left of its
point so it no longer collides with ColGREP (cold) or runs off the right
edge (warm), and note in the benchmark README that it was measured on
v0.2.1 in direct mode, one process per query like the other CLI baselines.

Claude-Session: https://claude.ai/code/session_01N5WnCfeaj66TgZTbqm2Zew
Enlarge the figure to 10x6.25 so zvec-grep and ColGREP no longer collide,
keep every label right of its point, and extend the warm axis to 1 s
(with a tick) so zvec-grep's label stays inside the plot.

Claude-Session: https://claude.ai/code/session_01N5WnCfeaj66TgZTbqm2Zew
The offset is fixed in cube-root(ms) space, so the wider canvas turned the
same gap into ~48px instead of ~37px. The warm plot is unaffected: its
axis grew with the canvas.

Claude-Session: https://claude.ai/code/session_01N5WnCfeaj66TgZTbqm2Zew
The old offset was a fixed distance in cube-root(ms) space, so the visible
gap depended on marker size, axis range and figure size — labels drifted
far from the smaller bubbles. Offsetting by the marker's radius plus a
fixed 3pt keeps the gap identical everywhere, which also removes the two
per-plot delta constants.

With labels attached to their bubbles the extra canvas is no longer needed
to keep zvec-grep and ColGREP apart, so the figure drops back to 9x5.6 and
labels go to 9.5pt to restore the density of the original plots.

Claude-Session: https://claude.ai/code/session_01N5WnCfeaj66TgZTbqm2Zew
@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@greptile-apps

greptile-apps Bot commented Sep 12, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

The PR should not merge until zvec-grep latency is measured using the same documented methodology as the other methods in the comparison.

Reviews (1) · Last reviewed commit: "Update readme"

Comment thread benchmarks/README.md Outdated
Comment thread benchmarks/README.md Outdated
Comment thread benchmarks/README.md
Address review comments: pin the reproduction install to @0.2.1 and record
`zg --version` in the results file, since the runner parses zg's
human-readable output and a CLI change would silently alter the numbers.

Also correct the model references the default bump to potion-code-16M-v2
left behind: the methodology line and four ablation rows still named
potion-code-16M, while both ablation result files record v2.

Claude-Session: https://claude.ai/code/session_01N5WnCfeaj66TgZTbqm2Zew
Its latency came from benchmarks.baselines.zvecgrep (63 repos, 3 runs per
query), while the published speed figures use speed_benchmark's 19 repos
and 5 consecutive runs. Add a zvec-grep bench there and generalise
--semble-only into --tools/--repo so one tool can be re-measured without
re-running the slow baselines.

Re-measured: index 4.0s -> 3.4s, query p50 386ms -> 391ms. The p50 barely
moves because direct mode spawns a zg process per query, but the row is
now comparable to the others in the table.

Also fix _AsymmetricWrapper.encode, which rejected the max_length argument
semble has passed since #264 — CodeRankEmbed crashed any full run.

Claude-Session: https://claude.ai/code/session_01N5WnCfeaj66TgZTbqm2Zew
@Pringled
Pringled requested a review from stephantul September 12, 2026 09:29
@Pringled
Pringled merged commit 0051e00 into main Sep 12, 2026
16 checks passed
@Pringled
Pringled deleted the add-zvec-grep-baseline branch September 12, 2026 09:33
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.

1 participant