Embeddings & Vector Search Questions with Answers

15 practice questions on Embeddings & Vector Search (Generative AI & LLMs) with answers and step-by-step solutions. Try 10 samples below, then practise all 15 free in the AptiNest app.

Sample questions

Question 1Easy

A top-k of 3 in vector retrieval means:

  1. Only 3 documents are stored
  2. The search runs 3 times
  3. Each chunk has 3 tokens
  4. 3 nearest chunks return

Answer: D. 3 nearest chunks return

Explanation

k controls how many nearest neighbours are passed on.

Step-by-step solution

  1. The query vector is compared with stored vectors.
  2. Results are sorted by similarity.
  3. top-k = 3 returns the 3 nearest chunks.

Why the other options are wrong

  • A. k limits results, not what is stored.
  • B. The search runs once; k is how many results it returns.
  • C. k is unrelated to chunk size.

Tip: top-k = how many nearest neighbours you keep.

Question 2Easy

Multilingual embedding models allow:

  1. Only English text to be embedded
  2. Exact keyword matching across languages
  3. Cross-language matching
  4. Translation without any model

Answer: C. Cross-language matching

Explanation

Equivalent sentences in different languages map to nearby vectors.

Step-by-step solution

  1. A multilingual model maps sentences with the same meaning to nearby vectors, whatever the language.
  2. A Hindi query can therefore find an English document.
  3. This is cross-language matching.

Why the other options are wrong

  • A. That describes an English-only model.
  • B. Keywords differ across languages; matching is by meaning, not exact words.
  • D. The embedding model itself is required.

Tip: Multilingual embeddings: same meaning, same place, any language.

Question 3Easy

Semantic search differs from keyword search because it matches:

  1. Upload dates
  2. Meaning
  3. File sizes
  4. Exact spelling only

Answer: B. Meaning

Explanation

Embeddings let "car price" match "cost of an automobile".

Step-by-step solution

  1. Keyword search matches the same words.
  2. Semantic search compares embeddings, which capture meaning.
  3. So 'car price' can match 'cost of an automobile'.

Why the other options are wrong

  • A. Dates are metadata, not the basis of semantic search.
  • C. File size is irrelevant.
  • D. Exact spelling is what keyword search relies on.

Tip: Keyword = same words; semantic = same meaning.

Question 4Easy

Turning text into a vector with an embedding model is called:

  1. Encrypting
  2. Embedding
  3. Tokenising only
  4. Hashing

Answer: B. Embedding

Explanation

The vector captures semantic content for similarity search.

Step-by-step solution

  1. An embedding model maps text to a vector.
  2. The process and the result are both called embedding.
  3. The vector captures meaning for similarity search.

Why the other options are wrong

  • A. Encryption hides content; it is reversible with a key and not meaning-based.
  • C. Tokenising is only the first step, producing token IDs.
  • D. Hashing gives a fixed code that does not reflect meaning.

Tip: Embedding keeps meaning; hashing does not.

Question 5Medium

A query embedding q = (1, 0, 1) is compared with documents

- A = (1, 1, 0) and
- B = (2, 0, 2) by cosine similarity.

Which is more similar?

  1. B
  2. They are equal
  3. Neither; cosine is 0 for both
  4. A

Answer: A. B

Explanation

- B is a multiple of q (cosine 1);
- A gives 1/2.

Step-by-step solution

  1. B = (2, 0, 2) = 2 x q, so it points in exactly the same direction: cosine 1.
  2. For A: dot = 1, lengths sqrt(2) and sqrt(2), cosine = 1/2.
  3. 1 > 0.5, so B is more similar.

Why the other options are wrong

  • B. Their cosines are 1 and 0.5, not equal.
  • C. Both dot products are positive, so neither cosine is 0.
  • D. A shares only one dimension with q; B is parallel to q.

Tip: A scaled copy of a vector always has cosine 1 with it.

Question 6Medium

Why might vector quantisation be applied in a large vector index?

  1. To improve accuracy to 100%
  2. To remove duplicate documents
  3. To cut memory use
  4. To make text readable

