Milvus
Zilliz

What is the embedding dimension of Google embedding 2?

Google’s Gemini Embedding 2 model generates 3072-dimensional vectors by default. This model, also referred to as gemini-embedding-2-preview, is designed for complex retrieval and analytics tasks and supports multimodal inputs including images, text, documents, audio, and video. The embeddings semantically map these diverse inputs into a unified semantic space, which allows for tasks like searching for an image using a text description.

A key feature of Gemini Embedding 2 is its implementation of Matryoshka Representation Learning (MRL). This technique allows for the dynamic scaling down of embedding dimensions while retaining semantic information. Although the default output is 3072 dimensions, developers can specify smaller output dimensionalities, such as 1536 or 768, to optimize for storage efficiency and retrieval speed with minimal loss in accuracy. This flexibility helps in balancing performance and infrastructure costs in various applications.

These high-dimensional vectors, whether at their full 3072 dimensions or a truncated size, are crucial for effective semantic search and retrieval applications. When working with embedding models like Gemini Embedding 2, these vectors are typically stored and indexed in vector databases, such as Milvus. This allows for efficient similarity searches and enables the robust functionality of modern AI applications, including Retrieval-Augmented Generation (RAG) systems. The ability to manage and query these high-dimensional embeddings is a core capability of such databases.

Like the article? Spread the word