Can you trust your AI's context?
ContextBenchmark is an open standard for measuring the reliability, reproducibility, and stability of AI context systems.
Compare context engines: retrieval indexes, RAG pipelines, agent memory, code-context systems, with deterministic metrics, transparent methodology, and reproducible, fingerprint-verified results.
AI is only as reliable as the context it receives.
Modern AI systems depend on context layers to retrieve knowledge, maintain memory, and ground decisions. Yet there is no standard way to measure whether those context systems are stable, reproducible, or trustworthy. ContextBenchmark fills that gap.
The benchmark intentionally measures the context layer, not the language model. LLM inference nondeterminism is a separate, explicitly out-of-scope problem.
Why AI needs a context benchmark
AI benchmarks measure model capability. They rarely measure the quality of the context supplied to those models. Context determines what an AI knows, remembers, and retrieves, and it ultimately shapes how reliably the AI behaves. ContextBenchmark is an open standard for evaluating context infrastructure independently of the language model itself, and independently of whether any downstream task happens to succeed.
| Existing AI benchmarks | ContextBenchmark |
|---|---|
| Measure the model | Measures the context layer |
| Focus on reasoning and generation | Focuses on reproducibility and reliability |
| Vary with every model update | Designed to remain model-agnostic |
| Evaluate intelligence | Evaluates trust in context |
What ContextBenchmark measures
Four test families, each answering one question a production team actually asks.
Rebuild Identity
Can the system recreate byte-identical artifacts from identical input? Independent fresh builds, artifact hash comparison.
Query Stability
Does the same question return the same context every time: same files, same order?
Drift Under Noise
Does adding one unrelated file change answers to unrelated questions?
Cross-Machine Identity
Do Windows, macOS, and Linux produce identical context? Verified by fingerprint exchange, not by trust.
Future families under specification: agent safety, governance, memory integrity, determinism under incremental update.
Context Trust Levels
Every implementation receives a Context Trust Level based on published benchmark results.
| Level | Name | Requirement |
|---|---|---|
| CTL 4 | Cross-machine deterministic | CTL 3, plus identical artifacts and query results across operating systems, verified by fingerprint exchange |
| CTL 3 | Machine-deterministic | Byte-identical artifacts across rebuilds and exact-match query results across trials |
| CTL 2 | Stable retrieval | Artifact bytes differ, but ranked query results are identical every time |
| CTL 1 | Repeatable locally | Results not identical but rank-stable (Jaccard@k ≥ 0.9, τ ≥ 0.9) |
| CTL 0 | Non-repeatable | Below CTL 1 |
No vendor can claim a level without publishing benchmark artifacts. Every claim is backed by a fingerprint anyone can independently verify, including ours.
Current results
micro-app reference corpus, re-verified 2026-07-17 · fingerprints published in the repository · cross-platform verification runs publicly in CI on every push · same results as JSON.
| Engine | CTL | Rebuild | Query stability | Drift under noise | Cross-platform |
|---|---|---|---|---|---|
| Spiderbrain (structural code-context engine) ours | CTL 3 | Identical | EMR 1.0 | 0.00, noise never surfaced (0/10) | Pending CI-runnable packaging (fingerprint published) |
| BM25 (lexical reference) | CTL 4 | Identical | EMR 1.0 | 0.04, noise reached top-10 in 2/10 queries | Verified in CI: Ubuntu, Windows, macOS |
| MiniLM embeddings (exhaustive-search RAG reference) | CTL 3 | Identical | EMR 1.0 | 0.16, noise reached top-10 in 9/10 queries | Not yet run |
| Mem0 · Zep · Supermemory · LlamaIndex · vector stores | Not run | Awaiting vendor adapters, contribute one | |||
The reference baseline (bm25) reaching CTL 4 shows the bar is achievable with plain engineering. A system scoring below the free baseline has made a design choice, not hit a law of nature.
The drift numbers separate the three architectures clearly: a structural dependency graph (spiderbrain) ignored a file nothing depends on. A lexical index (bm25) leaked the new file into a small number of unrelated result sets, because global term statistics shift slightly whenever a document is added. An exhaustive-search embedding index (emb-minilm), the determinism-friendliest RAG configuration possible, leaked the new file into 9 of 10 unrelated result sets, because a single new document changes the geometry of a shared vector space. That last number is the charitable case: emb-minilm is the most determinism-friendly embedding setup available, and a production ANN index is expected to do worse, not better, because it trades determinism for speed.
Re-verification, 2026-07-17: all three adapters were re-run 12 days after first publication. bm25 and emb-minilm rebuilt byte-identical artifacts. Spiderbrain's artifact did not reproduce, and isolation testing traced it to the engine embedding the enclosing repository's git commit time and the project's absolute path in its artifact, a reproducibility defect in our own engine. Fixed the same day: the engine no longer serialises environment into the artifact (provenance moved to a sidecar; two further couplings found and removed during the fix), its CI now locks the invariance, and the adapter builds from a git-free staged copy so the artifact is a pure function of corpus bytes. The republished fingerprint recomputed identically from a second location (compare verdict PASS). All query results were identical throughout, so every number above is unchanged. Full detail in results.json.
Field note, 2026-07-19: the contract held under refactoring. Two days after the fix above, the same engine went through a deliberately heavy day of internal change, deployed to production in four stages: three separate scoring code paths were unified into one shared scorer, output leak guards were hardened, and the cloud ingest strategy changed from shallow single-commit clones to full-history clones. Across five production parses of the same public reference repository (benjaminp/six, commit c8e3940) spanning all four deploys, the published structural fingerprint stayed identical: 9fb6e364e9c1fe49. The scored layer grew from 7 to 16 per-node fields; the fingerprinted structure never moved. That is the separation the fingerprint contract promises: the artifact is a function of the corpus and the declared contract, not of engine internals. The engine's internal CI now runs 45 determinism and contract gates, including artifact-invariance (unrelated commits, paths, mtimes) and a scorer-unification gate that fails if any scoring path drifts from the shared one. It has stayed identical through every production deploy since, including a cloud-parse API that added authenticated, metered parsing of a repository into a hosted brain: a new feature and a new authenticated surface, and still the same structural fingerprint for the same commit. Continued 2026-07-20: four further production deploys, this time rewriting the engine's memory subsystem rather than its scoring: a read-after-write consistency guard, an idempotent ratification path, hardened error handling across four blob stores (a failed read no longer reads as an empty one), and the groundwork for moving the memory log off object storage into Postgres. None of that touches the parser, the scorer, or the artifact contract, and the prediction was that the fingerprint would not move. It did not: the same commit of the same repository parsed through the production API after all four deploys returned 9fb6e364e9c1fe49 again. The value of the contract is exactly that this was boring. Disclosure: this is an operator-reported observation from our own engine's production API, not an independently reproduced benchmark run; trust levels above are unchanged by it.
Field note, 2026-08-04 — and unlike the two above, this one is a benchmark run, not an operator report. The engine published a new major version and both of its production surfaces were redeployed, so the suite was re-executed against the committed corpus. Every family passes again inside the new version: rebuild-identity 1 distinct hash over 3 builds, exact-match rate 1, drift-under-noise 0 with 0 noise in the top 10. CTL 3 is therefore re-earned here, not carried over. Two values moved — the engine identity (ffdd6784a7c77ce7 → 3cc01f9964131211) and the artifact hash. Because engine identity is a controlled variable, our own compare refuses the cross-version question instead of answering it: NOT COMPARABLE — a controlled variable differs, so neither PASS nor FAIL would mean anything. So we are not claiming the artifact reproduced across the version boundary; that claim is not available, and asserting it would break the disclosure rule this benchmark is built on. Recorded as an observation rather than a verified reproduction: all 10 query result hashes are byte-identical to the pre-6.0.0 fingerprint. Retrieval behaviour did not move across a major version whose artifact format did — the CTL 2 property surviving underneath a CTL 3 claim, which is precisely why the two are separate levels.
Designed for fair comparison
ContextBenchmark evaluates context infrastructure, not language models, and not marketing.
- Adapter API (about 40 lines per system)
- Open datasets, committed and license-clean
- Public methodology and metrics
- Fingerprint verification for every claim
- No benchmark-specific optimizations allowed
- Reproducible runs on commodity hardware
Benchmark architecture
git clone https://github.com/aabhisrv/contextbenchmark && cd contextbenchmark node contextbenchmark.mjs run --adapters bm25 # dependency-free baseline node contextbenchmark.mjs run --adapters bm25,emb-minilm # + typical-RAG reference node contextbenchmark.mjs compare A.fingerprint.json B.fingerprint.json
Built for vendors
Implement a lightweight adapter and benchmark your context system against the same transparent methodology used by every participant.
Honesty rules apply to everyone: production configuration only, no benchmark-only determinism flags, results disclosed with fingerprints. Read the adapter contract →
Research and methodology
ContextBenchmark builds on reproducible-systems research, retrieval evaluation, and software reproducibility practice, and introduces standardized measurements for deterministic AI context.
Methodology
Test-family definitions, trial counts, pass criteria, and level assignment, versioned in the repository.
Metrics
Exact Match Rate, Jaccard@k, and Kendall τ follow the conventions established for RAG reproducibility measurement (ReproRAG, arXiv:2509.18869).
Datasets
Committed, deterministic corpora with fixed query sets; pinned real-repository tiers planned.
Disclosure
A publishable result includes the report, fingerprints, versions, corpus identity, and machine spec. No fingerprint, no claim.
Versioning
Metric or family changes version the benchmark; levels are always cited with the benchmark version that produced them.
Out of scope
LLM inference nondeterminism, a model-serving problem with its own literature (arXiv:2408.04667) and its own fixes. Fenced off deliberately: conflating the layers makes determinism claims meaningless.
Ancestry
Reproducible Builds and hermetic build verification: bit-by-bit artifact identity as the trust primitive, applied here to AI context artifacts.
Questions
What is ContextBenchmark?
ContextBenchmark is an open, vendor-neutral benchmark that measures whether AI context systems (retrieval indexes, RAG pipelines, agent memory, code-context engines) produce stable, reproducible, and trustworthy results across builds, queries, environments, and noise.
Does ContextBenchmark measure language models?
No. It deliberately measures the context layer only. LLM inference nondeterminism is a separate, explicitly out-of-scope problem with its own research literature.
What are Context Trust Levels?
CTL 0 to 4 grade a context system from non-repeatable (CTL 0) to cross-machine deterministic (CTL 4). No vendor can claim a level without publishing verifiable benchmark fingerprints. See the full ladder.
How do I run ContextBenchmark?
Clone the MIT licensed repository from GitHub, implement a roughly 40-line adapter for your system (or use the shipped adapters), and run node contextbenchmark.mjs. Results include a verifiable fingerprint anyone can compare.
What is drift under noise?
Whether adding one irrelevant file to a corpus changes the ranked results for queries that have nothing to do with it. A well-behaved system shows near-zero drift. On our reference corpus the three architectures scored 0.00, 0.04, and 0.16. See why.
Is ContextBenchmark the same as ContextBench, Context-Bench, or STATE-Bench?
No. All are unaffiliated and measure different things: context-retrieval accuracy in coding agents, how well language models perform agentic context engineering, and whether an agent with memory succeeds repeatably end to end. ContextBenchmark measures something none of them do: whether the context artifact and its ranked results are byte-identical, independent of any task or model. Full comparison.
Who runs this, and why you can check it
ContextBenchmark is maintained by Abhishek Srivastava, who also builds Spiderbrain, one of the systems in the results table above. That is a conflict of interest, so it is disclosed here rather than left for you to discover.
A benchmark that grades its author's own product has to be checkable, not merely trusted. Three things make it so:
It does not win
The free BM25 baseline reaches CTL 4. Spiderbrain sits at CTL 3, because its cross-machine run is not yet CI-runnable. The rules deny the author's own system the top level.
Every claim carries a fingerprint
Including ours. A level without a published, recomputable fingerprint is not a result. Recompute ours and compare; that is the whole point of the format.
All of it is public
Methodology, corpora, metrics, and every adapter are MIT licensed and inspectable. A rigged benchmark cannot survive being reproducible by strangers.
If you find a way this benchmark unfairly favours any system, Spiderbrain included, that is a bug, not a footnote. Open an issue and it gets fixed in public. Proof this works: the 2026-07-17 re-verification caught a reproducibility defect in Spiderbrain's own artifact serialization; it is disclosed in the results rather than papered over, and the engine fix shipped the same day.
Open source
ContextBenchmark is community-driven. Every benchmark, adapter, dataset, metric, and result is publicly inspectable and reproducible.