Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
4744dfe
feat(extract): TS/JS member calls on local new-binding + typed-param …
safishamsi Jul 3, 2026
2ba07e8
fix(export): guard to_canvas against dangling community members (#123…
safishamsi Jul 3, 2026
e2ef4ef
fix: harden semantic extraction and kill phantom import edges (#1631,…
safishamsi Jul 4, 2026
53c769d
fix(apex): emit extends edges for interface multiple inheritance
Synvoya Jul 4, 2026
9b04022
fix(kotlin): emit implements edge for interface delegation (`by`)
Synvoya Jul 4, 2026
5737388
docs: changelog credit for #1645 (apex extends) and #1644 (kotlin by …
safishamsi Jul 4, 2026
13e2bdd
fix(ruby): extract module/Struct/Class.new containers and resolve con…
safishamsi Jul 4, 2026
29b3f91
release: 0.9.6
safishamsi Jul 4, 2026
983da3c
docs(readme): sync code-extension list with detect.py
safishamsi Jul 4, 2026
62b8eb1
fix(extract): gate JS/TS cross-file calls on import evidence to kill …
safishamsi Jul 4, 2026
f917494
fix(detect): incremental correctness for Office sources + long paths,…
safishamsi Jul 4, 2026
54825b6
fix: windows skill name, opencode plugin separator, doc-corpus report…
safishamsi Jul 4, 2026
9fea1a4
docs: add BENCHMARKS.md and link it from the README
safishamsi Jul 4, 2026
3140b2e
docs(readme): move star-history chart from top to bottom
safishamsi Jul 4, 2026
1288a55
fix(extract): don't cache zero-node results; warn on empty source fil…
safishamsi Jul 5, 2026
5ffa921
Fix invalid virtual postgres source_file URI backslashes on Windows (…
raman118 Jul 4, 2026
94392de
fix(extract): don't report deferred import() as a file cycle (#1241)
Synvoya Jul 5, 2026
aa1bbda
Fix case-sensitive file suffix filtering silently skipping capitalize…
raman118 Jul 4, 2026
d9f97b9
docs: changelog credit for #1671, #1672, #1241
safishamsi Jul 5, 2026
6631af7
feat(ruby/affected): mixes_in edges for include/extend/prepend + meth…
safishamsi Jul 5, 2026
21b52e1
docs(readme): new Graphify logo (cropped icon + wordmark)
safishamsi Jul 5, 2026
b06c55e
docs(readme): add graph.html hero image + benchmark table
safishamsi Jul 5, 2026
d7aafb0
docs(readme): collapse platform picker and optional extras into <deta…
safishamsi Jul 5, 2026
2ab0867
fix(extract): route extensionless shebang scripts to their AST extractor
Stashub Jul 5, 2026
5cfd7d9
docs: changelog credit for #1683
safishamsi Jul 5, 2026
6d3a6f1
feat: extract rationale comments + ADR/RFC doc references from JS/TS
niltonmourafilho-arch Jul 1, 2026
a4d4533
docs: changelog credit for #1599
safishamsi Jul 5, 2026
7d463c9
feat: add `pascal` optional extra for tree-sitter-pascal
vinicius-l-machado Jul 2, 2026
f2b81a9
docs: changelog credit for #1616
safishamsi Jul 5, 2026
92edf78
feat(java): suppress java stdlib types from references edges (#1603)
NydiaChung Jul 6, 2026
dd8c24c
docs: add .claudeignore tip for prompt cache (#1539); changelog for #…
guyoron1 Jul 6, 2026
b699182
release: 0.9.7
safishamsi Jul 6, 2026
31211a0
docs(readme): visual overhaul (hero, capability table, query demo, ho…
safishamsi Jul 6, 2026
74a1457
feat(skill): Sigma.js viz fallback + batched community-label reconcil…
docwilde Jul 6, 2026
97a1371
Fix: exact-match section heading in _replace_or_append_section to pre…
safishamsi Jul 6, 2026
0ff584f
Fix: tolerate tiktoken special-token text in token estimation (#1685)
safishamsi Jul 6, 2026
b78248f
Fix: cap Ollama client-side retries so a hung request cannot multiply…
safishamsi Jul 6, 2026
21b851b
Fix: salvage truncated labeling replies and account for labeling toke…
safishamsi Jul 6, 2026
ad2c5ea
Merge branch 'v8' into feat/sigma-viz-batched-community-labels
docwilde Jul 6, 2026
4a99c71
fix(skill): sigma.js sizing bug, content-kind icons, module color, fi…
docwilde Jul 6, 2026
7590ff5
Merge remote-tracking branch 'origin/feat/sigma-viz-batched-community…
docwilde Jul 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
187 changes: 187 additions & 0 deletions BENCHMARKS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
# graphify Benchmarks

How graphify performs as conversational long-term memory and as a
code-intelligence layer, measured on an open harness with competing systems run
under identical conditions (same model, same budgets, same grader).

Last updated: 2026-07-05.

## Summary

graphify's deterministic graph plus hybrid retrieval has the best retrieval
recall on LOCOMO of any system tested, the best LOCOMO QA accuracy per dollar,
ties for the best LongMemEval score, and builds its index with zero LLM credits.
Every system was run on the same harness with one shared model (Kimi K2.6),
identical budgets, and a judge blind-validated against a second independent judge
(90.6% agreement, Cohen's kappa 0.81).

Highlights:
- LOCOMO retrieval recall@10 of 0.497, about 10x mem0 (0.048) and above BM25 (0.362).
- LOCOMO QA accuracy of 45.3%: +18 points over mem0, +14 over BM25, and within
4.4 points of supermemory at about a tenth of supermemory's ingest cost.
- LongMemEval-S of 76%, tied for best with dense RAG.
- Zero LLM credits to build the graph, and about 11x cheaper memory ingest than
supermemory ($1.40 vs $15.67).

## Results at a glance

| Suite | Dataset (n) | Metric | graphify | Field |
|---|---|---|---|---|
| Memory | LOCOMO (300) | QA accuracy | 45.3% | supermemory 49.7% (11x ingest cost), bm25 31.3%, mem0 27.3% |
| Memory | LOCOMO (300) | recall@10 | 0.497 | bm25 0.362, mem0 0.048 |
| Memory | LongMemEval-S (50) | QA accuracy | 76% | dense RAG 76%, hybrid 74%, mem0 70% |
| Cost | LOCOMO ingest | USD | ~$1.40 | supermemory $15.67, mem0 $3.48 |
| Cost | graph build | LLM credits | $0 | n/a |

## Harness

graphify's own harness. Competing systems (mem0, supermemory) are run as
adapters inside it, so every system sees the same model, token budget, and
grader.

```
ingest -> index -> search -> answer -> grade
(build) (store) (retrieve) (Kimi K2.6) (key-fact coverage)
```

- Memory suite (`memory/`): graphify's graph retrieval vs dedicated memory
systems (mem0, supermemory) and classic baselines (BM25, dense RAG,
hybrid RRF). mem0 and supermemory run self-hosted as adapters, wired through
a proxy so their LLM calls also use Kimi K2.6.
- Code suite (`crosstool/`): a fixed coding agent (Claude Opus 4.8, at most 14
turns, a grep/read/list floor plus one code-intelligence tool) answers graded
questions on ERPNext, a roughly 1M-LOC production repo
([frappe/erpnext](https://github.com/frappe/erpnext)), with a temporal
sub-suite of 689 weekly AST checkpoints from 2011 to 2026.

## Datasets

- LOCOMO (`locomo10.json`, n=300): multi-session conversational QA.
- LongMemEval-S (n=50, English subset): long-horizon conversational memory.
- ERPNext: a large real-world Python codebase for code intelligence.

LOCOMO and LongMemEval are the same academic datasets other memory systems
report on, so results are cross-referenceable. Datasets are not redistributed;
the harness documents the expected local layout.

## Judge and grading

Answers are graded by Kimi K2.6 against a gold set of atomic key facts a correct
answer must contain:

```
coverage = (covered + 0.5 * partial) / total
```

Every verdict cites a verbatim quote from the answer, so grades are auditable
rather than one opaque score.

Judge validation: the judge was blind-validated against a second, independent
judge on a sampled set at 90.6% agreement, Cohen's kappa 0.81 (substantial
agreement). Most published memory benchmarks disclose no judge validation at
all; we publish ours so the grading itself can be audited.

## Fairness rules

- One model for every LLM role: Kimi K2.6 via Moonshot.
- One shared local embedder where the system allows it: BGE-m3 (1024-d,
multilingual).
- Identical token budgets. Every run writes a spend ledger and respects
`--max-spend`.
- Graphs build AST-only with no LLM (an unset API key produces zero credits);
embeddings use a local deterministic model.

## Results: conversational memory

### LOCOMO (n=300)

Sorted by recall@10.

| System | QA accuracy | recall@10 | Ingest cost |
|---|---|---|---|
| **graphify** (graph-expand) | **45.3%** | **0.497** | ~$1.40 |
| hybrid RRF | 43.3% | 0.493 | $0 (shared index) |
| graphify (SurrealDB engine) | 43.3% | 0.485 | $0 (shared index) |
| dense RAG | 41.3% | 0.439 | $0 (shared index) |
| BM25 | 31.3% | 0.362 | $0 (shared index) |
| supermemory | 49.7% | 0.149* | $15.67 |
| mem0 | 27.3% | 0.048 | $3.48 |

Bold marks graphify's primary configuration, not the column maximum. Baselines
retrieve from the same harness-built index, so they incur no separate ingest
cost.

`*` Retrieval-recall is embedder-confounded: supermemory's self-host locks in
its own 768-d English-only embedder rather than the shared BGE-m3. The
QA-accuracy axis (a shared Kimi reader and judge over each system's hits) is the
clean comparison.

Reading: supermemory scores a few points higher on raw QA, but at about 11x the
ingest cost ($15.67 vs $1.40) and with about 3x worse retrieval recall. graphify
has the best retrieval recall on LOCOMO of any system tested, the best QA of the
systems on the shared embedder, and does it for about a tenth of supermemory's
cost. It retrieves the right memory about 10x more often than mem0 and answers
+18 points more accurately. A seed-only ablation (no graph expansion) still
scores 42.7% at $1.40 ingest, so most of the accuracy holds at the cheapest
setting.

### LongMemEval-S (n=50)

| System | QA accuracy | recall@10 |
|---|---|---|
| **graphify** (graph-expand) | **76%** | **0.844** |
| dense RAG | 76% | 0.848 |
| graphify (SurrealDB engine) | 74% | 0.833 |
| hybrid RRF | 74% | 0.822 |
| BM25 | 70% | 0.710 |
| mem0 | 70% | 0.344 |

graphify ties dense RAG for the best QA accuracy (76%); dense RAG edges it on
recall (0.848 vs 0.844). Both retrieve far more than mem0 (recall 0.344).

## Results: code intelligence

On ERPNext (a roughly 1M-LOC production repo), giving a fixed coding agent one
graphify tool lifts key-fact coverage across the graded question set (n=6) from
70.8% (a grep and read baseline) to 82.0%, at about 140K tokens per query.
graphify pays for itself in accuracy against searching raw files, and avoids the
context-stuffing anti-pattern of packing the whole repo into every turn (which
costs roughly 20x the tokens for lower coverage).

## Results: temporal (15 years of ERPNext)

689 weekly AST checkpoints, 2011 to 2026, built deterministically with no LLM.

| Checkpoint | Nodes | Edges | Files |
|---|---|---|---|
| 2011-06-08 | 3,069 | 2,900 | 1,032 |
| 2026-06-24 | 22,620 | 48,710 | 3,758 |

The graph grows about 7x in nodes and 17x in edges across the span. As the
codebase grows, plain lexical retrieval finds less of the answer while graph and
semantic retrieval scale with it, and the AST extraction itself stays stable.

## Cost and token economics

- Graph construction costs zero LLM credits. graphify extracts with tree-sitter
(deterministic, about 40 languages) and a local embedder, so building the
index uses no API tokens. Most memory and semantic-retrieval systems pay a
per-document LLM ingest cost.
- Memory ingest is about 11x cheaper: graphify's LOCOMO ingest runs around
$1.40 against supermemory's $15.67.
- Every number here is backed by a per-run spend ledger in the harness output.

## Reproducing

Set `MOONSHOT_API_KEY`. Datasets are fetched to the local layout documented in
the harness. Each run respects `--max-spend` and writes a spend ledger.

```bash
# Memory (LOCOMO). This invokes the SurrealDB-engine row (43.3%); the
# graph-expand headline (45.3%) is a separate adapter in the same harness.
python memory/runner.py --phase 3 --split locomo --n 300 \
--adapters graphify_v1_surreal --cn natural --workers 6 --max-spend 15

# Code cross-tool (ERPNext)
python crosstool/run.py --repo erpnext --max-spend <budget>
```
Loading