Skip to content

Commit e8c11f8

Browse files
moved sections
moved section
1 parent 81e0b86 commit e8c11f8

1 file changed

Lines changed: 68 additions & 67 deletions

File tree

‎README.md‎

Lines changed: 68 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,74 @@ https://discord.com/invite/Wfr2ejBmY
2727
> **Support continued Engraphis development with Pro.** [Start a 3-day Pro trial](https://api.engraphis.com/account?plan=pro&interval=monthly&utm_source=engraphis&utm_medium=docs&utm_campaign=pro_conversion&utm_content=readme_intro&trial=pro#billing)
2828
> or [subscribe to Pro](https://api.engraphis.com/account?plan=pro&interval=monthly&utm_source=engraphis&utm_medium=docs&utm_campaign=pro_conversion&utm_content=readme_intro#billing).
2929
30+
---
31+
32+
## Measured token and context savings
33+
34+
<p align="center">
35+
<img src="docs/images/context-efficiency.png" alt="Dark chart showing Engraphis using 98.21 percent less long-history context, 73.0 percent less retrieved content per question, 73.9 percent fewer tokens in the smallest useful memory, a 55.38 percent smaller memory response, and 47.8 percent less repeated-memory context after consolidation" width="100%">
36+
<br>
37+
<sup>Less repeated history means more room for the task, tools, and useful evidence.</sup>
38+
</p>
39+
40+
<details>
41+
<summary>See benchmark details and reproduce the results</summary>
42+
43+
### Controlled before-and-after example
44+
45+
| Retrieval mode | Mean returned memory content | Recall@5 |
46+
|---|---:|---:|
47+
| Whole documents | 808.8 tokens | 1.000 |
48+
| Engraphis structure-aware chunks | 218.4 tokens | 1.000 |
49+
50+
The chunked mode returns the relevant passage instead of the whole document: **590.4 fewer tokens
51+
per question**. Under the same model-context budget, that leaves roughly **590 tokens** for task
52+
instructions or other relevant evidence.
53+
54+
### Measurement details and reproducibility
55+
56+
The table below records every current token/context efficiency measurement and its counting
57+
boundary.
58+
59+
| What is counted | Comparison | Measured reduction | Quality held constant |
60+
|---|---|---|---|
61+
| Cumulative reader context across a 1,986-question LoCoMo diagnostic | Full-history replay: **49,915,394** tokens → Engraphis: **891,857** tokens | **49,023,537 fewer context tokens** (**98.2133% lower**) | Focused retrieval used far less context; uncapped full history retained higher retrieval recall |
62+
| Retrieved top-5 memory content, averaged per question | Whole documents: **808.8** tokens → structure-aware chunks: **218.4** tokens | **590.4 fewer tokens per question** (**73.0% lower**, about **3.7× smaller**) | Recall@5 **1.000** in both modes across 6 documents and 18 questions |
63+
| Smallest returned memory that contains the reference evidence | Whole documents: **162.2** tokens → chunks: **42.4** tokens | **119.8 fewer tokens to evidence** (**73.9% lower**, about **3.8× smaller**) | The same 18 questions had a returned evidence-holding memory in both modes |
64+
| Serialized MCP recall response across 260 timed CodeMem recalls | Full result: **17,172** `engraphis.regex.v1` tokens → compact result: **7,663** tokens | **9,509 response tokens avoided** (**55.38% lower**) | Recall@5, hit@5, and answer-token recall all **1.000** |
65+
| Repeated-memory consolidation fixture | 12 related episodic memories: **230** tokens → one digest: **120** tokens | **110 tokens removed from the active digest** (**47.8% lower**) | Original memories remain available for provenance and audit |
66+
| Packed prompt-context usage in the same CodeMem performance fixture | Hard budget: **1,500** tokens; observed mean: **87.73**; observed maximum: **106** | A hard cap prevents a recall from exceeding its configured context budget | This is usage accounting, not a before/after savings comparison |
67+
68+
The compact MCP response avoids duplicating full memory bodies when the packed context and source
69+
list are enough. That can reduce what an agent must inspect or pass onward, but the fixtures do
70+
**not** measure model-provider charges, end-to-end task time, or customer cost savings.
71+
72+
The measures are deliberately separate and **must not be added together**: chunking counts the
73+
content of retrieved memory records before `ContextPacker`, whereas compact recall counts the
74+
serialized MCP response returned to a client. “Tokens to evidence” is the size of the smallest
75+
retrieved memory record holding the reference evidence; it is not latency or end-to-end answer
76+
accuracy. Chunking creates more focused stored records (24 chunks rather than 6 whole-document
77+
memories in this fixture), so this is a context-efficiency result, not a storage-reduction claim.
78+
79+
Reproduce the quality and token/context measurements without a network connection or API key:
80+
81+
```bash
82+
python -m eval.harness --dataset eval/datasets/codemem.jsonl --k 5
83+
python -m eval.grounded
84+
python -m eval.chunking_eval
85+
python -m eval.performance --dataset eval/datasets/codemem.jsonl --k 5 --iterations 10 --json
86+
```
87+
88+
These are small deterministic correctness and efficiency fixtures, not official LoCoMo /
89+
LongMemEval QA scores or a third-party leaderboard result. Compact-response counts use the exact
90+
`engraphis.regex.v1` counter; the chunking evaluation uses its documented deterministic
91+
normalized-character estimator. Chunking measures retrieved memory content, while compact recall
92+
measures serialized MCP response size. See [`BENCHMARKS.md`](BENCHMARKS.md) for definitions,
93+
limitations, canonical external-evaluation requirements, and the no-unsupported-claims policy.
94+
95+
</details>
96+
97+
---
3098

3199
## What Engraphis gives an agent
32100

@@ -130,73 +198,6 @@ chunking. The activity view records outcomes, never keys, prompts, or raw provid
130198
131199
---
132200

133-
## Measured token and context savings
134-
135-
<p align="center">
136-
<img src="docs/images/context-efficiency.png" alt="Dark chart showing Engraphis using 98.21 percent less long-history context, 73.0 percent less retrieved content per question, 73.9 percent fewer tokens in the smallest useful memory, a 55.38 percent smaller memory response, and 47.8 percent less repeated-memory context after consolidation" width="100%">
137-
<br>
138-
<sup>Less repeated history means more room for the task, tools, and useful evidence.</sup>
139-
</p>
140-
141-
<details>
142-
<summary>See benchmark details and reproduce the results</summary>
143-
144-
### Controlled before-and-after example
145-
146-
| Retrieval mode | Mean returned memory content | Recall@5 |
147-
|---|---:|---:|
148-
| Whole documents | 808.8 tokens | 1.000 |
149-
| Engraphis structure-aware chunks | 218.4 tokens | 1.000 |
150-
151-
The chunked mode returns the relevant passage instead of the whole document: **590.4 fewer tokens
152-
per question**. Under the same model-context budget, that leaves roughly **590 tokens** for task
153-
instructions or other relevant evidence.
154-
155-
### Measurement details and reproducibility
156-
157-
The table below records every current token/context efficiency measurement and its counting
158-
boundary.
159-
160-
| What is counted | Comparison | Measured reduction | Quality held constant |
161-
|---|---|---|---|
162-
| Cumulative reader context across a 1,986-question LoCoMo diagnostic | Full-history replay: **49,915,394** tokens → Engraphis: **891,857** tokens | **49,023,537 fewer context tokens** (**98.2133% lower**) | Focused retrieval used far less context; uncapped full history retained higher retrieval recall |
163-
| Retrieved top-5 memory content, averaged per question | Whole documents: **808.8** tokens → structure-aware chunks: **218.4** tokens | **590.4 fewer tokens per question** (**73.0% lower**, about **3.7× smaller**) | Recall@5 **1.000** in both modes across 6 documents and 18 questions |
164-
| Smallest returned memory that contains the reference evidence | Whole documents: **162.2** tokens → chunks: **42.4** tokens | **119.8 fewer tokens to evidence** (**73.9% lower**, about **3.8× smaller**) | The same 18 questions had a returned evidence-holding memory in both modes |
165-
| Serialized MCP recall response across 260 timed CodeMem recalls | Full result: **17,172** `engraphis.regex.v1` tokens → compact result: **7,663** tokens | **9,509 response tokens avoided** (**55.38% lower**) | Recall@5, hit@5, and answer-token recall all **1.000** |
166-
| Repeated-memory consolidation fixture | 12 related episodic memories: **230** tokens → one digest: **120** tokens | **110 tokens removed from the active digest** (**47.8% lower**) | Original memories remain available for provenance and audit |
167-
| Packed prompt-context usage in the same CodeMem performance fixture | Hard budget: **1,500** tokens; observed mean: **87.73**; observed maximum: **106** | A hard cap prevents a recall from exceeding its configured context budget | This is usage accounting, not a before/after savings comparison |
168-
169-
The compact MCP response avoids duplicating full memory bodies when the packed context and source
170-
list are enough. That can reduce what an agent must inspect or pass onward, but the fixtures do
171-
**not** measure model-provider charges, end-to-end task time, or customer cost savings.
172-
173-
The measures are deliberately separate and **must not be added together**: chunking counts the
174-
content of retrieved memory records before `ContextPacker`, whereas compact recall counts the
175-
serialized MCP response returned to a client. “Tokens to evidence” is the size of the smallest
176-
retrieved memory record holding the reference evidence; it is not latency or end-to-end answer
177-
accuracy. Chunking creates more focused stored records (24 chunks rather than 6 whole-document
178-
memories in this fixture), so this is a context-efficiency result, not a storage-reduction claim.
179-
180-
Reproduce the quality and token/context measurements without a network connection or API key:
181-
182-
```bash
183-
python -m eval.harness --dataset eval/datasets/codemem.jsonl --k 5
184-
python -m eval.grounded
185-
python -m eval.chunking_eval
186-
python -m eval.performance --dataset eval/datasets/codemem.jsonl --k 5 --iterations 10 --json
187-
```
188-
189-
These are small deterministic correctness and efficiency fixtures, not official LoCoMo /
190-
LongMemEval QA scores or a third-party leaderboard result. Compact-response counts use the exact
191-
`engraphis.regex.v1` counter; the chunking evaluation uses its documented deterministic
192-
normalized-character estimator. Chunking measures retrieved memory content, while compact recall
193-
measures serialized MCP response size. See [`BENCHMARKS.md`](BENCHMARKS.md) for definitions,
194-
limitations, canonical external-evaluation requirements, and the no-unsupported-claims policy.
195-
196-
</details>
197-
198-
---
199-
200201
## Install
201202

202203
```bash

0 commit comments

Comments
 (0)