Choosing & managing embedding models
Pick an embedding model on your data, then manage dimensions, cost and versions like a schema.
Public leaderboards are a starting list, not an answer. Test two or three candidates on your own documents and questions, measuring recall@k. Things that matter: domain fit, languages, maximum input length, dimensions, latency and price per million tokens.
Dimensions drive storage and search cost. Some models are trained so you can truncate vectors to fewer dimensions with a modest quality loss, which can cut memory several times. Quantizing vectors to smaller numeric types saves more, usually with a small recall penalty you can recover by rescoring top results with the full vectors.
Treat the embedding model as part of your schema. Queries and documents must use the same model and version, so store the model name with every vector and plan a migration path: build the new index alongside the old, compare, then switch. Some models also expect different prefixes or instructions for queries and documents, so follow the model's guidance.
Key points
- Evaluate candidate models on your own data, not only on public rankings.
- Dimensions and numeric precision trade recall against memory and speed.
- Store model name and version with each vector.
- Migrate by building a parallel index, comparing, then switching.
Answer these out loud
- 1Your corpus is half English and half Hindi. What do you test before choosing a model?
- 2You cut dimensions from 1536 to 512. How do you confirm quality held and what do you do if it dropped?
Use this from an agent
Any MCP client, including Grok, can read this lesson. See how to connect.
curl https://engineeros-delta.vercel.app/api/v1/topics/rag-embedding-model-selection