Answer: C. To cut memory use

Explanation

Compressing vectors (e.g. to 8-bit or product codes) saves memory and speeds search.

Step-by-step solution

  1. Millions of full-precision vectors take a lot of memory.
  2. Quantisation stores them with fewer bits, e.g. 8-bit instead of 32-bit floats.
  3. Memory drops sharply, at a small cost in accuracy.

Why the other options are wrong

  • A. Quantisation slightly lowers accuracy; it never guarantees 100%.
  • B. Deduplication is a different process.
  • D. Vectors are never meant to be human-readable.

Tip: 32-bit to 8-bit = about 4x less memory.

Question 7Medium

Documents score 0.82, 0.79 and 0.41 cosine similarity to a query, and a minimum threshold of 0.5 is set. How many are passed to the LLM?

  1. 0
  2. 1
  3. 2
  4. 3

Answer: C. 2

Explanation

Only scores at or above 0.5 pass: 0.82 and 0.79.

Step-by-step solution

  1. Compare each score with the 0.5 threshold.
  2. 0.82 passes, 0.79 passes, 0.41 fails.
  3. So 2 documents are passed on.

Why the other options are wrong

  • A. Two scores are above 0.5.
  • B. Both 0.82 and 0.79 exceed the threshold.
  • D. 0.41 is below 0.5, so it is dropped.

Tip: Threshold = minimum similarity to qualify.

Question 8Medium

Keyword search (e.g. BM25) tends to beat pure embedding search when queries contain:

  1. Synonyms of document words
  2. Questions in another language
  3. Exact codes, IDs or rare names
  4. Paraphrased questions

Answer: C. Exact codes, IDs or rare names

Explanation

Lexical matching excels at exact tokens such as "ERR-4021"; embeddings excel at meaning.

Step-by-step solution

  1. Embeddings capture meaning and may blur exact strings like ERR-4021 or a rare surname.
  2. Keyword search matches those exact tokens directly.
  3. So BM25 wins for codes, IDs and rare names.

Why the other options are wrong

  • A. Synonyms are where embeddings shine; keywords miss them.
  • B. Cross-language queries need multilingual embeddings; keywords fail.
  • D. Paraphrases are matched by meaning, which suits embeddings.

Tip: Exact identifiers: keywords. Same idea, different words: embeddings.

Question 9Hard

Why must documents be re-embedded if you switch to a different embedding model?

  1. The old vectors become encrypted
  2. New models need longer documents
  3. Vector databases expire data monthly
  4. Their spaces differ

Answer: D. Their spaces differ

Explanation

Each model defines its own vector space; mixing them gives meaningless similarities.

Step-by-step solution

  1. Each embedding model learns its own vector space.
  2. A vector from model X and one from model Y are not comparable, even if the same size.
  3. So all documents must be re-embedded with the new model.

Why the other options are wrong

  • A. Vectors are not encrypted by a model change.
  • B. Document length is unrelated to switching models.
  • C. Vector databases do not expire data on a schedule.

Tip: New embedding model = re-index everything.

Question 10Hard

Embedding dimensions are 768 and you store 1,000,000 chunks as 4-byte floats. Roughly how much raw memory do the vectors need?

  1. About 768 MB
  2. About 300 MB
  3. About 30 GB
  4. About 3 GB

Answer: D. About 3 GB

Explanation

768 x 4 bytes x 1,000,000
= 3.07 x 10^9 bytes, about 3 GB.

Step-by-step solution

  1. Bytes per vector = 768 x 4 = 3,072.
  2. Total = 3,072 x 1,000,000 = 3.07 x 10^9 bytes.
  3. That is about 3 GB.

Why the other options are wrong

  • A. 768 MB forgets the 4 bytes per float.
  • B. 300 MB is ten times too small.
  • C. 30 GB is ten times too large.

Tip: Memory = N x d x bytes; 1 million x 1 KB is about 1 GB.

Practise all 15 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 Generative AI & LLMs topics · All topics