Skip to content

Instantly share code, notes, and snippets.

Technique  Core Behavior  Key Strength  Major Weakness 
Metadata Filtering  Filters docs by rigid metadata rules (author, date, region, permissions)  Fast, deterministic, easy to interpret  Ignores text content, cannot rank relevance 
Keyword Search (BM25)  Finds docs with overlapping keywords  Excellent for technical text, product names, structured data  Misses synonyms or paraphrases 
Semantic Search (Embeddings)  Finds docs with similar meaning  Captures synonyms, context, and nuance  Computationally heavier, may miss exact matches