Mid

How do you choose an embedding model?

How to answer it in an AI engineer interview: what is being tested, a step-by-step framework, a sample answer and the mistakes to avoid.

$19.99 on Gumroad, instant download40% off with code EARLYBF until Nov 3, 11:59 PM PTEARLYBF: 40% off until Nov 3

Smaller start: Score your answers against 50 rubrics, $9. 50 AI engineer questions, one rubric each, PDF on Gumroad.

Practiced one out loud? Paste your answer into the free self-check and get a score in 30 seconds

What the interviewer is testing

Whether you pick embedding models with your own evaluation rather than a leaderboard rank, and whether you think about the operational costs of changing models later.

Answer framework

  1. Build a small eval set of real queries with the documents that should be retrieved.
  2. Shortlist candidates using public leaderboards such as MTEB as a starting point only.
  3. Compare recall@k and MRR on your eval set.
  4. Weigh practical factors: languages, domain fit, max input length, vector dimension (storage and speed), cost or hosting, and query vs document modes.
  5. Record the model and version with the index, since switching models means re-embedding everything.

Sample answer

I start with our data, not a leaderboard. I collect one to two hundred real or realistic queries and label which chunks should come back for each. Public leaderboards such as MTEB help me shortlist three or four candidates, but their tasks rarely match our domain, language mix or document style.

For each candidate I index the same chunks and measure recall at 10 and mean reciprocal rank. Then I weigh the practical side. Does it support all our languages? Is the max input length long enough for our chunks? A 3072-dimension vector costs more storage and search time than a 768-dimension one, which matters at hundreds of millions of chunks. Hosted models are easy but send data out; open models need serving but give control. Some models expect different prefixes for queries and documents, and getting that wrong hurts results.

Finally I store the model name and version with the index. Embeddings from different models are not comparable, so a model change means re-embedding the whole corpus, and I plan that as a migration.

Likely follow-ups

Would you fine-tune an embedding model? When the domain vocabulary is unusual and you have query-document pairs; measure the gain on held-out queries first.

Common mistakes

The PlaybookWant the full method?

The 0 to 1 AI Engineer Interview Playbook covers the answer frameworks, system-design walkthroughs and an 8-week plan.

Get the playbook 40% off with code EARLYBF until Nov 3, 11:59 PM PTEARLYBF: 40% off until Nov 3

Smaller start: Score your answers against 50 rubrics, $9. 50 AI engineer questions, one rubric each, PDF on Gumroad.

Interviewing for PM or TPM? See the full PM package, $59 on Gumroad: a resume system, a PM, TPM and PGM interview handbook, a 1:1 cheat sheet and a PM playbook. PM and TPM content, not AI engineer prep.

Related questions

Based on question #34 in the full question bank.