<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Markdown on Home</title><link>/tags/markdown/</link><description>Recent content in Markdown on Home</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sat, 27 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="/tags/markdown/" rel="self" type="application/rss+xml"/><item><title>qmd: Semantic search accross Markdown notes</title><link>/2026/qmd-semantic-search-accross-markdown-notes/</link><pubDate>Sat, 27 Jun 2026 00:00:00 +0000</pubDate><guid>/2026/qmd-semantic-search-accross-markdown-notes/</guid><description>&lt;figure&gt;&lt;img src="/images/posts/post_31/overview.png"data-src="/images/posts/post_31/overview.png"
/&gt;&lt;figcaption&gt;
&lt;h4&gt;QMD Architecture: Local Execution, Hybrid Search Pipeline, and LLM Reranking - AI generated&lt;/h4&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;I have been using Obsidian for several years. What started as a place for personal notes gradually grew into something larger: bookmarks saved as Markdown files, project notes, research output, and increasingly, a knowledge base maintained and organized by AI agents following Andrej Karpathy&amp;rsquo;s &lt;a href="https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f"&gt;LLM Wiki&lt;/a&gt; concept. The idea formulated by Karpathy is to build a personal Wiki, curated, agent-maintained collection of structured Markdown notes. Once that kind of setup grows past a few hundred files, finding something quickly matters more than it used to.&lt;/p&gt;
&lt;p&gt;Recently I came across &lt;a href="https://github.com/tobi/qmd"&gt;&lt;em&gt;qmd&lt;/em&gt;&lt;/a&gt; (abbrev. for Query Markup Documents), a local CLI search engine for Markdown documents written by &lt;a href="https://github.com/tobi"&gt;Tobias Lütke&lt;/a&gt;, CEO of Shopify.&lt;/p&gt;
&lt;h2 id="what-qmd-is"&gt;What qmd Is&lt;/h2&gt;
&lt;p&gt;qmd indexes a folder of Markdown files and lets you query them from the command line. It runs entirely locally with no cloud dependencies.&lt;/p&gt;
&lt;p&gt;Under the hood, qmd combines three retrieval strategies. It runs BM25 keyword search via SQLite, vector semantic search using a local embedding model, and LLM-based re-ranking to score results before returning them. For most queries, the &lt;code&gt;query&lt;/code&gt; command runs the full pipeline. There is also a &lt;code&gt;search&lt;/code&gt; command for plain keyword lookup and a &lt;code&gt;vsearch&lt;/code&gt; command for semantic-only search.&lt;/p&gt;
&lt;h2 id="setup"&gt;Setup&lt;/h2&gt;
&lt;p&gt;Getting started requires Node.js 22 or higher. Install the package, point qmd at a folder, run the embedding pass, and start querying:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;npm install -g @tobilu/qmd
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;qmd collection add ~/&amp;lt;directory&amp;gt; --name &amp;lt;collection_name&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;qmd embed
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;qmd query &lt;span class="s2"&gt;&amp;#34;&amp;lt;search_term&amp;gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The initial &lt;code&gt;qmd embed&lt;/code&gt; pass indexes the collection and downloads the local models, which adds up to around 1.7GB on disk. After that, incremental updates are fast and queries run offline.&lt;/p&gt;
&lt;h2 id="mcp-integration"&gt;MCP Integration&lt;/h2&gt;
&lt;p&gt;qmd also ships with an MCP server, which means it can be connected directly to large language models as a search tool. Once configured, an AI agent can query your vault mid-session without you having to manually locate or read files. The tool supports a &lt;code&gt;--json&lt;/code&gt; output flag designed for exactly this kind of agentic use: structured output that an agent can parse and act on without screen scraping.&lt;/p&gt;
&lt;p&gt;For a vault where AI agents are already contributing content, being able to point those same agents back at the vault as a searchable knowledge source is a natural complement.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;qmd fills a gap that grows more noticeable as a Markdown vault gets larger. Obsidian&amp;rsquo;s built-in search works well for simple lookups, but semantic search across a large, mixed-content vault is a different problem. qmd handles that locally, without sending anything to an external service, and integrates cleanly with AI agent tooling through MCP. For anyone running a Karpathy-style personal knowledge base in Obsidian, it is worth adding to the stack.&lt;/p&gt;
&lt;h2 id="references"&gt;References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;qmd on GitHub - &lt;a href="https://github.com/tobi/qmd"&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Tobias Lütke on GitHub - &lt;a href="https://github.com/tobi"&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Andrej Karpathy on the LLM Wiki concept - &lt;a href="https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f"&gt;link&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>