QMD - 퀵 마크다운 서치

1 week ago 6

  • 개인 노트, 기술 문서, 회의록 등 다양한 Markdown 기반 문서를 로컬에서 검색하기 위해 개발된 경량 CLI 검색 엔진
  • BM25 전체 텍스트 검색, 벡터 의미 검색, LLM 재순위화(re-ranking) 를 결합한 하이브리드 검색 파이프라인
  • 모든 연산이 로컬 환경에서 수행되어 개인정보 유출 없이 AI 수준의 검색 품질 제공
  • 3가지 검색 모드 지원
    • search: BM25 기반 키워드 검색
    • vsearch: 임베딩 기반 의미 검색
    • query: 두 방식을 결합하고 LLM으로 재순위화하는 최고 품질 모드
  • MCP(Model Context Protocol) 서버 내장으로 Claude 등 LLM 기반 워크플로우와 직접 연동 가능
  • node-llama-cpp를 통해 모든 모델을 온디바이스에서 실행
    • embeddinggemma-300M, qwen3-reranker-0.6B, Qwen3-1.7BGGUF 포맷 모델을 자동 다운로드 및 캐시함
  • 검색 품질을 향상시킨 방법
    • 사용자가 검색요청한 것을 Qwen3-1.7B 모델로 질의 확장(Query Expansion)을 수행
    • SQLite FTS5sqlite-vec을 통한 병렬 검색을 진행
    • Reciprocal Rank Fusion (RRF) 으로 결과 통합
    • Qwen3-Reranker로 문서 관련도 재평가
    • 순위별 가중치 조정으로 정확도와 의미 유사성 균형 유지
  • TypeScript로 작성되었으며 Bun 런타임 기반. 인덱스는 SQLite 데이터베이스에 저장
  • MIT 라이선스
  • Shopify 창업자이자 CEO인 Tobi Lütke의 오픈소스

사용예

# Install globally bun install -g https://github.com/tobi/qmd # Create collections for your notes, docs, and meeting transcripts qmd collection add ~/notes --name notes qmd collection add ~/Documents/meetings --name meetings qmd collection add ~/work/docs --name docs # Add context to help with search results qmd context add qmd://notes "Personal notes and ideas" qmd context add qmd://meetings "Meeting transcripts and notes" qmd context add qmd://docs "Work documentation" # Generate embeddings for semantic search qmd embed # Search across everything qmd search "project timeline" # Fast keyword search qmd vsearch "how to deploy" # Semantic search qmd query "quarterly planning process" # Hybrid + reranking (best quality) # Get a specific document qmd get "meetings/2024-01-15.md" # Get a document by docid (shown in search results) qmd get "#abc123" # Get multiple documents by glob pattern qmd multi-get "journals/2025-05*.md" # Search within a specific collection qmd search "API" -c notes # Export all matches for an agent qmd search "API" --all --files --min-score 0.3

Read Entire Article