labs
한국어 hello@taklabs.dev

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)

What it does.

How it is designed.

The search pipeline of ko-qmd, from the question to the reranked list, drawn from its code.

From the question to the reranked listA question with Hangul has its particles stripped before BM25 with bigrams; one without goes to LLM expansion, which feeds both BM25 and vector search; the question also goes straight to vector search; rank fusion weighs vectors at half, and the top 8 are reranked first.QuestionHangul?Strip particlesLLM expansionBM25 + bigramsVector searchRank fusionvectors at halfReranktop 8 firstYESNO
Fig. 01 From the question to the reranked list
  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

hello@taklabs.dev