Skip to content

Benchmarks ​

The benchmarks live in benchmarks/ as their own package, @cortex/benchmarks. The numbers here are copied from its README, which has the method, the flags and the full logs. The same results, with charts, are on the benchmark report.

Code search: vector, BM25 and hybrid ​

benchmarks/retrieval_bench.ts runs 15 hand-written questions against this repo's own index, each with the file that answers it. Embedder all-minilm.

Moder@1r@3r@5r@10MRRCost per query
vector0.5330.6670.8001.0000.656~12 ms, 0 tokens
BM250.2670.6670.9331.0000.530~8 ms, 0 tokens
hybrid (RRF)0.6000.7330.8001.0000.703~8 ms, 0 tokens
vector + LLM rerankno change to r@1+2.1 s, 1,359 tokens
bge-m3 denseworse than all-minilm226× the query latency

Hybrid is what shipped: it was the only option that moved r@1. The right file is always in the top ten, which is why the guides say to read all ten hits rather than search again.

bash
pnpm --filter @cortex/benchmarks bench:retrieval -- --project <projectId>

bench:mem9 measures cortex_memory_search ordering on 100 questions, all-minilm:

CorpusModenr@1r@5r@10MRR
devvector240.9171.0001.0000.951
devhybrid241.0001.0001.0001.000
LongMemEvalvector1000.4500.8000.8900.601
LongMemEvalhybrid1000.5500.8700.9000.685

Storing a memory (add(), 8 facts per call, LLM stubbed) went from a p50 of 1,430 ms to 248 ms with the hybrid collection.

Run it against a throwaway Qdrant and Ollama, never a live hub.

Knowledge search: LongMemEval-S ​

bench:longmemeval imports the sessions of the cleaned LongMemEval-S set into one project, then asks all 500 questions against it.

R@5R@10
Cortex Hub, hybrid96.0%97.8%
Cortex Hub, vector only93.8%97.0%
MemPalace, published baseline (OpenAI embeddings)96.6%98.2%

WARNING

These runs date from April 2026 and used an in-process MiniLM embedder that has since been removed; embeddings now go through the hub's LLM gateway to Ollama. The README also reports an NDCG@10 above 1, which a normalized metric cannot reach, so that column is left out here.

Roadmap ​

ConvoMem, LoCoMo and MemBench are listed in the README as planned, not implemented.

MIT License