How Do You Choose an Embedding Model?
How to pick an embedding model by testing it on your own data, weighing cost and privacy, and planning for a switch later, explained simply for your AI interview.
In short
Test two or three candidate models on your own real questions, then pick the one that finds the right text most often at a cost, speed and privacy level you can accept. Public leaderboards are only a starting point.
12 min readIntermediateCommon · estimateFacts checked 26 November 2026
Say it out loud
Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.
An embedding model turns text into a list of numbers, so texts with similar meaning sit close together. To choose one, I start with the job: what text I have, how much, which languages, and where it is allowed to go. Then I test two or three candidates on real questions where I already know the right answer. I pick the one that finds the right text most often at a fair cost and speed. Public leaderboards help me shortlist. My own test settles it.
An embedding model turns each piece of text into a vector, which is a list of numbers. Texts with similar meaning get vectors that sit close together, and that is how search finds a clause matching a question even when the words differ. Choosing a model means choosing how that map of meaning is drawn for your kind of text.
I start with the job. What is the text, how long is each chunk, which languages are involved, and where is the data allowed to go? A hosted model means sending your text to a vendor. An open model that runs on your own servers keeps it in house, but someone has to run and update it. Each model also has a maximum input length, so every chunk has to fit.
Then I test. Public leaderboards are useful for a shortlist, but they test general tasks, and no single model wins them all. So I take a few hundred real questions where we know the right document, embed the documents with two or three candidates, and count how often the right document lands in the top three results. Ten questions are too few to trust. A few hundred show which model really wins.
Last, I weigh the result against cost, speed and vector size, and I plan for change. Switching models means re-embedding every chunk and rebuilding the index, so I decide early and keep the test set, so I can check any future model fairly.
What is an embedding model, in plain words?
An embedding model reads a piece of text and returns a vector, which is a list of numbers. The numbers are a position on a map of meaning. Texts that mean similar things land close together, so a search can match a question to a clause even when they share few words.
Think of a records clerk at an insurance firm who files each claim under a short code, so similar claims sit in the same drawer. A different clerk with a different filing system would put the same claims in different drawers. Your search only works as well as the filing system, and the model is that system.
If you later change to a different model, every chunk must be turned into vectors again with the new model. That is called re-embedding.
Key words
- Vector
- A list of numbers that stands for the meaning of a piece of text.
- Chunk
- A slice of a document, such as one clause or paragraph, that gets its own vector.
- Input limit
- The most text a model reads in one go. Longer chunks do not fit.
- Index
- The stored set of vectors that search runs over.
- Open-weight model
- A model whose files you can download and run on your own servers.
How do you test models on your own data?
Say an insurance firm wants to search its policy wording to answer claim questions. It has 300 past questions, and a claims handler marked the right policy clause for each one. Each candidate model gets the same chunks and the same questions, and we check whether the right clause shows up in the top three results.
Testing candidate models on your own questions
Your docs and questions
real files and past queries
Hosted model (API)
you send text to the vendor
Open model on your servers
text stays on your own servers
Score each one
right answer in the top results?
Pick the best fit
accurate enough, fast, fair cost
- 1The same files and questions go to the hosted model.
- 2The same files and questions go to the open model, so the test is fair.
- 3The hosted model's answers go to scoring.
- 4The open model's answers go to scoring the same way.
- 5The best score at a fair cost is chosen.
- 1
Build the test set
Collect a few hundred real questions with the right chunk marked. Take them from the claims team's logs.
- 2
Embed each chunk with each candidate
Embedding means turning each chunk into a vector. Keep the chunking and the documents the same for every model, so only the model changes.
- 3
Measure how often it finds the answer
Count how often the right chunk is in the top three. Made-up numbers for illustration: one model found it 81 times in 100, another 88 times.
The open model wins here, but that is not free: someone has to run, patch and update it on your own servers. The script below is the same idea in miniature. It uses ten made-up questions and counts how often the right clause lands in the top three. Ten is far too few for a real decision, but it shows the logic.
# Score two embedding models on the same past questions (made-up numbers).
# Each number is the rank where the right policy clause came back; 1 is the top result.
TOP_K = 3
ranks = {
"Model A (hosted)": [1, 4, 2, 1, 7, 3, 2, 1, 9, 2],
"Model B (open, own servers)": [1, 2, 1, 3, 2, 1, 5, 1, 2, 2],
}
def hits(found):
return sum(1 for r in found if r <= TOP_K)
for name, found in ranks.items():
print(f"{name}: right clause in top {TOP_K} for {hits(found)} of {len(found)} questions")
best = max(ranks, key=lambda name: hits(ranks[name]))
print("Pick:", best)Output
Model A (hosted): right clause in top 3 for 7 of 10 questions Model B (open, own servers): right clause in top 3 for 9 of 10 questions Pick: Model B (open, own servers)
Why don't public leaderboards settle it?
- Quality
It depends on your data
The top model on a public test can trail on your claims notes. Anthropic's guide says larger or more domain-specific data generally gives better embeddings for text in that domain.
- Cost
Vectors cost to keep
Bigger vectors need more storage, memory and search time. Test whether the extra size helps your results at all.
- Control
Where the text goes
A hosted model sends your text to a vendor. An open model on your servers keeps it in house, but someone has to run it.
Anthropic's embeddings guide says it does not offer its own embedding model, and tells readers to assess a variety of vendors for their use case. Researchers who built the MTEB benchmark (a public test that runs embedding models on many tasks) found the same thing from the other side: no single method wins every task.
“Anthropic does not offer its own embedding model.”
Anthropic
“We find that no particular text embedding method dominates across all tasks.”
The MTEB researchers
“Using larger embeddings, for example storing them in a vector store for retrieval, generally costs more and consumes more compute, memory and storage than using smaller embeddings.”
OpenAI
What about vector size, input limits and switching later?
Some models let you shorten the vector, which is the count of numbers in it. OpenAI's guide says a dimensions setting shortens an embedding while keeping its ability to represent concepts. Anthropic's guide says models with several output sizes, such as voyage-code-4, generate Matryoshka embeddings. These pack a rough summary and finer detail into one vector.
Check the input limit too. Each model reads only so much text at once, counted in tokens (small pieces of text, roughly words). Anthropic's guide, which points to Voyage AI's models, says the total number of tokens across all inputs has a cap, so plan chunk sizes around the model you pick. Check the languages as well. Test each language your users write in, using real questions from those users.
Switching models means building the index again
Stored vectors
made by the old model
Re-embed every chunk
reads each chunk, costs time and money
Rebuild the index
all vectors from the new model
Queries use the new model
same model for questions and files
- 1Old vectors are set aside, because they cannot be compared with new ones.
- 2The new vectors are stored together to form a fresh index.
- 3The new index is built, and questions go through the same new model.
Microsoft's guidance for Azure AI Search says to always use the same embedding model for the stored documents and the queries. So a switch means re-embedding every chunk and rebuilding the index. Old and new vectors are never mixed.
Tip
Keep the test set after you launch. When a new model comes out, build the new index beside the old one, run the same test questions against both, and switch only if the new one wins on your data.
How would you choose a model for a legal team's contract search?
A legal team has 40,000 contracts, and lawyers ask questions like which contracts let either side end the deal early. The contracts cannot leave the firm, so hosted models need a close look. I would build a test set from questions lawyers really asked and check that long clauses fit each input limit.
- 1
Test with real questions
Use questions the lawyers asked last year, with the right clause marked by a senior associate.
- 2
Check privacy before any vendor
If the contracts cannot leave the firm, an open model on the firm's own servers is the first candidate to test.
- 3
Plan the re-index before go-live
Write down the cost and time to re-embed 40,000 contracts, so a later switch is a planned job, not a surprise.
What does the interviewer want to hear?
A strong answer covers
- Start from the job: the text, its length, its languages and where the data may go.
- Test on your own real questions with the right answer marked, not on a public leaderboard alone.
- Weigh accuracy against cost, speed and vector size.
- Know that switching models means re-embedding everything and rebuilding the index.
- Check that the input limit fits your chunks.
- Say how you would know the choice is good enough, and what result would change your mind.
Common traps
Trap"Pick the model at the top of the leaderboard."
BetterLeaderboards test general tasks. Test on your own questions, since no one model wins them all.
Trap"A bigger vector is always more accurate."
BetterBigger vectors cost more to store and search. Check whether the extra size helps your results.
Trap"We can switch models later for free."
BetterA switch means re-embedding every chunk and rebuilding the index. Plan it like a migration, with a cost and a date.
Can you spot the weak plan?
Spot the weak plan
A team is choosing an embedding model for its support search. Which plan is the weak one?
Quick check
Next month you switch from the current model to a new one. What must happen to the stored vectors?
Can you answer these from memory?
Flash cards · tap a card to flip it
What will they ask next?
- Q117What is a vector database?12 min
- Q118Cosine vs dot product vs Euclidean distance?11 min
- Q114Fixed vs recursive vs semantic chunking?12 min
- Q154Sparse vs dense embeddings?Coming soon
- Q301How do you fine-tune embedding models?Coming soon
Learn it in depth
Last updated on 26 November 2026
Choosing a model for search over your real documents?
I design and build AI search and agents, including how each model is tested on your own data before launch. Book a short call and tell me what you need to search and where that data has to live.