tobi/qmd
mini cli search engine for your docs, knowledge bases, meeting notes, whatever. Tracking current sota approaches while being all local
What it solves
QMD (Query Markup Documents) provides a fully local, on-device search engine for personal knowledge bases, markdown notes, and documentation. It solves the problem of finding specific information across fragmented local files by combining multiple search strategies and LLM-powered refinement, ensuring high-quality results without sending data to the cloud.
How it works
QMD indexes local directories (collections) and employs a hybrid search pipeline:
- Query Expansion: An LLM generates variations of the user's query to improve recall.
- Parallel Retrieval: It simultaneously performs BM25 full-text search (keyword) and vector semantic search (embeddings) using local GGUF models via
node-llama-cpp. - Fusion: Results are combined using Reciprocal Rank Fusion (RRF) with a top-rank bonus to preserve exact matches.
- Re-ranking: A local LLM reranker scores the top candidates to refine the final order.
- Contextualization: Users can add descriptive metadata to paths, which helps LLMs make better contextual choices when selecting documents.
Who it’s for
- Knowledge Workers: People with large collections of markdown notes or meeting transcripts who need a fast, private way to search them.
- AI Agent Developers: Developers building agentic workflows that need a reliable tool for retrieving local context (supported via CLI, SDK, and MCP server).
- Privacy-Conscious Users: Anyone who wants LLM-powered search capabilities without using external APIs.
Highlights
- Local-First: All embeddings, reranking, and query expansion happen on-device using GGUF models.
- Hybrid Search: Combines keyword (BM25) and semantic (vector) search for balanced precision and recall.
- Agent-Ready: Includes a Model Context Protocol (MCP) server and a Node.js/Bun SDK for easy integration into AI agents.
- Contextual Metadata: Allows adding tree-based context to collections to improve retrieval accuracy.
- Flexible Retrieval: Supports retrieving documents by path, docid, or glob patterns with line-range controls.
Related
- Project
- Project
- Project
- Project
- Project