feat: smriti bench — search quality benchmarking#53
Draft
Conversation
Adds `smriti bench` command: a ground-truth quality benchmark inspired by Karpathy's autoresearch pattern. Produces one combined score (0.0–1.0) to track search quality over time and gate upstream QMD upgrades. - 12 realistic corpus sessions across 3 projects (webapp, ml-pipeline, infra) - 36 ground-truth queries: 12 easy (FTS), 12 medium (recall), 12 hard (filtered) - MRR, Hit@3, Hit@5 per tier; weighted combined score (easy 15%, medium/hard 35% each) - CI thresholds: easy MRR ≥ 0.70, medium ≥ 0.25, hard ≥ 0.12, combined ≥ 0.30 - CLI flags: --profile, --json, --out, --compare, --no-perf, --save, --history - smriti_bench_runs table for historical tracking - 30 tests (all passing)
Contributor
Benchmark Scorecard (ci-small)Bench Scorecard (ci-small)threshold: 20.00%
Summary: WARN (4 metrics) |
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.
Summary
smriti benchcommand: a ground-truth quality benchmark inspired by Karpathy's autoresearch patternWhat's in it
Corpus — 12 realistic sessions across 3 projects (webapp, ml-pipeline, infra), 2 agents, 6 categories. Session s04 has sidecar content (thinking, artifact, attachment) to exercise sidecar search paths.
Query suite — 36 ground-truth queries across 3 tiers:
Metrics — MRR, Hit@3, Hit@5 per tier. Combined score formula:
CI thresholds — Easy MRR ≥ 0.70, Medium ≥ 0.25, Hard ≥ 0.12, Combined ≥ 0.30
CLI
Current scores (ci-small, FTS-only — no embeddings in bench)
Medium is low by design — recall queries need vector embeddings which aren't available in the in-memory bench. As QMD's embedding/reranker models improve (autoresearch loop), this score will rise.
Test plan
bun test test/bench.test.ts— 30/30 passbun src/index.ts bench --profile ci-small— runs end-to-endbun src/index.ts bench --json --out /tmp/bench.json— JSON output worksbun src/index.ts bench --compare /tmp/bench.json— comparison works