0
0
Prompt Engineering / GenAIml~20 mins

Hybrid search strategies in Prompt Engineering / GenAI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Hybrid Search Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Hybrid Search Strategy Components
Which two main components are combined in a hybrid search strategy to improve search results?
ADecision trees and random forests
BVector similarity search and keyword-based search
CClustering and dimensionality reduction
DReinforcement learning and supervised learning
Attempts:
2 left
💡 Hint
Think about combining semantic understanding with exact matching.
Model Choice
intermediate
2:00remaining
Choosing a Model for Vector Search in Hybrid Systems
Which model type is best suited to generate embeddings for vector similarity search in a hybrid search system?
ATransformer-based language model trained on text
BConvolutional Neural Network (CNN) trained on images
CLinear regression model
DK-means clustering model
Attempts:
2 left
💡 Hint
Consider which model understands text semantics well.
Metrics
advanced
2:00remaining
Evaluating Hybrid Search Performance
Which metric best measures the balance between precision and recall in hybrid search results?
AMean Squared Error (MSE)
BLog Loss
CF1 Score
DAccuracy
Attempts:
2 left
💡 Hint
This metric combines precision and recall into one number.
🔧 Debug
advanced
2:00remaining
Debugging Hybrid Search Code Output
What is the output of this Python code snippet simulating a hybrid search result ranking? ```python vector_scores = [0.9, 0.75, 0.6] keyword_scores = [0.8, 0.85, 0.5] combined_scores = [v * 0.6 + k * 0.4 for v, k in zip(vector_scores, keyword_scores)] sorted_indices = sorted(range(len(combined_scores)), key=lambda i: combined_scores[i], reverse=True) print(sorted_indices) ```
A[0, 1, 2]
B[1, 0, 2]
C[2, 1, 0]
D[0, 2, 1]
Attempts:
2 left
💡 Hint
Calculate combined scores and sort descending.
Hyperparameter
expert
2:00remaining
Tuning Weight Parameters in Hybrid Search
In a hybrid search system combining vector and keyword scores as `final_score = alpha * vector_score + (1 - alpha) * keyword_score`, which alpha value is most likely to emphasize semantic similarity over exact keyword matches?
A0.0
B0.5
C0.1
D0.9
Attempts:
2 left
💡 Hint
Higher alpha means more weight on vector scores.