# text-embedding-3-large

text-embedding-3-large scores 64.6% on MTEB and 54.9% on MIRACL with 3,072-dimensional vectors, the highest in the text-embedding-3 family. Matryoshka dimension reduction lets you shrink the vector size without re-embedding your corpus.

- **Model ID:** `openai/text-embedding-3-large`
- **Type:** embedding
- **Providers:** azure, openai
- **Context window:** Not applicable
- **Maximum output tokens:** 0
- **Pricing:** $0.13/1M input tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/text-embedding-3-large

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

```ts
import { embed } from 'ai';

const result = await embed({
  model: 'openai/text-embedding-3-large',
  value: 'Sunny day at the beach',
})
```

## About

OpenAI released text-embedding-3-large on January 25, 2024 as the accuracy-maximizing option in the third-generation embedding family.

The MTEB (Massive Text Embedding Benchmark) score tells the broadest story. At 64.6%, text-embedding-3-large spans retrieval, classification, clustering, and semantic similarity, outperforming its predecessor ada-002 by 3.6 points. But the multilingual gap deserves close attention. On MIRACL, the standard cross-language retrieval benchmark, the score jumps from ada-002's 31.4% to 54.9%. That 23.5-point improvement is not incremental. It's the difference between a multilingual search system that frustrates users and one that works.

The model uses Matryoshka Representation Learning, a technique that front-loads the most important semantic information into the earliest vector dimensions. The practical consequence: you can request 256 dimensions and still outperform a full 1,536-dimension ada-002 embedding. This turns vector storage and memory from fixed infrastructure costs into tunable parameters. Teams managing indexes with hundreds of millions of documents gain a lever that directly affects their infrastructure bill.

At native 3,072 dimensions, the vectors capture the finest semantic distinctions the model can represent. Reducing dimensions trades some granularity for smaller index sizes, faster nearest-neighbor lookups, and lower memory consumption. The right setting depends on your corpus and application. A legal document search engine and a product recommendation system have very different tolerances for recall degradation.

## What to consider

A practical workflow: embed your corpus at the full 3072 dimensions for archival quality. Then use the `dimensions` parameter at query time to benchmark whether 256, 512, or 1024 dimensions produce acceptable recall for your dataset. This lets you tune the accuracy-storage curve without re-indexing.

## When to use

### Best For

- RAG pipelines and semantic search where the quality of retrieved passages directly determines output quality
- Multilingual and cross-lingual retrieval, where the 23.5-point MIRACL gain over ada-002 reflects real accuracy improvements
- Large-scale vector databases that benefit from tunable `dimensions` to balance precision against storage cost
- Recommendation systems and similarity scoring that demand higher embedding fidelity than text-embedding-3-small
- Teams migrating from ada-002 who want the maximum quality step-up in a single change

### Consider Alternatives When

- Per-token embedding cost is a hard constraint; the smaller variant runs at roughly 6.5x lower cost
- Your texts are short and simple, where the quality gap between large and small models becomes negligible
- Query-time latency is the bottleneck and a lighter model fits your SLA better

## Best for

- **RAG and semantic search:** Pipelines where the quality of retrieved passages directly determines output quality
- **Multilingual retrieval:** Cross-lingual search that benefits from the 23.5-point MIRACL gain over ada-002
- **Large-scale vector databases:** Indexes that benefit from tunable `dimensions` to balance precision against storage cost
- **Recommendation systems:** Similarity scoring that demands higher embedding fidelity than text-embedding-3-small
- **Ada-002 migration:** Teams that want the maximum quality step-up in a single change

## Consider alternatives

- **Tight cost constraint:** The smaller variant runs at roughly 6.5x lower cost per token
- **Short, simple texts:** The quality gap between large and small models becomes negligible on simple content
- **Latency-critical queries:** A lighter model fits your SLA better when query-time latency is the bottleneck

## Frequently asked questions

### How does Matryoshka dimension reduction work in practice?

The model encodes the most semantically important information into the first dimensions of each vector. When you request fewer dimensions via the `dimensions` parameter, you get a truncated vector that retains strong semantic structure. A 256-dimension vector from this model outperforms a full 1536-dimension ada-002 embedding on MTEB.

### What is the MIRACL benchmark and why does the score matter?

MIRACL evaluates retrieval accuracy across multiple languages. text-embedding-3-large scores 54.9% versus ada-002's 31.4%, a 23.5-point gap that translates to substantially better search results when queries and documents are in different languages.

### Can I embed at full 3072 dimensions and query at a lower dimension?

Yes, but the query and document dimensions must match at search time. The recommended approach is to embed your corpus at 3072 for archival accuracy, then re-embed queries at a test dimension to evaluate recall before committing to a reduced index.

### How many dimensions should I use for my application?

It depends on your recall requirements and infrastructure constraints. Start at 3072 and measure recall. If it exceeds your threshold at 1024 or 512, use the smaller size to save storage and speed up lookups. There is no universal right answer; the tradeoff is application-specific.

### Does text-embedding-3-large support batch requests?

Yes. Multiple texts can be embedded in a single API call. For indexing pipelines processing millions of documents, batching is the standard approach to maximize throughput.

### What are typical latency characteristics?

This page shows live throughput and time-to-first-token metrics measured across real AI Gateway embedding traffic.

## Links

- [Model page](https://vercel.com/ai-gateway/models/text-embedding-3-large)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://platform.openai.com/docs/models/text-embedding-3-large)
- [Provider pricing](https://platform.openai.com/docs/pricing)
