Text Multilingual Embedding 002
Text Multilingual Embedding 002 is an 18-language text embedding model achieving a 56.2% average score on the Massive Information Retrieval Across Languages (MIRACL) benchmark, designed for cross-lingual semantic search and retrieval across diverse language corpora.
import { embed } from 'ai';
const result = await embed({ model: 'google/text-multilingual-embedding-002', value: 'Sunny day at the beach',})Providers
Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.
| Provider |
|---|
More models by Google
| Model |
|---|
About Text Multilingual Embedding 002
Text-multilingual-embedding-002 is Google's embedding model purpose-built for multilingual natural language processing (NLP) applications. Released alongside text-embedding-005 at Google Cloud Next '24, it uses the same Gecko architecture but targets cross-lingual coverage rather than maximum English-language benchmark performance. Its primary evaluation benchmark is MIRACL (Massive Information Retrieval Across Languages), covering 18 languages, where it achieves a 56.2% average score.
The practical value lies in vector space alignment across languages. Rather than running separate monolingual models for each language in your corpus, text-multilingual-embedding-002 embeds content from all 18 supported languages into a shared semantic space. A query submitted in one language can surface relevant documents written in any other supported language, without a translation step. For global products, international content platforms, or multilingual knowledge bases, this shared embedding space eliminates the complexity of language detection and routing.
Like its English-only sibling, text-multilingual-embedding-002 supports dynamic embedding sizes through Matryoshka Representation Learning (MRL). You can choose smaller dimension outputs to reduce vector storage and compute costs, with a minor quality tradeoff. This flexibility matters for multilingual applications where the corpus may be significantly larger than a monolingual equivalent.
What To Consider When Choosing a Provider
- Configuration: For multilingual retrieval applications, this model maps text from all supported languages into the same vector space. That enables cross-lingual queries: for example, a user querying in Japanese can retrieve documents written in Spanish without a query translation layer.
- Zero Data Retention: AI Gateway supports Zero Data Retention for this model via direct gateway requests (BYOK is not included). To configure this, check the documentation.
- Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.
When to Use Text Multilingual Embedding 002
Best for
- Multilingual semantic search: Applications serving users who query in different languages than the indexed content
- Cross-lingual document retrieval: Knowledge base search across international content corpora
- Global customer support: Systems where user questions and knowledge base articles span multiple languages
- Multilingual clustering and classification: Tasks that need consistent semantic representations across languages
- International content platforms: E-commerce or media indexing product descriptions or articles in multiple languages
Consider alternatives when
- English-only corpus: Your corpus and users are exclusively English-language (consider
google/text-embedding-005for higher MTEB scores) - Unsupported language needed: You require a language not covered by the 18-language MIRACL benchmark, verify support in the Vertex AI documentation
- Peak English retrieval quality: Multilingual support is not required and maximum English performance is the primary criterion
Conclusion
Text-multilingual-embedding-002 solves the core infrastructure challenge of multilingual retrieval: maintaining a single vector index that serves queries and documents across 18 languages without translation layers or per-language model management. For global applications where your user base and content corpus span multiple languages, it provides the embedding foundation that makes cross-lingual semantic search tractable.