Skip to content

feat: Add a commit-message query set to the benchmark - #302

Closed
flyinprogrammer wants to merge 1 commit into
MinishLab:mainfrom
flyinprogrammer:feat/commit-message-benchmark
Closed

flyinprogrammer wants to merge 1 commit into
MinishLab:mainfrom
flyinprogrammer:feat/commit-message-benchmark

Conversation

@flyinprogrammer

Copy link
Copy Markdown

Closes #301

Summary

A second, independent query set: each query is a commit subject from the pinned repo's own history, and its targets are the 1–3 non-test source files that commit changed.

 benchmarks/
 ├── annotations/              # 1,251 generated queries (unchanged)
+├── annotations_commits/      # 2,416 commit-subject queries, same JSON format
+├── mine_commit_queries.py    # history-only clones → annotations_commits/
 ├── data.py                   # load_tasks(annotations_dir=…), opt-in --query-set
 ├── run_benchmark.py          # --query-set {annotations,commits}
 └── baselines/ablations.py    # --query-set {annotations,commits}
mine_repo(repo)
  history-only clone (--filter=blob:none), log from the pinned revision (--no-merges --no-renames)
  for each commit, newest first
    query   = subject without PR refs / conventional prefixes; 4-20 words; not a chore
    targets = 1-3 non-test source files changed, present at the pinned revision, inside benchmark_root
    skip commits touching more than 6 files
  keep up to 40, deduplicated
Query set Queries Query words found in target Every word in target
annotations 1,251 74% 31%
commits 2,416 68% 13%

Evidence

  • Defaults unchanged: run_benchmark with no flags gives NDCG@10 0.852 on main and on this branch. The other baselines don't take --query-set, so nothing changes for them.
  • New set: run_benchmark --query-set commits gives NDCG@10 0.735, written to results/semble-hybrid-commits-<sha>.json.
  • Reproducible: re-running mine_commit_queries writes byte-identical files (2,416 queries).
  • Checks: make test 391 passed; make lint and make typecheck clean; ruff check and ruff format --check clean on benchmarks/.

Merge Danger

Door: two-way

Benchmark tooling only; nothing under src/ changes.

Blast Radius: benchmarks

The data adds 740 KB in 63 JSON files. Mining needs network access to clone history, about 600 MB of history-only clones in ~/.cache/semble-bench-history.

benchmarks/README.md says the annotations were generated by Claude Sonnet 4.6,
and their wording tracks the target code closely: on average 74% of a query's
words appear in its target file (27% for a random file in the same repo),
which favours lexical and path signals.

benchmarks/mine_commit_queries.py mines an independent set from each pinned
repo's own history: the commit subject is the query and the 1-3 non-test
source files it changed are the relevant targets (chores, merges and broad
commits are skipped). 2,416 queries across all 63 repos, 68% word overlap,
13% with every word present (31% for the annotations).

run_benchmark and the ablation runner take --query-set commits; results are
saved under a separate name. Defaults are unchanged. semble scores 0.735
NDCG@10 on the commit set.
@stephantul stephantul closed this Oct 19, 2026
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.

Benchmark: add a commit-message query set so ranking changes aren't tuned to the annotations' style

2 participants