Skip to content
Quantoros

What is embedding dimensionality and how does it affect performance?

NLPLevel: IntermediateEmbeddings Fundamentals

What is embedding dimensionality and how does it affect performance?

Hints
  • Which information should a lower-dimensional representation preserve?
  • Check centering, scaling and the difference between projection and feature selection.

Answer

Higher dimensionality = more expressive, better quality — at the cost of storage and compute:

DimensionsStorage per vectorANN search speedQuality
3841.5 KBFastGood for many tasks
7683 KBModerateStrong general quality
15366 KBSlowerHigh quality (text-embedding-3-small)
307212 KBSlowBest quality (text-embedding-3-large)

For 10M vectors at 1536 dims: 60 GB storage. Many systems use dimension reduction (PCA, Matryoshka Representation Learning) to truncate to smaller dimensions without proportional quality loss.

Matryoshka embeddings (OpenAI text-embedding-3): trained so that the first N dimensions form a valid embedding of quality proportional to N. You can truncate from 3072 to 256 and still get usable quality.

Source and licence: JustInCache & contributors — Awesome AI Interviews · Apache-2.0

Related questions