Database / Weaviate Vector database Interview questions
What is BM25 in the context of Weaviate?
BM25 (Best Matching 25) is a classic, well-established term-weighting and ranking algorithm from information retrieval, used to score how relevant a document is to a query based on term frequency and how common or rare each term is across the whole collection. Weaviate uses BM25 as the keyword-matching half of its hybrid search.
results = collection.query.bm25( query="wireless noise cancelling headphones", limit=10 )
BM25 excels at exactly the cases dense vector embeddings sometimes miss: rare, specific terms, like a product SKU, an exact error code, or a precise legal citation, where matching the literal term matters more than the surrounding semantic context. This is exactly why combining BM25 with vector search in hybrid mode tends to outperform either approach used alone for content where both exact terminology and semantic meaning matter.
More Related questions...