New Tool Radar

AI Concepts

How to Choose an Embedding Model for a Document Collection

Compare embedding models by dimensions, input limit and cost, then check the pick fits your vector store.

Schematic with three steps: List the candidates and their dimensions; Check the input limit and the cost; Pick one and record the reason.

An embedding is a list of floating-point numbers, a vector, that captures the semantic meaning of content, and the model you choose decides how many numbers each vector holds. OpenAI text-embedding-3-small produces 1536-dimensional vectors, text-embedding-3-large produces 3072-dimensional vectors, and both support reducing dimensions with a dimensions parameter. The choice matters because changing models later means re-embedding everything.

What you need

  • The size of your document collection
  • Your vector store and the vector size it expects
  • A note of your budget per million tokens

Step 1: List the candidates and their dimensions

Write down each candidate model and its dimensions: text-embedding-3-small at 1536, text-embedding-3-large at 3072, text-embedding-ada-002 at 1536, and a local option such as all-MiniLM-L6-v2 at 384. The dimensions must match the size your store was created with.

Step 2: Check the input limit and the cost

Check the maximum input tokens per call, 8,191 for the OpenAI text-embedding-3 models, and the price per million tokens. The small model is the cost-efficient default; the large model is for retrieval-critical work.

Step 3: Pick one and record the reason

Choose the small model for most collections and the large model only when retrieval quality is the bottleneck. Record the model name and dimensions with the collection, so a later change is a deliberate re-embedding, not an accident.

Worked example: synthetic embedding model comparison

The table below is a synthetic example. It shows the expected result of comparing models; no model was called.

Model Dimensions Best for
text-embedding-3-small 1536 General purpose, cost-efficient
text-embedding-3-large 3072 Higher accuracy, retrieval-critical
text-embedding-ada-002 1536 Legacy – avoid for new work
all-MiniLM-L6-v2 384 Free local use

Expected result (UNTESTED). text-embedding-3-small is picked for the general collection at 1536 dimensions, and the large model is kept for the retrieval-critical subset only. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • Changing the embedding model means re-embedding the whole collection; the old vectors cannot be reused.
  • Reducing dimensions with the dimensions parameter trades a small accuracy loss for faster search and lower storage.
  • A model that scores well on a leaderboard may not win on your own documents; measure on your test set.
  • Embeddings capture meaning, not facts; a vector cannot prove a claim is true.

Sources

See all