Sample questions
Question 1Easy
Query expansion in search means:
- Running the query on more servers
- Storing each query in a vector database
- Adding synonyms or related terms to the query
- 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
- Query expansion adds words to the original search term.
- Synonyms and related terms help find more relevant results.
- This improves the chances of matching the right document.
- Adding terms makes the query broader and more flexible.
- 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?
- Reranking or filtering the retrieved chunks
- Building the HNSW graph
- Chunking the raw documents
- 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
- Retrieval fetches initial chunks.
- Reranking filters best matches.
- Filtered chunks form context for LLM.
- Context is sent to LLM next.
- 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:
- Term frequency, inverse document frequency and document length
- Random sampling of the index
- Dense vector similarity computed by a neural embedding model at query time
- 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
- BM25 uses term frequency to measure how often a term appears in a document.
- It also uses inverse document frequency to reward rare terms across the collection.
- Document length is normalised to avoid bias towards longer documents.
- These three factors combine to rank documents accurately.
- 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?
- 100
- 70
- 80
- 120
Answer: C. 80
Explanation
50 + 50 − 20 shared = 80 unique documents.
Step-by-step solution
- BM25 gives 50 candidates.
- Dense retrieval also gives 50 candidates.
- Both lists have 20 common documents.
- Total unique = 50 + 50 − 20 shared = 80.
- 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?
- Decompose into sub-queries, one per entity, and retrieve for each
- Raise the LLM temperature for variety
- Use only BM25 keyword search and drop the dense embeddings altogether
- 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
- Basic plan details are retrieved but Pro plan info is missing.
- Comparative questions need separate retrieval for each entity.
- Sub-queries for Basic and Pro ensure all needed data is fetched.
- Decomposing into sub-queries targets this issue directly.
- 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?
- B
- A
- Neither; weights must sum to 2
- 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
- Document A: 0.7 × 0.9 + 0.3 × 0.2 = 0.63 + 0.06 = 0.69.
- Document B: 0.7 × 0.6 + 0.3 × 1.0 = 0.42 + 0.30 = 0.72.
- 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:
- Dense vectors of 768 values in which none of the entries are zero
- SQL queries generated from the question
- Images of the text for visual search
- 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
- SPLADE-family models output a learned weight for many vocabulary terms.
- Most of those weights are zero, so the vector is sparse.
- Sparse term weights can be stored in an inverted index, like BM25 postings.
- 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?
- Retrieval is more accurate than reranking
- Rerankers can only accept exactly 50 inputs
- Cheap retrieval casts a wide net; the expensive reranker refines a few
- 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
- Retrieval finds many candidates cheaply.
- Reranking focuses on a few to improve quality.
- Stage 1 uses low-cost methods for wide coverage.
- Stage 2 uses expensive methods for precise selection.
- 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?
- 0.70
- 1.00
- 0.14
- 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
- Recall@50 of 0.70 means the relevant document is in the top 50 for 70% of queries.
- A reranker only reorders those 50 documents; it cannot add a missing one.
- For the other 30% of queries the relevant document is absent, so recall@5 is 0 there.
- 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:
- How many documents are returned to the caller for each search query
- The number of shards in the cluster
- The embedding dimension of the index
- 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
- k1 in BM25 controls how much repeated terms boost the score.
- A higher k1 lets the score keep rising for more occurrences before it flattens; a lower k1 flattens it sooner.
- So repeated terms stop adding score quickly when k1 is low.
- k1 therefore controls how quickly repeated terms stop adding score.
- 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 →