QMD provides two primary ways to find information. Choosing the right one depends on what you know about the target content:
1. BM25 Lexical Search (qmd search)
Use this when you know exact words, titles, names, code symbols, or rare phrases. It is faster and often more accurate for verbatim lookups.
# Search for exact terms
qmd search "cockpit OKR Goodhart" -n 10
# Search within a specific collection
qmd search '"AI Before Headcount"' -c concepts -n 5
2. Structured Query (qmd query)
Use this when the user describes an idea indirectly or uses different wording than the source. This is the default mode for conceptual recall. Do not rely on the built-in expansion model; author the fields yourself to provide context the model lacks.
Structured Fields:
intent:: States what you are looking for and what to avoid. This is critical for steering ranking away from similar but incorrect concepts.lex:: Your own keyword expansion (exact terms, aliases, titles).vec:: Natural language paraphrases of the idea.hyde:: A description of the hypothetical document or answer that would satisfy the request.
qmd query $'intent: Find the concept note about metrics as instruments without letting OKRs replace judgment.\nlex: cockpit instruments OKR Goodhart metrics judgment\nvec: data informed not metric driven product judgment\nhyde: A concept note says metrics are useful like cockpit instruments...'