Hybrid Search & Reranking Questions with Answers

18 practice questions on Hybrid Search & Reranking (AI Engineering (LLM Apps)) with answers and step-by-step solutions. Try 10 samples below, then practise all 18 free in the AptiNest app.

Sample questions

Question 1Easy

Query expansion in search means:

  1. Running the query on more servers
  2. Storing each query in a vector database
  3. Adding synonyms or related terms to the query
  4. Raising the context window of the LLM

Answer: C. Adding synonyms or related terms to the query

Explanation

Expanded queries match documents that use different wording, improving recall.

Step-by-step solution

  1. Query expansion adds words to the original search term.
  2. Synonyms and related terms help find more relevant results.
  3. This improves the chances of matching the right document.
  4. Adding terms makes the query broader and more flexible.
  5. The correct answer is Adding synonyms or related terms to the query.

Why the other options are wrong

  • A. Running on more servers is scaling, not expanding the query's terms.
  • B. Storing queries in a vector database is a logging choice; it does not expand the search terms.
  • D. The LLM context window is unrelated to search; query expansion changes the search terms only.

Tip: Use synonyms to get better search results.

Question 2Easy

In a RAG pipeline, which stage normally comes immediately before sending context to the LLM?

  1. Reranking or filtering the retrieved chunks
  2. Building the HNSW graph
  3. Chunking the raw documents
  4. Training the embedding model

Answer: A. Reranking or filtering the retrieved chunks

Explanation

Order: retrieve candidates, rerank or filter, then build the prompt and generate.

Step-by-step solution

  1. Retrieval fetches initial chunks.
  2. Reranking filters best matches.
  3. Filtered chunks form context for LLM.
  4. Context is sent to LLM next.
  5. Final answer: Reranking or filtering the retrieved chunks.

Why the other options are wrong

  • B. Building the HNSW graph is an index step done ahead of time, not the step just before the LLM.
  • C. Chunking happens during ingestion, long before a query reaches the LLM.
  • D. Embedding model training is done ahead of time and is not a per-query step before the LLM.

Tip: Always rerank before finalizing context for LLM.

Question 3Easy

BM25 ranks documents mainly using:

  1. Term frequency, inverse document frequency and document length
  2. Random sampling of the index
  3. Dense vector similarity computed by a neural embedding model at query time
  4. Page popularity from incoming links

Answer: A. Term frequency, inverse document frequency and document length

Explanation

BM25 is a lexical scoring function that rewards rare query terms appearing often, normalised for length.

Step-by-step solution

  1. BM25 uses term frequency to measure how often a term appears in a document.
  2. It also uses inverse document frequency to reward rare terms across the collection.
  3. Document length is normalised to avoid bias towards longer documents.
  4. These three factors combine to rank documents accurately.
  5. Final answer: Term frequency, inverse document frequency and document length.

Why the other options are wrong

  • B. Random sampling does not rank documents; BM25 scores the query terms found in each document.
  • C. BM25 is a sparse keyword method and does not compute dense neural vector similarity.
  • D. Page popularity from incoming links is a web ranking signal such as PageRank, not part of BM25.

Tip: Remember BM25 uses three key factors for ranking: term frequency, inverse document frequency, and document length.

Question 4Easy

BM25 and dense retrieval each return 50 candidates, and 20 documents appear in both lists. How many unique candidates go to the reranker?

  1. 100
  2. 70
  3. 80
  4. 120

Answer: C. 80

Explanation

50 + 50 − 20 shared = 80 unique documents.

Step-by-step solution

  1. BM25 gives 50 candidates.
  2. Dense retrieval also gives 50 candidates.
  3. Both lists have 20 common documents.
  4. Total unique = 50 + 50 − 20 shared = 80.
  5. Final answer: 80.

Why the other options are wrong

  • A. 100 counts the 20 shared documents twice; they must be subtracted once from the total.
  • B. 70 subtracts too much; the unique count is 50 + 50 - 20 = 80.
  • D. 120 is the plain sum with no overlap removed; the 20 shared documents count once.

Tip: Add both and subtract the overlap to find unique items.

Question 5Medium

A question asks "Which plan is cheaper, Basic or Pro?" but retrieval returns two chunks about Basic only. Which technique targets this best?

  1. Decompose into sub-queries, one per entity, and retrieve for each
  2. Raise the LLM temperature for variety
  3. Use only BM25 keyword search and drop the dense embeddings altogether
  4. Lower the chunk size to 10 tokens

Answer: A. Decompose into sub-queries, one per entity, and retrieve for each

Explanation

Comparative and multi-hop questions often need one retrieval per sub-question.

Step-by-step solution

  1. Basic plan details are retrieved but Pro plan info is missing.
  2. Comparative questions need separate retrieval for each entity.
  3. Sub-queries for Basic and Pro ensure all needed data is fetched.
  4. Decomposing into sub-queries targets this issue directly.
  5. Final answer: A.

Why the other options are wrong

  • B. Temperature changes wording randomness, not retrieval; it cannot bring in the missing Pro plan chunks.
  • C. Dropping dense embeddings removes semantic matching and still does not fetch the missing Pro plan information.
  • D. Chunks of 10 tokens do not fetch Pro plan data; the query still misses the second plan entirely.

Tip: Use sub-queries for entities in comparison questions.

Question 6Medium

A weighted hybrid score is 0.7 × normalised vector score + 0.3 × normalised BM25 score. Document A has 0.9 and 0.2; document B has 0.6 and 1.0. Which scores higher?

  1. B
  2. A
  3. Neither; weights must sum to 2
  4. They tie

