Files
MyAiConfiguration/shared/skills/research/semantic-search/SKILL.md
T
Julian LechnerandClaude Opus 5.5 ca4cb2a144 feat(qmd): switch to Qwen3 4B embedding and reranker models
Use Qwen3-Embedding-4B and Qwen3-Reranker-4B (both Q4_K_M) for QMD local
search, and make the switch reach existing installations:

- Rewrite the setup-owned models block on every install and update, while
  still recording the user's original block only once.
- When the new embedding size no longer matches stored vectors, the daemon
  clears the old vectors and re-embeds the repository.
- Delete setup-downloaded model files the current models no longer use.
- Skip npm and pnpm lockfiles and minified bundles when indexing
  repositories, which saves embedding work and removes search noise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 09:51:58 +01:00

1.7 KiB

name, description
name description
semantic-search MUST apply before open repository searches - run semantic retrieval first for unknown identifiers and behavior questions. Not needed for known paths, symbols, or exact strings, which use direct reads or rg.

Semantic Search

Search the current Git repository, plus the user's registered QMD collections, by meaning. QMD runs locally with Qwen3-Embedding-4B, Qwen3-Reranker-4B, and QMD Query Expansion 1.7B; a background daemon keeps them loaded.

Rule

Apply research, repository-research, and this routing rule before each open repository search. Known exact identifiers, paths, or strings use direct reads or rg without loading these skills. Unknown identifiers require semantic retrieval first; guessed keywords are not known identifiers. Reevaluate the route for every follow-up query. Reuse instructions already in context.

Run

The same command works in Bash and PowerShell:

node "$HOME/.my-ai-configuration/qmd/qmd-search.mjs" --query "<full question about behavior>" --top-k 5

Output: JSON list of {path, line, score, snippet}, best first. Repository paths are relative to the repository root; hits from other collections are qmd://<collection>/<path>.

Use the results

  1. Phrase the query as a full question about behavior, not a keyword list. Batch related questions into one precise query.
  2. Open the top hits and verify them against the current files before acting; the index can lag behind uncommitted edits.
  3. If no hit is relevant, run one rephrased search before switching to rg.
  4. Continue with repository-research from the verified hits: callers, tests, and conventions.

Failure

If the command exits non-zero, continue with rg and state the limitation in one sentence.