An embedding model converts each passage of text into a fixed-length vector of numbers such that passages with related meaning end up close together in that vector space, even when they don't share any of the same words. Which retrieval technique exploits this property to find passages relevant to a user's query?
- Exact string matching between the characters of the query and the characters of the document text
- Regular-expression pattern matching against a fixed set of predefined query templates
- Nearest-neighbor search, which embeds the query with the same embedding model and retrieves the passages whose vectors are closest to the query's vector
- Sorting every document by its publication date and returning the most recently added ones, regardless of their content
Why C? And why not the others?
Correct answer: C. Nearest-neighbor search, which embeds the query with the same embedding model and retrieves the passages whose vectors are closest to the query's vector
Because the embedding model places passages with related meaning near each other in vector space regardless of shared vocabulary, the natural way to exploit that property is to embed the incoming query with the same (or a compatible) model and then search for the document vectors nearest to it, retrieving passages that are semantically close even when they use entirely different wording than the query. The option describing exact string matching is wrong because it depends on literal character overlap between query and document, which is precisely the limitation that embedding-based retrieval is designed to overcome. The option describing regular-expression matching against predefined templates is wrong because it can only recognize a fixed set of patterns chosen in advance and cannot generalize to novel phrasing the way a learned vector space can. The option describing sorting by publication date is wrong because it ignores the content and the embedding vectors entirely, so it would surface recent passages regardless of whether they have any semantic relationship to the query at all.
Source: Reimers & Gurevych, 'Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks' (2019), arXiv:1908.10084