kb-search

Searches lessons, session logs, and docs using QMD hybrid semantic and BM25 retrieval.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/ozand/knowledge-base-template --skill kb-search-ozand
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: kb-search
Source: https://github.com/ozand/knowledge-base-template/tree/main/_template/qmd/skills/kb-search
Command: npx skills add https://github.com/ozand/knowledge-base-template --skill kb-search-ozand

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When an error occurs and exact keyword matching against the knowledge base index fails, this Skill finds relevant fixes, design decisions, and historical discussions through semantic search across all curated collections. ## Core Features & Use Cases - Hybrid Retrieval: Combines semantic vector search, BM25 keyword matching, and reranking through the QMD pipeline. - Multi-Collection Search: Queries lessons, session logs (sources), and external documentation in a single command. - Structured Query Construction: Builds queries with intent, lexical keywords, vector phrasing, and hypothetical answer passages for better recall. - Use Case: A PostgreSQL connection timeout error has no exact match in index.yaml, so you run a structured semantic query and retrieve a curated lesson plus related session transcripts with relevance scores. ## Quick Start Ask the agent to run kb-search with a description of your error, for example: search the knowledge base for postgresql connection timeout under load.

Frequently Asked Questions about kb-search

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search a knowledge base semantically when keywords don't match?▼

Use QMD's hybrid search, which combines semantic vector matching with BM25 keyword scoring and reranking. Construct a structured query with intent, lex, vec, and hyde fields, then run qmd query against the lesson, source, and doc collections.

What is a structured query with intent, lex, vec, and hyde?▼

A structured query combines four parts: intent states the search target, lex lists exact keywords and error codes, vec gives a natural language phrasing, and hyde provides a hypothetical answer paragraph. Together they improve both lexical and semantic recall.

Can I disable the reranker in QMD semantic search?▼

Yes. If disable_reranker is set to true in qmd.yaml, append the --no-rerank flag to the qmd query command. This skips the reranking stage, which can help on slower hardware.

How do I retrieve full documents after a QMD search?▼

After reviewing grouped results with relevance scores, titles, and paths, run qmd get with the document id, for example qmd get "#docid", to fetch the complete content of a specific result.

When should I use semantic search instead of exact index lookup?▼

Use exact matching against index.yaml error_signatures first since it is faster and precise. Fall back to semantic search when the error text does not match any signature or when you need conceptual knowledge, design decisions, or historical discussions.