Database / LanceDB Interview questions
What is hybrid search in LanceDB?
Hybrid search combines vector similarity search and full-text (keyword) search in a single query, then merges and re-ranks the two result sets into one final ranked list, aiming to get the best of both: semantic understanding from vector search and precise keyword matching from full-text search.
from lancedb.rerankers import RRFReranker results = ( table.search("machine learning models", query_type="hybrid") .rerank(reranker=RRFReranker()) .limit(10) .to_list() )
This addresses a real weakness of using either technique alone: pure vector search can miss results that use different wording than the query but are still relevant, while pure keyword search misses results that are conceptually related but don't share exact terms — hybrid search runs both and lets a reranker decide how to weigh and combine the two rankings.
By default, LanceDB uses Reciprocal Rank Fusion (via RRFReranker) to combine the two result sets, though other rerankers and custom reranking logic are also supported for cases where a team wants finer control over how semantic and keyword signals are weighted against each other.
More Related questions...