contexel GitHub

Benchmarks

Measured, not asserted — and deliberately without a headline "X% reduction" number, because reduction is a property of your data and your budget, not of the library. Two reproducible suites; full tables live in the repo (benchmarks/RESULTS.md, benchmarks/COMPARISON.md).

Suite 1 — contexel's own claims

python -m benchmarks (needs the accurate extra). Highlights:

Suite 2 — against the prior art, on real data

python -m benchmarks.competitors (needs the benchmarks extra; first run downloads the CodeSearchNet python/test split, ~30 MB). The full split — 22,176 real functions — is reconstructed into 28,047 search-tool records with genuine duplicates, plus 100 ground-truth episodes where the record the agent needed is known and guaranteed present in the raw hits, so recall isolates shaping loss, not retrieval loss. Budget: 1,500 tokens.

ImplementationNative opsms @28kms/episode Recall (strong/weak)ComplianceFillUseful Import msDeps
contexel6/65914.9 100% / 100%100%0.95× 100%130
hand-written glue0271.6 93% / 32%100%0.95×100%
toolz2426.9 100% / 100%0%91.6×100%130
langchain-core11397.2 30% / 30%100%0.52×89.8%9125
llama-index-core051621.4 100% / 100%0%129×74.2%1,09560

How to read it

Limits, stated plainly

Recall@budget has a ceiling no shaper escapes: when a query legitimately describes more records than the budget holds, some valid record is cut — semantic or not. The 100% here means the ambiguity clusters resolved once exact-word evidence was used; vaguer queries, a different corpus, or a tighter budget can put it back under 100, and that is the data's property, not the policy's.

rescore is lexical: a query saying parsing scores zero against a document saying parse; synonyms and paraphrase belong to semantic rerankers (LLMLingua, ColBERT, cross-encoders), which contexel deliberately does not compete with.