Matryoshka embedding models are trained so the first dimensions carry the most information, which means you can truncate the vector to fewer dimensions and keep most of the quality. OpenAI text-embedding-3-large supports this, as does nomic-embed-text-v1.5. The safe way to use it is to test the truncation on your own questions, because the quality loss depends on your data.
Before you start
A Matryoshka-trained embedding model and a test question set with known answer chunks.
Embed once at full size
Embed your chunks at the model’s full dimension count and record recall at 5 on your test questions. This is the baseline that every truncation must be compared against.
Do not re-embed for each size: truncation takes the first N dimensions of the same vector, so one embedding run gives you every size to test.
Truncate and re-test at smaller sizes
Cut the vectors to half, then to a quarter of the full size, and re-run the same questions each time. Record recall at 5 and the index size at each step.
Watch the hard questions first: truncation usually hurts rare-term and paraphrase questions before it hurts easy ones.
Keep the smallest size that still passes
Pick the smallest dimension count whose recall is within one question of the full-size baseline. A smaller index is faster to search and cheaper to store, but only if recall holds.
Record the chosen size with the model name and date, because a different model version may behave differently.
Practice check: fictional Maple Corner docs, 20 questions
The table below is fictional practice material, worked out by hand from the stated recall figures. It is the expected result for the practice set, not a run of any embedding model.
| Dimensions | Recall at 5 | Index size | Verdict |
|---|---|---|---|
| 3072 full | 18 of 20 | 48 MB | Baseline |
| 1536 | 18 of 20 | 24 MB | Pass – same recall |
| 768 | 17 of 20 | 12 MB | Pass – one fewer hit |
| 384 | 14 of 20 | 6 MB | Fail – too much loss |
Truncating to 1,536 keeps recall at 18 of 20 with half the storage. At 384 dimensions recall falls to 14 of 20, so 1,536 is the smallest safe size here.
Expected result. UNTESTED: the recall and size figures in the practice table are worked out by hand, not measured by running an embedding model. Embed your own chunks once, truncate to half and quarter sizes, and re-run your test questions at each size.
Limits
- Truncation only works for Matryoshka-trained models; cutting a normal embedding’s dimensions is not the same thing.
- Smaller vectors also change the ranking slightly, so check the top 1, not just the top 5.
