Witchcraft, fast local semantic search on top of SQLite [P]
Summary
Dropbox has released Witchcraft, an open-source, Rust-based re-implementation of Stanford's XTR-Warp semantic search engine. Designed for client-side deployment, Witchcraft utilizes a single-file SQLite database for storage, eliminating the need for API keys, external vector databases, or complex chunking strategies. It achieves a p.95 end-to-end search latency of 20ms on the NFCorpus dataset with 33% NDCG@10 on an Apple Macbook Pro M2 Max, demonstrating over twice the speed of the original XTR-WARP on server-class hardware while maintaining similar accuracy. The project also includes Pickbrain, a CLI tool for indexing Claude Code and OpenAI Codex session transcripts, memory files, and documents, enabling fast semantic search and session resumption.
Key takeaway
For NLP Engineers and AI Architects building local-first applications or seeking to enhance developer productivity, Witchcraft offers a compelling solution for fast, client-side semantic search. You can integrate Pickbrain to index and retrieve past AI agent interactions, significantly improving context management and session continuity without relying on external APIs or vector databases. Consider adopting this for projects requiring high-performance, privacy-preserving local search capabilities.
Key insights
Witchcraft provides fast, local, and self-contained semantic search using SQLite, ideal for client-side applications.
Principles
- Local-first design enhances privacy and speed.
- Single-file databases simplify deployment.
- Rust ensures memory safety and performance.
Method
Witchcraft re-implements XTR-Warp in Rust, using SQLite for backing storage to enable client-side, stand-alone semantic search without external dependencies.
In practice
- Index AI agent sessions for quick recall.
- Integrate /pickbrain skill for global memory.
- Deploy semantic search without cloud services.
Topics
- Witchcraft
- Semantic Search
- SQLite
- Rust
- Pickbrain
Code references
Best for: NLP Engineer, AI Architect, AI Engineer, Machine Learning Engineer, Prompt Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Machine Learning.