Benchmarks & methodology

Last measured 2026-09-06 (exact retrieval) · Full raw write-up ships in the package as BENCHMARKS.md

Two headline numbers appear on our landing page: 96/100 search quality and ~80% token savings. This page explains exactly how each was measured, on what, and by whom — and publishes the harder numbers too: the adversarial query shapes we partially or completely fail, and the stricter automated regression scores. If a benchmark on this page looks unflattering, that's deliberate: we'd rather you calibrate on real numbers than discover the limits mid-trial.

1. Search quality — 96/100 (human-scored relevance)

Methodology: 20 canonical queries covering the search patterns agents actually issue — exact function lookup, conceptual questions ("how does authentication work"), cross-file tracing, configuration discovery, error handling, template search, API endpoints, security mechanisms, infrastructure, legacy code. Each query's top-5 results were scored 0–5 for relevance by a human evaluator. 96/100 = an average of 4.8/5 across the 20 queries.

Corpus: a real production marketplace codebase — ~3,500 PHP/JS/Smarty files, ~11,400 indexed chunks, 20 years of accretion. Not a curated demo repo.

Query typeExampleScore
Function lookup"PayPal IPN handler"5/5
Conceptual"how does authentication work"5/5
Cross-file"where is the newsletter sent"5/5
Configuration"database connection settings"5/5
Error handling"what happens when payment fails"5/5
Legacy code"deprecated functions still in use"4/5

Cross-codebase validation: the same human-scored protocol on the public Laravel framework (36K chunks) scored 83/100 across 30 queries spanning middleware, Eloquent, queues, auth, caching, validation, mail, sessions, routing, and more.

Garbage-input robustness: 10 nonsense/off-topic queries (pizza recipes, random unicode, SQL injection strings). Three correctly returned zero results; the rest returned only low-confidence results below the actionable threshold. No false confidence.

2. Token efficiency — ~80% savings

Methodology: 12 real development tasks performed twice with Claude Code — once with plain grep/file-reading, once with CodeNavi as the retrieval layer — measuring context-window tokens consumed before reaching the correct solution.

MetricWithout CodeNaviWith CodeNavi
Avg tokens per task~45,000~9,000
Tasks where CodeNavi helped—10/12
Tasks with no difference—2/12

The two no-difference tasks were simple, well-named function lookups where grep was equally effective.

3. What we fail — adversarial query shapes

A second, deliberately hostile 10-query set targets shapes the canonical 20 don't cover: caller-tracing, polysemous verbs, intent with zero vocabulary overlap, absence queries. Pure semantic search scored 19/50 (38%) on it.

Query shapeExampleSearch alone
Caller-trace"what runs after a payment is confirmed"3/5
Polysemous verb"process order"2/5
Intent → vocab gap"stop users from buying their own listing"0/5
Absence / negative"endpoints that don't check authentication"0/5
Multi-hop flow"end-to-end password reset"4/5

This is why CodeNavi ships structural tools alongside search: find_callers, impact_analysis, and grep_search run against a call-graph sidecar built at index time. Re-running the four structural/flow queries with the real agent flow — search to find the entity, then a structural tool — moved that subset from 10/20 to 17/20. One cluster stays out of scope by design: absence queries ("where is X missing") are not a retrieval problem — use static analysis or linting for that shape. We won't promise it.

4. Automated regression scores (stricter, lower — published anyway)

Every release also runs an automated harness (tools/benchmark.py, ships in the package): 20 queries per codebase with an expected-substring answer key, scored by counting how many expected files/symbols land in the top-5. This measures coverage of a fixed answer set, not relevance — a top-5 full of correct, useful results still scores low if it surfaces different (equally valid) files than the key expects. It exists to catch regressions between releases, not to describe experienced quality; it is deliberately hard to please. Scores from the 2026-09-06 run on the live dev index, read with exact retrieval — the approximate vector index adds up to ±7 points of build-to-build noise, so the published numbers bypass it:

CodebaseLanguageChunksScore (2026-09-06, exact)
Production marketplace (private)PHP/Smarty~12k68/100
Laravel frameworkPHP~38k38/50 (76%)
BugzillaPerl~4.5k55/100
CodeNavi self-indexPython~4.4k70/100
MedusaJS (packages/ only)TypeScript~36k63/100

The MedusaJS corpus is scoped to packages/ since 2026-09-06: the repository's docs site (www/) had made 58 % of the chunks, and generated API docs were competing with product code for the same top-5 — the same dilution a monorepo with a docs subtree sees until that subtree is excluded at index time (EMBED_SKIP_DIRS).

Since 2026-09-05 every set also carries four identifier-bearing queries — a bare symbol such as Str::slug or bz_locations, or prose plus an identifier. All 20 hit the defining file; they are scored separately so the table above stays comparable with earlier runs. The same run is the committed baseline a release cut is gated against.

The human-scored 96/100 and the automated 68/100 on the same codebase are different instruments measuring different things — the gap between them is the difference between "were the top-5 results relevant?" (what a user experiences) and "did the top-5 contain these exact pre-listed substrings?" (what a regression gate needs).

5. Limitations — read these

Want to check the numbers on your code instead of ours? Request a 30-day trial — the package includes the benchmark harness, so you can build your own query set and hold us to it.