AI Engineering interview question · Retrieval · mid level
What is hybrid search, and how do you merge keyword and vector results with Reciprocal Rank Fusion?
Free to read in full. This is 1 of the 150 questions in the AI Engineering (LLM applications) interview pack, with 180 diagrams. Get the pack, ₹999 · $20
Why it is asked
Hybrid search is standard in production RAG. The interviewer wants the RRF formula and why it uses ranks.

The answer
Hybrid search runs keyword search (BM25) and vector search on the same query and merges the two ranked lists. Reciprocal Rank Fusion (RRF) merges them using only positions: each document scores the sum of 1 / (k + rank) over every list it appears in, with k usually set to 60.
Why ranks and not scores: BM25 scores have no fixed range (one query may give 12.7, another 3.1), while cosine similarity scores sit between -1 and 1. Adding them directly makes no sense. RRF ignores the raw scores, so it needs no normalization and almost no tuning.
Worked example with k = 60. BM25 returns A, B, C. Vector search returns C, A, D. Final order: A, C, B, D. Documents found by both methods rise to the top.
- A: 1/61 + 1/62 = 0.03252
- C: 1/63 + 1/61 = 0.03227
- B: 1/62 = 0.01613
- D: 1/63 = 0.01587
What k does: a smaller k gives the first few ranks much more weight; a larger k flattens the differences. 60 comes from the original 2009 paper and works well as a default.
In practice:
- Retrieve about 50 from each method, fuse, and pass the top 20 to 50 to a reranker (a second model that re-scores results).
- If one source is more reliable for your data, multiply its terms by a weight.
- A tuned weighted sum of normalized scores can beat RRF, but it needs labeled data, and the weights drift as the data changes.
Measure hybrid against each method alone on your eval set. On a corpus with no codes or names, the gain can be small.
What the interviewer listens for
- Run BM25 and vector search, then fuse
- RRF score is the sum of 1 / (k + rank), k about 60
- Uses ranks, so no score normalization
- Documents found by both lists rise
- Usually followed by a reranker
Follow-ups the interviewer may ask
- What happens if a document appears in only one list? Hint: it gets one term, so it can still rank well if it is near the top of that list.
- When would you prefer a weighted score sum? Hint: when you have labeled data to tune the weights and can re-tune them over time.
Common mistakes
- Adding raw BM25 and cosine scores together
- Assuming hybrid always helps without measuring
Written by Roni Das, who builds distributed systems and AI systems for a living.
Learn it properly
This is taught step by step in the course lesson Hybrid Retrieval: When Keyword Search Beats Your Embeddings.
One question is not enough for the interview.
This is 1 of the 150 questions in the AI Engineering (LLM applications) pack
Each question has why it is asked, a full answer, what the interviewer listens for, the follow-ups, the common mistakes and a diagram (180 diagrams in all). A PDF you keep, junior to staff level.
India: UPI, cards or netbanking through Razorpay. Elsewhere: PayPal. Download at once from My packs.
More free questions from this pack
- What do temperature and top-p control, and what values would you use for data extraction versus brainstorming? (junior)
- Users ask "list all X" questions and RAG returns only five items. Why, and what do you do? (senior)
- How do you check that an LLM judge agrees with human reviewers? (mid)
- Cut the cost of an LLM feature serving 10 million requests a day by 60% without hurting quality. Walk through your plan. (staff)
Free questions from the other packs
- Why are LLMs bad at counting letters or reversing a word? (GenAI and LLM)
- Write out scaled dot-product attention with the shape of every tensor. (GenAI and LLM)
- How does speculative sampling keep exactly the target model's distribution? (GenAI and LLM)
- What is GRPO, and how do verifiable rewards train reasoning models? (GenAI and LLM)
- Design a system that answers questions from 300-page contracts accurately. (GenAI and LLM)
- What happens, step by step, when an LLM server handles one request? (Inference Engineering)
- Derive the KV cache size formula and work it out for Llama 3 70B. (Inference Engineering)
- What is PagedAttention? (Inference Engineering)
- When does speculative decoding stop helping or make things worse? (Inference Engineering)
- Design a service to serve Llama 3 70B at 10 QPS with latency targets. (Inference Engineering)
- Compute the cosine similarity of a = (3, 4) and b = (4, 3) by hand. What does the result mean? (Maths for ML)
- A batch of 32 MNIST images goes into a dense layer with 128 units. What are the shapes, and what is the rule for when two matrices can be multiplied? (Maths for ML)
- A disease affects 1% of people. A test catches 90% of sick people (sensitivity) and wrongly flags 9% of healthy people (false positive rate). You test positive. What is the chance you are sick? (Maths for ML)
- Why do we not use mean squared error for classification with a sigmoid output? Compare the gradients numerically. (Maths for ML)
- Compute scaled dot-product attention by hand for two tokens with d_k = 2. (Maths for ML)
- A customer says: "We want AI for our support team." What do you do in the first meeting? (Forward Deployed Engineer)
- The customer's admin offers you a global admin account "to save time". What do you ask for instead, and why? (Forward Deployed Engineer)
- Your connector writes tickets into the customer's system. A request timed out, the connector retried, and now there are duplicate tickets. How do you make the writes safe to retry? (Forward Deployed Engineer)
- The customer wants RAG over 10 million documents, all behind their firewall. Size it for me on the whiteboard. (Forward Deployed Engineer)
- One deployment of your AI platform must serve 50 business units of the same enterprise. How do you design multi-tenancy? (Forward Deployed Engineer)
