Guides

How search works

The GNO retrieval pipeline end to end — BM25, vector, query expansion, fusion, and reranking.

GNO’s hybrid search is not magic. It’s a deliberate pipeline of proven retrieval techniques composed to give you accurate results whether you search for exact terms or conceptual matches.

The pipeline

  1. Query expansion — optionally expand the query with HyDE (hypothetical document embeddings) and lexical variants. GNO skips expansion when it has a strong signal.
  2. BM25 retrieval — classical full-text search over the inverted index. Fast and precise for exact terms, technical identifiers, and quoted phrases.
  3. Vector retrieval — cosine similarity over dense embeddings. Handles synonyms and conceptual matches.
  4. Reciprocal rank fusion — merges BM25 and vector results by rank position, not raw score. Robust to different score distributions.
  5. Cross-encoder reranking — the fused top-N is rescored by a cross-encoder that looks at query and document together. Slow but highly accurate for the top few results.
  6. Return — the reranked top-K is returned with scores, snippets, and optionally the retrieval pipeline trace.

Speed modes

gno query "topic" --fast
gno query "topic" # balanced
gno query "topic" --thorough

--explain

Pass --explain to any query command to see exactly what happened: expansion output, BM25 hits, vector hits, fusion order, rerank scores. Use it to tune your prompts or to debug unexpected results.

gno query "topic" --explain

Strong signal detection

When your query contains exact identifiers or quoted phrases, the pipeline recognizes the strong signal and skips expansion — no point hallucinating a HyDE document when the user already told you exactly what they want.