ContextVault: what the benchmarks actually say

  • contextvault
  • rag
  • retrieval
  • evaluation

ContextVault is an engineering-memory service: store technical material with product, version, document type, and lifecycle metadata; retrieve evidence for a question; only then decide whether an answer is safe to generate.

This is a benchmark note, not a victory lap. The project has one completed public retrieval result, two smaller answer-path diagnostics, and one important gap: BGE-base has not yet completed a fair run on this host. I would rather leave that blank than decorate it with a score it did not earn.

The short version

AreaWhat is measuredWhat it says
Public retrievalContextVault FTS on BEIR SciFactA fast, credible lexical baseline
Answer safetyDirect RAG vs Jev-gated RAG on 16 casesThe gate removed observed unsupported answers, but reduced answer coverage
Recovery control flow30-case offline diagnosticThe gated recovery path is wired safely; this corpus did not need it to improve coverage
Dense retrievalBGE-base-en-v1.5Planned comparator, not yet a completed result

The current system is not “an FTS model” competing directly with BGE-base. FTS is the measured retrieval baseline. BGE-base is the next local dense-retrieval component to evaluate, then combine with FTS in a hybrid pipeline.

1. A real public retrieval benchmark

The most useful external result so far comes from BEIR SciFact, a public scientific-claim retrieval benchmark. ContextVault indexed 5,183 scientific abstracts and evaluated 300 test queries with relevance judgements. This measures document retrieval, not final answer quality or scientific fact verification.

ContextVault FTS, top 10Result
nDCG@1065.06%
MRR@1062.23%
Recall@151.50%
Recall@572.71%
Recall@1076.40%
Query latency, p5015.4 ms
Query latency, p9525.7 ms
Query latency, p9930.1 ms
Evaluation errors0

That is a useful starting point: the baseline can retrieve exact scientific language quickly and consistently. It is not evidence that ContextVault has beaten modern dense retrieval. It is evidence that the project has a public number worth trying to beat.

Where BGE-base fits

BAAI/bge-base-en-v1.5 is a 109M-parameter English embedding model. Instead of matching words through an FTS index, it maps queries and chunks into 768-dimensional vectors and looks for semantic proximity. That tends to help with paraphrases and conceptually similar wording that do not share the same terms.

Current ContextVault FTSCandidate: BGE-base
Retrieval approachLexical / exact-term matchingDense semantic embeddings
Best atNames, IDs, error codes, exact technical termsParaphrases and semantic matches
External SciFact scoreMeasured: nDCG@10 65.06%Not measured here yet
Query costLow; p95 25.7 ms in this runRequires persisted vectors and an ANN index for scale
Local footprintSQLite FTS indexRoughly 0.4–0.6 GB model download; 768-dimension vectors

The correct comparison is not “FTS or BGE.” It is eventually FTS + dense retrieval, followed by a reranker over only the strongest candidates. Before that, the dense implementation needs to persist embeddings and use approximate nearest-neighbour search. The first full BGE-small run repeatedly exceeded the CPU benchmark window because it recomputed too much work; those incomplete files are deliberately excluded from the results above.

2. Does the Jev gate make answers safer?

The answer path retrieves passages and can call a separate semantic decision provider, Jev, before it lets a generator write. Generation is allowed only if the decision is trusted, non-degraded, answerable, and non-conflicting. The generator receives only a server-built evidence manifest, and every generated claim must cite manifest evidence.

For the first live diagnostic, direct RAG and Jev-gated RAG received the same FTS candidates and used the same answer model. The corpus had 16 labelled cases. That controls the retrieval and generation input; it isolates the decision gate.

16-case live diagnosticDirect RAGJev-gated RAG
Action correctness43.75%68.75%
Unsupported-answer rate25.00%0.00%
Generated answers73
Abstentions913
Provider / format failures74
Total cost$0.0006318$0.0006225
Total latency, p500.84 ms314.14 ms
Total latency, p952,158.56 ms2,942.35 ms

The honest reading is mixed but encouraging. Jev stopped the unsupported answers observed in this small run, and it slightly reduced failures. It also answered fewer questions and added decision latency. That is a safety/coverage trade-off, not proof of better final answer writing. The generator calls were also flaky enough that this must be repeated on a larger held-out set.

3. What the recovery loop has proved — and what it has not

A gate should not just say “no” and walk away when a missing fact might be elsewhere in the knowledge base. ContextVault’s recovery endpoint builds focused searches from the rejected question, retrieves new chunks under the same metadata filters, merges only new evidence, and asks the gate again. The loop is bounded and stays fail-closed.

An offline 30-case diagnostic verifies the control flow with deterministic providers:

30-case offline diagnosticDirect RAGJev-gatedJev-gated + recovery
Action correctness70.0%100.0%100.0%
Answers281919
Abstentions21111

This result is intentionally modest. The initial top-5 FTS retrieval already found the expected files in this particular corpus, so recovery did not raise coverage. It demonstrates safe wiring: shared candidates, gate enforcement, evidence merging, citation validation, and round-by-round telemetry. It does not prove that recovery improves production answer quality. A separate multi-hop test verifies that recovery can add a missing second document and then gain approval; a larger held-out benchmark is still needed.

How the system is constrained

The design is deliberately conservative where it matters:

  • Evidence is treated as data, not as instructions.
  • Jev does not generate the answer and does not grade its own answers.
  • Rules fallbacks are marked degraded and cannot authorise generation.
  • Citations use server-created evidence IDs and file-level hashes.
  • Unknown citations, malformed answers, provider failures, unavailable providers, degraded decisions, and conflicts all return a structured abstention.
  • The public upload response does not disclose the server’s internal storage path, and uploads have a default size limit.

That does not make the project production-complete. Authentication, tenant isolation, background ingestion, durable answer storage, persistent dense-vector indexing, claim-level entailment checks, and a dependency security upgrade remain open work.

The next benchmark that matters

The next honest comparison will use the same BEIR SciFact corpus, the same 300 judged queries, and the same top_k=10 for three retrieval arms:

  1. ContextVault FTS — the measured lexical baseline.
  2. BGE-base dense retrieval with persisted embeddings and ANN search.
  3. Hybrid FTS + BGE-base, optionally reranked over the top candidates.

It should report nDCG@10, MRR@10, Recall@1/5/10, index-build time, index size, RAM, p50/p95/p99 latency, error count, exact model version, and corpus checksum. Only then will there be a fair answer to “is dense retrieval better here?”

The raw benchmark JSON stays local under an ignored benchmark-results/ directory because it can contain query text, source snippets, provider telemetry, local paths, and cost data. This post keeps the reviewed conclusions public without turning diagnostic artefacts into accidental published data.

For the implementation, API boundaries, and reproducible commands, see the ContextVault repository, its BEIR SciFact evaluation guide, and the end-to-end evaluation guide.