An embedding is a vector representation of text, produced by a model trained so that passages with similar meaning end up close together, which lets you search by meaning rather than exact words. Choose a model by testing it on your own queries and documents, not on a public leaderboard alone, and weigh language coverage, domain fit, vector size, cost and latency. Changing models later means re-embedding the whole corpus, so choose deliberately.
Why interviewers ask this
This checks that you understand what retrieval is actually doing rather than treating vector search as magic. The interviewer wants a plain explanation of similarity in vector space and evidence that you choose models using your own data. They also want the operational catch: embeddings from different models are not compatible, so a model change means a full reindex, which matters a great deal once the corpus is large.
How to structure your answer
- Explain an embedding in one or two plain sentences.
- Say why closeness in vector space enables semantic search.
- List your selection criteria and how you test them.
- Mention the reindexing cost of switching models.
Example answer
An embedding is a list of numbers that represents a piece of text, produced by a model trained so that texts with similar meaning land near each other. That is what lets a search for how do I claim expenses find a passage titled reimbursement process, even though they share almost no words. When I choose a model, public benchmarks give me a shortlist, but the decision comes from my own data. I take a few hundred real queries with known relevant passages and measure recall for each candidate. Then I weigh the practical things: does it handle the languages we need, how does it cope with our jargon, how large are the vectors, because that drives storage and search cost, and what does each call cost. I also check the maximum input length, so chunks are not quietly truncated. The catch people forget is that vectors from different models live in different spaces, so you cannot mix them. Switching models means re-embedding everything, so I version the index and run old and new side by side until the new one wins.
Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.
See how it worksFollow-up questions to expect
- What is the difference between cosine similarity and a dot product here?
- How would you handle queries in a different language from the documents?
- When would you consider fine tuning an embedding model?
Related ai engineer questions
Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.
Predict my questions