Azure AI Search: Do I need to truncate dimensions when using AzureOpenAIEmbeddingSkill with Dimension parameter set?

mathias Herbaux 0 Reputation points
2025-03-05T16:26:37.3466667+00:00

Hello,

Following the documentation here: https://learn.microsoft.com/en-us/azure/search/vector-search-how-to-configure-compression-storage

we can use lower dimension vectors if our embedding model is text-embedding-3-large or small.

My understanding might be incorrect but:

  • With the AzureOpenAIEmbeddingSkill we can specify the dimension of vectors we want to store in our vector field.
  • And with the binary quantization, we can truncate to the desired dimension so that it match our vector field.

I'm using the AzureOpenAIEmbeddingSKill with a dimension of 512

My vector field is a collection of single, dimension is 512.

I'm using binary quantization compression.

I don't see the point of truncating via the binary quantization compression. In my understanding, it would make sense only if I did not set a dimension on AzureOpenAIEmbeddingSkill which in this case would return vectors with dimension > 512

Is it correct?

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,222 questions
{count} votes

Accepted answer
  1. santoshkc 13,340 Reputation points Microsoft External Staff
    2025-03-10T03:43:07.65+00:00

    Hi @mathias Herbaux,

    Thank you for reaching out to Microsoft Q&A forum!

    Azure OpenAI’s text-embedding-3 models support Matryoshka Representation Learning (MRL), which allows multi-level compression for faster searches and reduced storage costs. In Azure AI Search, MRL can be used alongside binary or scalar quantization, enabling dimensionality reduction through the truncationDimension property.

    Since you're setting dimension=512 in AzureOpenAIEmbeddingSkill, your embeddings are already at a reduced size. Truncation is only necessary if your embeddings exceed 512 dimensions (e.g., text-embedding-3 models typically output 1,536-dimensional vectors). In your case, binary quantization is still beneficial for optimizing storage and query performance, but truncation isn't required.

    I hope you understand! Thank you.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.