LearnThatStack Ace your next interview
Embeddings & Vector Databases · question
Question 5 of 56

What does the dimensionality of an embedding mean, and what are the tradeoffs of higher-dimensional embeddings?

beginner
← All Embeddings & Vector Databases questions
Re-explain

The dimensionality of an embedding is how many numbers each vector holds. The model fixes it, so you rarely choose it yourself. No single number means anything on its own. Meaning comes from all the numbers together.

More dimensions give the model room to record finer distinctions, so quality usually improves. The gains shrink fast, while the costs grow in a straight line. Doubling the dimensions doubles storage and index memory, and roughly doubles the work per distance comparison. Stored as float32, each dimension takes 4 bytes:

  • 384 dimensions: 1,536 bytes, about 1.5 GB per million vectors
  • 1,536 dimensions: 6,144 bytes, about 6.1 GB
  • 3,072 dimensions: 12,288 bytes, about 12.3 GB

A small, well-trained model often beats a weaker model with more dimensions. Judge models on your own data, not on dimension count.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

Why there's no diagram: “”

The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓

The diagram below the answer is the concept . Jump to it ↓

Tailored explanation · switch back to · ·
What should the new diagram focus on?
Guided practice for Embeddings & Vector Databases One question at a time. Answer out loud, get graded, see what you missed.
How well did you know this?
AI:

Saved in this browser - sign in to keep your review list.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Interview lens How interviewers actually use this question

Likely follow-ups

What you can say

  1. Dimensionality is how many numbers each embedding vector holds, and since the model fixes it, you mostly pick it by picking a model.
  2. No single number means anything on its own, only the full set of numbers together carries the meaning.
  3. More dimensions give the model room for finer distinctions, so quality usually goes up, but the gains shrink fast.
  4. The cost grows in a straight line, since each float32 dimension is 4 bytes, so a million 1,536-dimension vectors take about 6 GB and 3,072 dimensions double that.
  5. Doubling the dimensions also roughly doubles the work in every distance comparison, so search gets slower too.
  6. So I don't judge a model by its dimension count, because a small, well-trained model often beats a weaker one with more dimensions, and I test on my own data.

Weak answers to avoid

  • Says each dimension stores one feature Dimensions aren't labeled features like topic or sentiment. The meaning is spread across all of them, so say that and skip made-up examples.
  • Assumes more dimensions always means better The quality gains shrink fast while costs grow linearly. A small, well-trained model often wins, so say you would test models on your own data.
  • Gives no numbers for the cost Saying 'more memory' is vague. Show the math, 4 bytes per float32 dimension times vector count, so 1,536 dimensions is about 6 GB per million vectors.
  • Treats dimension as a free tuning knob Training fixes the dimension for most models, so you choose it by choosing a model. Models trained for truncation are the exception, so name them as that.
Interview lens

Likely follow-ups, what you can say, and the weak answers to avoid.

Sign in free to open it Free account - the lens opens as soon as you're back.

Want a quick review of the fundamentals? See the Embeddings & Vector Databases cheatsheet.

← Back to all Embeddings & Vector Databases questions
Pro · $10/mo

49 of 56 Embeddings & Vector Databases answers are in Pro.

Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.

  • Full answers + code
  • AI explanations, simpler or deeper
  • 1,000 AI credits / month
  • Cancel anytime