yichuan-w /LEANN

[MLsys2026 Best Paper]: https://arxiv.org/abs/2506.08276. RAG on Everything with LEANN. Enjoy 97% storage savings while running a fast, accurate, and 100% private RAG application on your personal device.

★ 13,762⑂ 1,282👁 78⑃ 184● 109▤ 31
PythonCreated 2025-06-09arxiv.org/abs/2506.08276
13,762
stars
+0+6+746
1,282
forks
78
watchers
184
prs
109
issues
31
releases
–
discussions

README

We track zero telemetry. This survey is the ONLY way to tell us if you want 
    GPU Acceleration or More Integrations next.
    👉 Click here to cast your vote (2 mins)
  



  💬 Join our Slack community!
  
    We'd love for you to be part of the LEANN community!
    👉 Join LEANN Slack
    If the invite link has expired or you have trouble joining, please open an issue and we'll help you get in!
  



    The smallest vector index in the world. RAG Everything with LEANN!


LEANN is an innovative vector database that democratizes personal AI. Transform your laptop into a powerful RAG system that can index and search through millions of documents while using 97% less storage than traditional solutions without accuracy loss.


LEANN achieves this through graph-based selective recomputation with high-degree preserving pruning, computing embeddings on-demand instead of storing them all. Illustration Fig → | Paper →

Ready to RAG Everything? Transform your laptop into a personal AI assistant that can semantic search your file system, emails, browser history, chat history (WeChat, iMessage), agent memory (ChatGPT, Claude), live data (Slack, Twitter), codebase\, or external knowledge bases (i.e., 60M documents) - all on your laptop, with zero cloud costs and complete privacy.


\ Claude Code only supports basic grep-style keyword search. LEANN is a drop-in semantic search MCP service fully compatible with Claude Code, unlocking intelligent retrieval without changing your workflow. 🔥 Check out the easy setup →



 Why LEANN?


  


 The numbers speak for themselves: Index 60 million text chunks in just 6GB instead of 201GB. From emails to browser history, everything fits on your laptop. See detailed benchmarks for different applications below ↓


🔒 Privacy: Your data never leaves your laptop. No OpenAI, no cloud, no "terms of service".

🪶 Lightweight: Graph-based recomputation eliminates heavy embedding storage, while smart graph pruning and CSR format minimize graph storage overhead. Always less storage, less memory usage!

📦 Portable: Transfer your entire knowledge base between devices (even with others) with minimal cost - your personal AI memory travels with you.

📈 Scalability: Handle messy personal data that would crash traditional vector DBs, easily managing your growing personalized data and agent generated memory!

✨ No Accuracy Loss: Maintain the same search quality as heavyweight solutions while using 97% less storage.

 Making Your Coding Agent Smarter

We plugged LEANN into Claude Code and compared it with BM25 on 30 SWE-Bench Pro tasks from ContextBench, keeping the model, agent, tools, and 8,192-token retrieval budget fixed.


  


With LEANN, the agent achieved 2.1× the initial relevant-code recall (24.2% vs. 11.4%), reached 12.6 percentage points higher relevant-code coverage after exploration (38.4% vs. 25.8%), and used 8.4% fewer tokens (3.22M vs. 3.51M).

LEANN surfaces relevant code earlier, so coding agents can spend more of their c

Snapshot: 2026-11-04T14:00:00Z · Data license Apache-2.0 · JSON