Work / ko-qmd
ko-qmd
A local search engine for Korean Markdown notes and Obsidian vaults. It mixes BM25, vector search and an LLM reranker, every model runs on your own machine, and it ships as a CLI, an MCP server, a REST API and a TypeScript SDK. It is the Korean distribution of tobi/qmd.
- Package
- ko-qmd on npm
- Runs
- on your machine, models included
- Interfaces
- CLI · MCP · REST · SDK
- Based on
- tobi/qmd (MIT)
npm install -g ko-qmd
qmd query "회의록 결정 사항"
What it does.
Keyword and meaning together
BM25 full-text search, vector search and an LLM reranker in one query.
Korean as it is written
Particles and endings are stripped, so 검색을 finds 검색, and 하이브리드 서치 finds the note named hybrid-search.
For people and for agents
A CLI, an MCP server, a REST API and a TypeScript SDK over the same index.
Exact strings too
qmd grep finds an exact string or a regular expression in the indexed text, for spellings the tokenizer never produced.
How it is designed.
The search pipeline of ko-qmd, from the question to the reranked list, drawn from its code.
-
Korean is handled on the query side
A Korean word carries particles and endings, so a plain keyword search misses the note that holds only its stem. ko-qmd strips them from the question, and a table of about 90 loanword spellings also searches the English form. Only the question changes, so nothing is reindexed. The index adds one thing: Hangul syllable bigrams beside the text, so a word inside a compound still matches. On the first 52 questions of the project’s Korean fixture, BM25 recall@5 rose from 0.6250 in upstream 2.8.3 to 0.9519.
-
No query expansion for Korean
In hybrid search, a question with any Hangul in it skips the LLM query expansion. On Korean questions the expansion model wrote English sentence frames with stray Chinese, and its sampling alone changed the first result of up to five of 30 hard questions from run to run. With it off, hybrid latency fell from about a second a question to tens of milliseconds and the hard questions lost nothing (measured 2026-09-26). English questions are still expanded.
-
The vector list counts half
The two lists are fused by reciprocal rank. At full weight a first-place vector hit is worth almost what a first-place keyword hit is worth, so on a question whose words are literally in the note, weaker vector candidates passed the right answer. Counting the vector list half fixed that: on 232 Korean wiki documents and 240 exact-phrase questions, hybrid recall@5 went from 0.9167 to 0.9542, and the 30-question paraphrase set stayed at 0.8333.
-
The reranker decides, on a budget
The retrieval position is only 10% of the final blend, so the reranker decides. Before, the first retrieved note stayed first whatever the reranker scored. To keep that affordable each document is cut to 256 tokens: on 29 replayed daemon queries the median fell from 5.3 s to 1.7 s with the benchmark the same or better (Apple M3 Max, rerank cache cleared). The first 8 candidates are scored first, and the rest only when the top two are close.
-
The daemon keeps the index fresh, and does only that
Before a search the daemon checks the collections it is about to search, at most once every 30 seconds each, and re-indexes the files that changed, so a note written a minute ago is found by keyword. It deliberately does not run a collection’s update command, clear the LLM cache, or embed: a new note reaches vector search after the next qmd embed.