Hybrid search uses both semantic and keyword search methods. What is the main benefit of combining these two?
Think about how semantic search understands meaning and keyword search looks for exact words.
Semantic search finds related meanings, while keyword search finds exact words. Combining both helps find more relevant results.
Given the following Python code snippet for a hybrid search score, what is the printed output?
semantic_score = 0.7 keyword_score = 0.5 alpha = 0.6 hybrid_score = alpha * semantic_score + (1 - alpha) * keyword_score print(round(hybrid_score, 2))
Calculate weighted average: multiply semantic score by alpha, keyword score by (1 - alpha), then add.
Hybrid score = 0.6*0.7 + 0.4*0.5 = 0.42 + 0.20 = 0.62
You want to build a hybrid search system combining keyword and semantic search. Which model is best suited for the semantic search part?
Semantic search needs to understand meaning, not just word counts.
Transformer-based models like Sentence-BERT create embeddings that capture sentence meaning, ideal for semantic search.
In hybrid search, the combined score is calculated as:
hybrid_score = alpha * semantic_score + (1 - alpha) * keyword_score.
What happens if alpha is set to 1?
Consider what multiplying by 1 or 0 does to each score.
When alpha=1, hybrid_score = 1*semantic_score + 0*keyword_score = semantic_score only.
You run a hybrid search system and want to measure how well it balances semantic and keyword search results. Which metric best captures both relevance and ranking quality?
Look for a metric that considers position of relevant results and graded relevance.
NDCG measures ranking quality by considering relevance scores and their positions, ideal for hybrid search evaluation.