AI Expert

Guides/Embeddings vs keyword vs hybrid

Embeddings vs keyword vs hybrid

Retrieval debates aren't religious wars — they're mismatch diagnostics. Keywords excel when literals matter; embeddings excel when users paraphrase; hybrids recover recall when enterprise corpora mix both failure modes.

Decision flow

Walk this when recall tickets spike — isolate lexical misses before tuning embedding dimensions or chunk sizes.

When to favor keyword, dense vectors, or hybrid retrievalUser / query pattern?SKUs, codes, exact titles matter?YesNoKeyword / BM25Lexical matchParaphrase-heavy?Dense embeddingsSemantic neighborsStill missing recall?Hybrid + rerankFuse sparse + dense, then rerank top-K
Production systems often end hybrid — this flow explains when to add each leg.

Mode comparison

ModeReach for it when…StrengthWatch-outs
Keyword (sparse)IDs, policy numbers, product codes, known titlesFast, cheap, exact token overlapParaphrase & typos break recall
Dense (embeddings)“Similar ideas” not exact words; long unstructured blobsSemantic similarity; tolerant wordingCold-start corpus tuning; can blur distinct entities
HybridMust recover both literal SKUs and fuzzy descriptionsBest recall breadth on messy enterprise corporaFusion weights + infra — tune with labeled misses

Fit by query shape (illustrative chart)

Replace illustrative scores with offline evals on your labeled query sets — the ranking order matters more than absolute numbers.

Fit by query shape (illustrative)

Score curves shift with corpus quality — measure offline recall@k before trusting intuition.

Shipping notes

  • Start from failure buckets (keyword miss vs semantic drift) before buying GPU-heavy rerankers.
  • Hybrid fusion weights belong in experimentation — log retrieval provenance so PMs can audit misses with engineers.