Skip to content

Commit b4a4af6

Browse files
docs: refresh README top section
- Sharper tagline and one-liner — leads with what Distill does, not implementation details - Updated ASCII diagram to show the four stages - Tightened problem statement - How It Works table now covers all four stages including cache - Pipeline section unchanged, just minor wording cleanup Co-authored-by: Ona <no-reply@ona.com>
1 parent 9c55236 commit b4a4af6

1 file changed

Lines changed: 27 additions & 27 deletions

File tree

README.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,56 +8,56 @@
88

99
[![Build with Ona](https://ona.com/build-with-ona.svg)](https://app.ona.com/#https://github.com/siddhant-k-code/distill)
1010

11-
**Context intelligence layer for AI agents.**
11+
**Open-source context preprocessing for LLM applications.**
1212

13-
Deduplicates, compresses, and manages context across sessions - so your agents produce reliable, deterministic outputs. Includes a dedup pipeline with ~12ms overhead and persistent context memory with write-time dedup and hierarchical decay.
13+
Distill sits between your application and any LLM. It cleans up context before it's sent — deduplicating semantically redundant chunks, compressing conversation history as it ages, and placing cache markers on stable content so Anthropic's prompt cache actually fires.
1414

15-
Less redundant data. Lower costs. Faster responses. Deterministic results.
15+
The result: fewer tokens sent, lower cost per request, and context windows that don't fill up with noise.
1616

1717
**[Learn more →](https://distill.siddhantkhare.com)**
1818

19-
> 📖 Distill implements the 4-layer context engineering stack (Cluster → Select → Rerank → Compress) described in **[The Agentic Engineering Guide](https://agents.siddhantkhare.com/05-context-engineering-stack/)** — a free, open book on AI agent infrastructure.
19+
> 📖 Distill implements the 4-layer context engineering stack described in **[The Agentic Engineering Guide](https://agents.siddhantkhare.com/05-context-engineering-stack/)** — a free, open book on AI agent infrastructure.
2020
2121
```
22-
Context sources → Distill → LLM
23-
(RAG, tools, memory, docs) (reliable outputs)
22+
RAG / tools / memory / docs
23+
24+
Distill
25+
(dedupe · compress · cache)
26+
27+
LLM
2428
```
2529

2630
## The Problem
2731

28-
LLM outputs are unreliable because context is polluted. "Garbage in, garbage out."
32+
30–40% of context assembled from multiple sources is semantically redundant. The same information arrives from docs, code, memory, and tool outputs — competing for attention in the same prompt.
2933

30-
30-40% of context assembled from multiple sources is semantically redundant. Same information from docs, code, memory, and tools competing for attention. This leads to:
31-
32-
- **Non-deterministic outputs** - Same workflow, different results
33-
- **Confused reasoning** - Signal diluted by repetition
34-
- **Production failures** - Works in demos, breaks at scale
35-
36-
You can't fix unreliable outputs with better prompts. You need to fix the context that goes in.
34+
This causes non-deterministic outputs, confused reasoning, and failures that only show up at scale. Better prompts don't fix it. The context going in needs to be clean.
3735

3836
## How It Works
3937

40-
Math, not magic. No LLM calls. Fully deterministic.
38+
No LLM calls. Fully deterministic. ~12ms overhead.
39+
40+
| Stage | What it does |
41+
|-------|-------------|
42+
| **Deduplicate** | Cluster semantically similar chunks, keep one representative per cluster |
43+
| **Compress** | Extractive compression — remove noise, preserve signal |
44+
| **Summarize** | Progressively condense conversation history as turns age |
45+
| **Cache** | Annotate stable prefixes with `cache_control`, track TTL per prefix |
4146

42-
| Step | What it does | Benefit |
43-
|------|--------------|---------|
44-
| **Deduplicate** | Remove redundant information across sources | More reliable outputs |
45-
| **Compress** | Keep what matters, remove the noise | Lower token costs |
46-
| **Summarize** | Condense older context intelligently | Longer sessions |
47-
| **Cache** | Instant retrieval for repeated patterns | Faster responses |
47+
All four stages chain together via `POST /v1/pipeline` or `distill pipeline` CLI.
4848

49-
### Pipeline
49+
### Dedup pipeline
5050

5151
```
5252
Query → Over-fetch (50) → Cluster → Select → MMR Re-rank (8) → LLM
5353
```
5454

55-
1. **Over-fetch** - Retrieve 3-5x more chunks than needed
56-
2. **Cluster** - Group semantically similar chunks (agglomerative clustering)
57-
3. **Select** - Pick best representative from each cluster
58-
4. **MMR Re-rank** - Balance relevance and diversity
55+
1. **Over-fetch** — retrieve 3–5× more chunks than needed
56+
2. **Cluster** — group semantically similar chunks (agglomerative clustering)
57+
3. **Select** — pick the best representative from each cluster
58+
4. **MMR Re-rank** — balance relevance and diversity
5959

60-
**Result:** Deterministic, diverse context in ~12ms. No LLM calls. Fully auditable.
60+
**Result:** Deterministic, diverse context. No LLM calls. Fully auditable.
6161

6262
## Installation
6363

0 commit comments

Comments
 (0)