QMD: Local semantic search saves coding agents up to 55% of search tokens
ievkz · reddit · 2026-11-16
A Reddit user observed that coding agents burn lots of tokens running find, rg --files, and grep before every task, and tested whether local semantic search could replace that — cutting token usage by up to 55%.
The setup uses the open-source QMD (Query Markup Documents) CLI with three search modes: fast keyword, semantic, and hybrid + reranking (best quality), powered by three small local models: embeddinggemma-300M for embeddings, qwen3-reranker-0.6b for reranking, and qmd-query-expansion-1.7B for query expansion.
Workflow: add files via qmd collection add (or let your agent configure it), index with qmd update && qmd embed, and add tool-selection rules to AGENTS.md: read files directly when the path is known, use rg/LSP for known identifiers, and use qmd query when only the behavior is known.
Key rules: QMD replaces the initial broad search rather than adding a step; use specific English technical queries; read only relevant sections of the top 3–5 files; refine the query or raise -n to 60 before falling back to rg/LSP. Small projects may not benefit as much.
More from coding & agent
- ICL alone may enable substantial continual learning, plot shows agents improve by Month 3 — xennygrimmato_ · 2026-11-16
- Solo dev ships products daily with a Claude + Codex pipeline, 35k users — cneuralnetwork · 2026-11-16
- QMD: Local semantic search saves coding agents up to 55% of search tokens — ievkz · 2026-11-16
- Kids Build Games and Make Robots Sing at AGNTCon Kids Day with goose AI — steveonjava · 2026-11-16
- Anthropic Academy offers 13 free Claude courses, all with certificates — nikola_mr64990 · 2026-11-16
- Apple's Xcode 27.3 beta adds GitHub Copilot support and in-app Siri AI testing — iamfakhrealam · 2026-11-16