Answer: A. B

Explanation

A = 0.7 × 0.9 + 0.3 × 0.2 = 0.69, B = 0.7 × 0.6 + 0.3 × 1.0 = 0.72, so B is higher

Step-by-step solution

  1. Document A: 0.7 × 0.9 + 0.3 × 0.2 = 0.63 + 0.06 = 0.69.
  2. Document B: 0.7 × 0.6 + 0.3 × 1.0 = 0.42 + 0.30 = 0.72.
  3. B has the higher score, so the answer is option A, B.

Why the other options are wrong

  • B. A scores 0.69, which is less than B's 0.72.
  • C. The weights 0.7 and 0.3 sum to 1, so the calculation is valid.
  • D. The scores are 0.69 and 0.72, so they do not tie.

Tip: For weighted scores, multiply each value by its weight, add, then compare.

Question 7Medium

Sparse learned retrieval models (in the SPLADE family) produce:

  1. Dense vectors of 768 values in which none of the entries are zero
  2. SQL queries generated from the question
  3. Images of the text for visual search
  4. High-dimensional sparse term weights usable in an inverted index

Answer: D. High-dimensional sparse term weights usable in an inverted index

Explanation

They learn term weights including related terms, combining lexical indexing with learned expansion.

Step-by-step solution

  1. SPLADE-family models output a learned weight for many vocabulary terms.
  2. Most of those weights are zero, so the vector is sparse.
  3. Sparse term weights can be stored in an inverted index, like BM25 postings.
  4. So option D, high-dimensional sparse term weights in an inverted index, is correct.

Why the other options are wrong

  • A. Dense 768-value vectors with no zeros describe dense embeddings, not SPLADE.
  • B. SPLADE does not generate SQL queries.
  • C. SPLADE works on text, not on images of text.

Tip: Learned sparse retrieval gives term weights that fit an inverted index.

Question 8Medium

Why do pipelines retrieve, say, 50 candidates and then rerank to keep the top 5?

  1. Retrieval is more accurate than reranking
  2. Rerankers can only accept exactly 50 inputs
  3. Cheap retrieval casts a wide net; the expensive reranker refines a few
  4. The LLM needs all 50 chunks in its prompt to be able to produce a grounded answer

Answer: C. Cheap retrieval casts a wide net; the expensive reranker refines a few

Explanation

Two-stage retrieval balances recall (stage 1) against precision and cost (stage 2).

Step-by-step solution

  1. Retrieval finds many candidates cheaply.
  2. Reranking focuses on a few to improve quality.
  3. Stage 1 uses low-cost methods for wide coverage.
  4. Stage 2 uses expensive methods for precise selection.
  5. This balances cost and accuracy effectively.

Why the other options are wrong

  • A. Retrieval is cheaper and less precise than reranking, so it is not the more accurate stage.
  • B. Rerankers accept any number of candidates; the 50 and 5 are chosen for cost and quality, not forced.
  • D. The LLM does not need all 50 chunks; the reranker keeps only the best few for the prompt.

Tip: Use cheap methods first, then refine with expensive ones.

Question 9Hard

The first-stage retriever has recall@50 of 0.70. A perfect reranker then picks the top 5 from those 50. What is the best possible recall@5 for queries with exactly one relevant document?

  1. 0.70
  2. 1.00
  3. 0.14
  4. 0.35

Answer: A. 0.70

Explanation

A reranker can only reorder what was retrieved; if the relevant document is missing from the 50 for 30% of queries, it cannot be recovered.

Step-by-step solution

  1. Recall@50 of 0.70 means the relevant document is in the top 50 for 70% of queries.
  2. A reranker only reorders those 50 documents; it cannot add a missing one.
  3. For the other 30% of queries the relevant document is absent, so recall@5 is 0 there.
  4. Best possible recall@5 = 0.70, which is option A.

Why the other options are wrong

  • B. 1.00 would need every relevant document in the top 50, but recall@50 is only 0.70.
  • C. 0.14 does not follow from the stated recall of 0.70.
  • D. 0.35 is half of 0.70 and has no basis in the setup.

Tip: A reranker cannot recover a document the retriever missed.

Question 10Hard

BM25's k1 parameter controls:

  1. How many documents are returned to the caller for each search query
  2. The number of shards in the cluster
  3. The embedding dimension of the index
  4. How quickly repeated occurrences of a term stop adding score

Answer: D. How quickly repeated occurrences of a term stop adding score

Explanation

k1 sets term-frequency saturation; b separately controls length normalisation.

Step-by-step solution

  1. k1 in BM25 controls how much repeated terms boost the score.
  2. A higher k1 lets the score keep rising for more occurrences before it flattens; a lower k1 flattens it sooner.
  3. So repeated terms stop adding score quickly when k1 is low.
  4. k1 therefore controls how quickly repeated terms stop adding score.
  5. Final answer: D (How quickly repeated occurrences of a term stop adding score).

Why the other options are wrong

  • A. The number of returned documents is set by the result limit, not by the k1 parameter.
  • B. Shard count is a cluster setting, while k1 is a scoring parameter for term frequency.
  • C. Embedding dimension is a property of the vectors; BM25 has no vectors and k1 does not set it.

Tip: Remember, k1 helps balance term frequency impact in BM25 scoring.

Practise all 18 questions free

The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.

Open this topic in the app →

Related topics

See all AI Engineering (LLM Apps) topics · All topics