What is an embedding, and why do we use vector similarity instead of keyword matching to find related text?

technical-conceptual · Junior level · data-ml

What the interviewer is really asking

Assess whether the candidate understands that embeddings encode meaning as vectors and that similarity search captures semantic relatedness that exact keyword matching misses.

What to say

What to avoid

Example answers

Strong: For a semantic search feature I embedded every support article and the user's query with the same embedding model, then ranked articles by cosine similarity to the query vector. A question phrased as 'my card was declined' surfaced the 'payment failed' article even though they share almost no words, which keyword search never managed.

Weak: An embedding is basically a compressed or hashed version of the text so you can store it more cheaply.

Want questions matched to your role? Paste a job title, job description, or CV and get a personalized set, or go Pro to unlock the full bank.