Sample questions
Question 1Easy
Which chunking strategy splits text at sentence or paragraph boundaries rather than at a fixed character count?
- Random sampling of spans
- Fixed-size splitting
- Byte-pair encoding
- Structure-aware (recursive) splitting
Answer: D. Structure-aware (recursive) splitting
Explanation
Recursive splitters try paragraph, then sentence, then word boundaries so chunks stay coherent.
Step-by-step solution
- Fixed-size splitting cuts at a set character count and ignores sentence or paragraph breaks.
- Recursive splitting tries paragraph breaks first, then sentences, then words.
- Because boundaries are respected, chunks stay coherent.
- The answer is option D, structure-aware (recursive) splitting.
Why the other options are wrong
- A. Random sampling of spans is not a chunking method that respects text boundaries.
- B. Fixed-size splitting ignores sentence and paragraph boundaries.
- C. Byte-pair encoding is a tokeniser method, not a text splitter.
Tip: A recursive splitter tries paragraph, then sentence, then word.
Question 2Easy
Which piece of metadata is most useful to store with every chunk?
- Source document ID and section or page
- The developer's laptop name
- The number of vowels in the chunk
- The GPU model used to embed it
Answer: A. Source document ID and section or page
Explanation
Source metadata enables citations, filtering, deletion and re-indexing of a document.
Step-by-step solution
- Source document ID links chunks to their origin.
- Section or page helps find exact location in the source.
- This makes it easy to cite and filter data.
- Other options are irrelevant for chunk management.
- Final answer: Source document ID and section or page.
Why the other options are wrong
- B. A laptop name says nothing about the content or source, so it is not useful for finding or citing chunks.
- C. The vowel count describes the text only and is not useful for tracing or filtering chunks.
- D. The GPU used for embedding is an infrastructure detail and does not help locate or cite the source.
Tip: Always store source info for accurate citations and filtering.
Question 3Easy
Text-to-vector embedding models output vectors whose length (dimension) is:
- Chosen randomly at each call
- Equal to the number of words in the input
- Twice the number of characters in the input
- Fixed for a given model regardless of input length
Answer: D. Fixed for a given model regardless of input length
Explanation
A model always produces the same dimension, so vectors can be compared and indexed.
Step-by-step solution
- Text-to-vector models use fixed-length vectors for consistency.
- This allows comparison and indexing of different texts.
- Each model has a predefined vector length.
- The length does not change with input size.
- Fixed dimension ensures uniformity in output.
Why the other options are wrong
- A. The dimension is fixed by the model design, so it is not picked randomly on each call.
- B. The vector length does not follow the word count; the model outputs a fixed number of values.
- C. The vector length does not depend on character count; it is set by the model, not doubled per character.
Question 4Easy
A chunk's stored embedding must be recomputed when:
- The server is restarted
- A user runs a new query
- The LLM's temperature changes
- The chunk's text changes
Answer: D. The chunk's text changes
Explanation
Embeddings are a function of the text and the embedding model; queries and restarts do not change them.
Step-by-step solution
- A chunk's embedding is computed from that chunk's text using the embedding model.
- If the text changes, the stored vector no longer matches it, so it must be recomputed.
- Restarts, new user queries and the LLM's temperature do not change the chunk's text or the embedding model.
- So the answer is option D, when the chunk's text changes.
Why the other options are wrong
- A. Restarting the server does not change the stored text or the embedding model.
- B. A new query is embedded separately and does not change stored chunk embeddings.
- C. The LLM's temperature is not an input to the embedding of a chunk.
Tip: Recompute stored embeddings only when the text or the embedding model changes.
Question 5Medium
Embedding a long chunk into a single vector tends to:
- Make keyword search unnecessary
- Raise the dimension of the vector
- Blur several topics into one averaged meaning
- Store each sentence as a separate vector
Answer: C. Blur several topics into one averaged meaning
Explanation
One vector per chunk is fixed-size, so a chunk mixing topics matches none of them sharply.
Step-by-step solution
- One vector summarises the whole chunk.
- A long chunk covers several topics.
- The vector becomes an average of them.
Why the other options are wrong
- A. Keyword search is still useful.
- B. Dimension is fixed by the model.
- D. That would need sentence-level embeddings.
Question 6Medium
Source code files are chunked into fixed 500-character windows, often splitting functions in half. Which strategy suits code better?
- Use 50-character windows so splits are less visible
- Embed each source file as one single huge chunk
- Split at function or class boundaries using a parser
- Remove all comments and whitespace before splitting
Answer: C. Split at function or class boundaries using a parser
Explanation
Syntax-aware chunking keeps each function intact, so a retrieved chunk is meaningful on its own.
Step-by-step solution
- Splitting at function boundaries ensures whole functions stay together.
- This makes code chunks readable and usable without context.
- A parser can detect these boundaries accurately.
- Chunks remain meaningful even if split across files.
- Final answer: Split at function or class boundaries using a parser.
Why the other options are wrong
- A. Smaller 50-character windows split functions even more often; the splits stay, just less visible.
- B. One huge chunk per file is too large to embed well and returns whole files instead of the relevant function.
- D. Removing comments and whitespace changes the code and still leaves fixed windows that cut functions apart.
Tip: Use syntax-aware splitting for better code navigation.
Question 7Medium
A chunk reads "It increased to 12% in that year." Retrieval often misses it. Which technique helps most?
- Split it into one chunk per word
- Translate the chunk into another language
- Prepend context such as the document title and section heading
- Remove the number from the chunk so that it becomes shorter and cleaner
Answer: C. Prepend context such as the document title and section heading
Explanation
Contextual headers restore what "it" and "that year" refer to, so the chunk embeds and matches better.
Step-by-step solution
- Context helps clarify pronouns like 'it' and time references like 'that year'.
- Prepending context links the chunk to its meaning in the document.
- This makes retrieval more accurate and efficient.
- The chunk now has clear reference points for search systems.
- Final answer: Prepend context such as the document title and section heading.
Why the other options are wrong
- A. One chunk per word loses sentence meaning and makes each piece too short to match a query well.
- B. Translating the chunk does not add the missing context and may make search worse for the source language.
- D. Removing the number deletes the fact the user is searching for, so the chunk becomes less useful.
Tip: Always add context to chunks with unclear pronouns or dates.
Question 8Medium
Some embedding models are trained so that the first 256 of 1,024 dimensions still work as a smaller embedding (Matryoshka-style). The main engineering benefit is:
- The vectors become readable as plain words
- Queries can skip the embedding step entirely
- The model no longer needs any training data, labels or fine-tuning at all
- Truncated vectors cut storage and search cost with modest quality loss
Answer: D. Truncated vectors cut storage and search cost with modest quality loss
Explanation
Shorter vectors mean less memory and faster search, trading a little accuracy.
Step-by-step solution
- Matryoshka training front-loads information.
- Truncate to the first 256 dims.
- Storage and search cost drop.
Why the other options are wrong
- A. Vectors are not words.
- B. Still need embedding.
- C. Training is still needed.
Question 9Hard
Maximal marginal relevance (MMR) is applied to retrieved chunks to:
- Remove all chunks whose score falls below a fixed cosine threshold of 0.5
- Merge every retrieved chunk into a single summary
- Balance relevance with diversity so near-duplicates are not all chosen
- Sort chunks by length so the shortest come first
Answer: C. Balance relevance with diversity so near-duplicates are not all chosen
Explanation
MMR penalises candidates similar to ones already selected, giving broader coverage in the context.
Step-by-step solution
- MMR picks chunks one at a time.
- Each pick scores relevance to the query minus similarity to chunks already chosen.
- This penalises near-duplicates, so the context covers more ground.
- So option C, balancing relevance with diversity, is correct.
Why the other options are wrong
- A. A fixed score threshold filters chunks but does not promote diversity.
- B. MMR selects chunks; it does not merge them into a summary.
- D. Sorting by length has nothing to do with MMR.
Tip: MMR means relevant but not repeating.
Question 10Hard
Embeddings are cached keyed by a hash of the chunk text only. After switching to a new embedding model, search quality collapses. Why?
- The cache returns old-model vectors mixed with new-model queries
- The new embedding model cannot embed any text that was previously cached
- Hashes change when the embedding model changes
- Caching always lowers recall for any model
Answer: A. The cache returns old-model vectors mixed with new-model queries
Explanation
The cache key must include the model (and version) so vectors from different spaces are never mixed.
Step-by-step solution
- The cache key is the chunk text only, with no model name or version.
- After switching models, old cached vectors are still served.
- Vectors from two different embedding spaces are mixed, so similarity scores are meaningless.
- So option A, old-model vectors mixed with new-model queries, is the cause.
Why the other options are wrong
- B. The new model can embed any text; the problem is the stale cache, not the model.
- C. The hash is made from the text, so it does not change when the model changes.
- D. Caching does not lower recall by itself; mixing vector spaces is the cause here.
Tip: Cache keys must include the embedding model name and version.
Practise all 19 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 →