qmd
July 1, 2026 · View on GitHub
qmd is a local search engine for markdown files, recommended in the Karpathy gist as the tool to reach for when a bundle outgrows what index files can handle for navigation.
What it is
- Hybrid retrieval — BM25 keyword search plus vector similarity, with LLM re-ranking.
- On-device — runs locally; no data leaves the machine.
- Two interfaces — a CLI (an agent can shell out to it) and an MCP server (an agent can call it as a native tool).
When to use it in the LLM Wiki pattern
At small-to-moderate scale, the index file plus progressive disclosure is enough — do not add search prematurely. As the bundle grows to many hundreds or thousands of concepts, a search tool becomes the efficient way for the query operation to find candidate pages before reading them. Note the retrieved unit is still a synthesized concept, not a raw chunk — this is search over the wiki, not RAG over raw sources.