Benchmark evidence
MatrixArk benchmark: game-changing LLM context without a hot-path VectorDB.
The benchmark below exercises the actual MatrixArk context loop: ingest scoped events and resources, extract serving state, store summaries and embeddings in TemporalStore, traverse the context tree layer by layer, apply time decay and filters, pack under token budget, learn from feedback, and replay why context was selected. The local deterministic run passed all six tasks in tree-only mode while scoring at most 6 candidate nodes, not one million vector candidates.
Latest local run
This run used the local deterministic benchmark path so it is repeatable in development and CI without external model downloads. The same benchmark can run with OSS embedding and extraction providers when local model downloads are enabled.
| Metric | Value | Meaning |
|---|---|---|
| Benchmark | matrixark_temporal_context_benchmark | End-to-end context serving benchmark. |
| Tasks | 6 run, 6 passed | Current state, risk recall, progressive loading, resource citation, compression, bounded fanout. |
| Accuracy | 1.0 | All expected hits and behavior checks passed. |
| Max candidate nodes scored | 6 | Tree-only traversal plus secondary-index expansion avoided global ANN fanout. |
| Hot-path systems | 1 | TemporalStore owns serving records, summaries, embeddings, indexes, compression, and audits. |
| Hot-path ANN required | No | Embeddings are stored and scored in TemporalStore after filters narrow candidates. |
| Average prompt tokens | 68.8 | ContextPacks stayed compact through summaries, filters, and token budgeting. |
| Max prompt tokens used | 160 | The exact resource-citation task used the largest pack. |
| P50 / P95 latency | 0 ms / 0-1 ms observed | Local in-memory deterministic path; real deployment latency depends on storage and model setup. |
| Replay audits | 7 | Every query and feedback path wrote replayable audit state. |
Storage objects created
The benchmark is useful because it exercises the same compact TemporalStore records that the product uses. It does not only score an offline retrieval function.
| Object type | Count | Role in context serving |
|---|---|---|
| ContextNode | 17 | Filesystem-like hierarchy for tenant, team, project, collection, entity, and resource scopes. |
| ContextChildRef | 16 | Parent-child edges used for bounded layer traversal. |
| ContextEvent | 8 | Timestamped facts, approvals, costs, risks, feedback, and confirmations. |
| ContextSummary | 38 | L0/L1 summaries for navigation, packing, and session/entity memory. |
| ContextCompressionEvent | 1 | Cold historical window returned only for historical context. |
| ContextEmbedding | 53 | Summary, query, event, and chunk vectors stored in TemporalStore. |
| ContextPackAudit | 7 | Replay data for selected, blocked, dropped, and feedback refs. |
Six benchmark tasks
The tasks are intentionally operational. They test whether MatrixArk returns the right context for a current decision, not whether it can retrieve a vaguely similar paragraph from a giant corpus.
| Task | What it checks | Result | Candidate nodes | Tokens |
|---|---|---|---|---|
| current_state_decay | Fresh approval and budget facts beat stale or wrong-scope context. | Passed; returned approval hit 8891 and 42000. | 6 | 16 |
| risk_recall | Risk context appears for a blocking-risk question. | Passed; returned quota risk without loading unrelated chunks. | 2 | 19 |
| progressive_l1_loading | Overview questions can use L1 summaries without loading raw chunks. | Passed; selected summary_l1 and avoided unnecessary L2 chunking. | 6 | 123 |
| resource_citation | Exact-detail questions load cited chunks only when needed. | Passed; returned approval 8891 and 50000 source details. | 6 | 160 |
| historical_compression | Old windows remain accessible through compressed history. | Passed; returned compressed_time_compress historical context. | 3 | 41 |
| bounded_no_ann_fanout | Scoped retrieval does not search every tenant record. | Passed; returned Project 1 context and rejected Project 9. | 6 | 54 |
Architecture comparison: before and after MatrixArk
This comparison is not a universal claim that every VectorDB, graph memory product, or filesystem-style memory layer is bad. It is a scoped-serving claim: for vertical AI, enterprise copilots, and Cursor-style workflows, the request usually arrives with tenant, user, session, project, ticket, account, object, or workflow scope. MatrixArk exploits that structure first instead of treating every prompt as a broad memory search. The before/after is architectural: fewer systems in the request path, no mandatory VectorDB, and no custom ingestion pipeline per product surface.
| Approach | Same models | Local tasks | Hot-path systems | ANN required | Local candidates | Native decay | Replay |
|---|---|---|---|---|---|---|---|
| Zep-style graph memory + retrieval | Reference | Not run | 2-3 | Often | Varies | Partial | Partial |
| Mem0-style memory API + vector/cache stack | Reference | Not run | 2-3 | Often | Varies | Partial | Partial |
| OpenViking-style filesystem + VectorDB + metadata store | Yes | 1/6 | 3 | Yes | 38 | No | No |
| VikingMem-style event/entity stack on separate infra | Yes | 2/6 | 4 | Yes | 46 | Yes | No |
| MatrixArk TemporalStore-first scoped serving | Yes | 6/6 | 1 | No | 6 | Yes | Yes |
The practical before/after
| Before | Why it gets expensive | MatrixArk after |
|---|---|---|
| Graph expansion plus semantic retrieval | Broad candidates are filtered late by app code. | Scope, time, validity, permissions, and status filter first; embeddings score only bounded candidates. |
| Filesystem hierarchy plus separate metadata and VectorDB | Readable for agents, but complex to serve with low latency. | Readable graph/tree paths compile into prefix hashes, indexes, compressed temporal state, and replayable packs. |
| Chunk everything into a VectorDB | Similarity can retrieve stale, unauthorized, or irrelevant-but-related chunks. | No VectorDB is required for scoped context; add ANN only for broad discovery across huge unscoped collections. |
| Per-app extraction, backfill, cache, and repair jobs | Every product team rebuilds the same ingestion and replay machinery. | One context ingestion API accepts raw events and hints, then compiles strict TemporalStore serving records. |
Why MatrixArk should be faster and easier to operate
The core performance difference is not a magic model. It is a smaller request-time plan. MatrixArk lets the customer-facing graph/tree stay readable, then compiles it into storage primitives that are cheap to serve.
Scope before search
Zep-style graphs and Mem0-style memory search can be powerful, but many production prompts already know the tenant, project, session, object, or workflow. MatrixArk narrows there first.
Tree without folder walking
OpenViking-style filesystem memory is intuitive. MatrixArk keeps the path, but serves prefix hashes, declared filters, and compressed temporal state instead of turning every prompt into a directory traversal.
Compression before recall
Old events for the same object can be evicted to storage while current summaries, validity windows, and replay refs stay online. That keeps prompts smaller and retrieval cheaper.
No complex ingestion
Apps send raw events, hints, sources, and feedback; MatrixArk compiles them into typed records, indexes, summaries, and audits.
MatrixArk's graph/tree is filesystem-like for navigation, but better for serving: it is typed, indexed, time-aware, compressed, replayable, permission-aware, and token-budgeted.
VikingMem paper score reference
VikingMem is the best published reference for this category, so the benchmark now carries the paper's LOCOMO and LongMemEval scores beside our local MatrixArk product gate. These are not the same benchmark: VikingMem reports public long-memory benchmark LLM-judge scores, while MatrixArk's current local run tests our scoped TemporalStore serving loop. The point is to compare against the right target and make the next benchmark step explicit.
| Benchmark | Judge model | VikingMem overall | Best reported baseline | Margin | VikingMem p50 / p95 |
|---|---|---|---|---|---|
| LOCOMO | GPT-4o-mini | 88.83 | Mirix 78.66 | +10.17 | 0.20s / 0.39s |
| LOCOMO | GPT-4.1-mini | 90.12 | Full-Context 86.36 | +3.76 | 0.20s / 0.39s |
| LongMemEval | GPT-4o-mini | 66.36 | Zep 63.21 | +3.15 | 0.25s / 0.89s |
| LongMemEval | GPT-4o | 75.80 | Zep 70.40 | +5.40 | 0.25s / 0.89s |
Source: VikingMem arXiv 2605.29640v2, Table 1. MatrixArk should use these numbers as the external score target, then run the same LOCOMO/LongMemEval harness now that the dataset adapter exists; the remaining step is official dataset execution plus judge-model automation.
LOCOMO and LongMemEval support added
The codebase now has a dataset-facing benchmark path for the same public benchmark families used by VikingMem. LOCOMO stresses long conversational memory across roughly 1,000+ messages per conversation. LongMemEval_s is much larger, with long timestamped histories and questions about multi-session reasoning and memory updates. MatrixArk now has the adapter layer needed to run those exports instead of only our six-task product gate.
Flexible loader
Reads JSON or JSONL exports with conversations, sessions, messages, turns, QA pairs, and category labels.
Temporal ingestion
Maps each timestamped turn into a lightweight dialogue ContextEvent under conversation and session scopes.
Category scoring
Reports single-hop, multi-hop, temporal, open-domain, knowledge-update, and multi-session accuracy.
Replayable results
Each question produces latency, prompt tokens, candidate-node counts, matched answers, and ContextPack replay refs.
PYTHONPATH=matrixark python3 matrixark/examples/memory_dataset_benchmark.py /path/to/locomo.json --name locomo --max-prompt-tokens 1800 --recall-mode tree_plus_embedding
PYTHONPATH=matrixark python3 matrixark/examples/memory_dataset_benchmark.py /path/to/longmemeval_s.jsonl --name longmemeval_s --max-prompt-tokens 1800 --recall-mode tree_plus_embedding
We should not publish MatrixArk LOCOMO or LongMemEval leaderboard claims until the official dataset files and judge protocol are run. The important implementation step is done: the runtime can now ingest multi-session benchmark histories, traverse them through TemporalStore-only tree-plus-embedding recall, and emit the measurements needed for an apples-to-apples VikingMem comparison.
Official LOCOMO run: completed, with honest baseline numbers
We have now run the official LOCOMO locomo10.json file through MatrixArk's
TemporalStore-only benchmark path. This is not yet the final LOCOMO LLM-judge QA score;
it is a retrieval/context-pack benchmark plus answer-substring check. The value is that the
full official dataset now runs end to end and exposes the next quality gaps clearly.
| Budget | Questions | Context hit | Answer hit | Evidence session | Evidence turn | P95 retrieval |
|---|---|---|---|---|---|---|
| 1,200 tokens | 1,986 | 26.74% | 12.13% | 20.38% | 12.41% | 17 ms |
| 4,000 tokens | 1,986 | 31.92% | 19.94% | 21.04% | 18.97% | 19 ms |
The benchmark pass also improved the runtime: native LOCOMO and LongMemEval parsers, wider benchmark candidate budgets, event metadata preservation for replay, semantic event reranking after TemporalStore tree/time/filter narrowing, auxiliary LOCOMO extraction from session summaries and observations, and official-style hypothesis JSONL output. The new gap-closure run reached 16.57% answer-containing context at a 1,200-token budget. A follow-up balanced source-packing run raised answer-containing context to 17.22%. Evidence-linked packing then raised full LOCOMO retrieval/context hit to 46.27% and evidence-session recall to 40.11% by pinning raw dialogue evidence next to selected extracted observations. The next benchmark gap is answer generation and official judge integration, not basic ingestion/retrieval plumbing.
Extraction and storage efficiency from the paper
The paper also shows why our ingestion pipeline should keep moving toward one-pass extraction, temporal compression, and compact serving records. Those are infrastructure wins, not only retrieval-score wins.
| Paper metric | Baseline | VikingMem | Improvement |
|---|---|---|---|
| One-pass extraction cost | $0.35 | $0.07 | 5.0x lower cost |
| One-pass extraction time | 11.02s | 7.42s | 1.5x faster |
| Storage retention | 100% raw-token baseline | 16.82% | 83.18% lower retained storage |
| Storage-efficiency score | 63.81 | 75.80 | +11.99 points while storing less |
Why no hot-path VectorDB wins here
The benchmark shows why the VectorDB should not be mandatory for MatrixArk's core path. The system does not brute-force every record. It starts at the scoped root, lists children, applies cheap filters and secondary indexes, scores summary embeddings exactly among bounded siblings, and only reads selected leaf timelines or resource chunks. Temporal compression keeps old history available without keeping every old raw event hot.
Filter before score
Tenant, team, project, event type, validity, status, authority, source, and time narrow each layer.
Exact over bounded candidates
L0/L1 embeddings are compact and attached to nodes, so traversal can brute-force score bounded siblings instead of relying on approximate ANN recall.
Use time as structure
Fresh raw events stay hot; old windows compress into replayable ContextCompressionEvents.
Spend tokens on evidence
The pack drops stale, wrong-scope, low-authority, and redundant items before prompt assembly, leaving more budget for useful context.
This is the quality argument: MatrixArk is not trying to retrieve the most chunks. It is trying to retrieve the most informative, current, permissioned context under a fixed token budget. Exact scoring over a small candidate set is both simpler and more accurate than approximate search over a broad pile.
Benchmark workflow
Mock tenant/team/project signals -> ingest approvals, budget, risk, resources, feedback, and confirmation -> extract compact MatrixArk internal schema -> write ContextNode, ContextChildRef, ContextEvent, ContextIndex -> generate summaries and embeddings in TemporalStore -> compress old windows -> retrieve with scoped tree traversal -> expand strongly filtered refs through TemporalStore secondary indexes -> apply temporal decay, stale blocking, and token budget -> write ContextPackAudit for replay
The important detail is that benchmark failures map to product behavior. If resource chunks do not appear, resource ingestion or pack construction is wrong. If stale facts leak into a current-state answer, temporal decay or stale blocking is wrong. If feedback does not affect the next query, feedback memory is wrong.
Run it locally
The deterministic path is the default because it is fast and repeatable. Use the OSS model path when you want local embedding and extraction model downloads.
cd /root/src/github-services/matrixarkai PYTHONPATH=matrixark python3 matrixark/examples/context_benchmark.py --max-prompt-tokens 240 --recall-mode tree_only
MATRIXARK_ALLOW_MODEL_DOWNLOAD=1 \ MATRIXARK_EMBEDDING_PROVIDER=sentence-transformers \ MATRIXARK_EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2 \ MATRIXARK_EXTRACTION_PROVIDER=oss-llm \ MATRIXARK_EXTRACTION_MODEL=google/flan-t5-small \ PYTHONPATH=matrixark python3 matrixark/examples/context_benchmark.py --max-prompt-tokens 240 --recall-mode tree_only
What this does not claim
A VectorDB can still be useful for broad discovery, cross-tenant offline exploration, or generic document search where there is no useful scope and no natural hierarchy. MatrixArk's claim is sharper: once the product is serving scoped, temporal, permissioned LLM context, TemporalStore is the better default because the serving problem is bounded before embedding similarity is applied.