SXF GUIDES / MODEL RESEARCH

Best AI Embedding Models for RAG in 2026:
Gemini vs Cohere

A rigorous comparison of Google Gemini Embedding 001 and 2 with Cohere Embed 5 Pro and Fast: real API costs, vector storage, model compatibility, multimodal retrieval, Python implementation, and how to evaluate search quality without marketing hype.

QUICK ANSWER

The best embedding model for RAG depends on retrieval quality, input modality and total operating cost—not a leaderboard headline.

Gemini Embedding 001 offers a documented low-cost text-only API; Gemini Embedding 2 extends that choice to text, images, audio, video and PDFs with an 8,192-token text limit. Cohere Embed 5 Pro prioritizes retrieval quality across complex enterprise material, while Embed 5 Fast targets lower latency and greater throughput. Pro and Fast can share a Cohere Embed 5 vector space; the Google 001 and Embedding 2 vector spaces are not interchangeable. There is no defensible universal winner without testing on your own labeled queries.

The right production decision combines Recall@K or nDCG@K, vector storage, query-time latency, reranking gains, multimodal requirements, privacy and the actual deployed price contract. This guide separates provider facts from engineering estimates and makes those trade-offs explicit.

Best embedding models for RAG: detailed comparison

An embedding model maps an input to a vector so related items can be found by mathematical similarity. It does not, by itself, cite documents or write an answer. A generative model and a retrieval pipeline handle those parts. This table covers four directly relevant models rather than mixing embedder pricing with reranking or text-generation charges.

Public Google Gemini Developer API price references; Cohere commercial rates vary by route and plan
ModelInputDocument limitVector sizePricing guidance
Gemini Embedding 001Text2,048 text tokens3,072 default; 768/1,536 suggested$0.15/M text tokens Standard; $0.075/M Batch
Gemini Embedding 2Text, images, audio, video, PDF8,192 text tokens3,072 default; 128–3,072 configurable$0.20/M text tokens Standard; $0.10/M Batch; other modalities separately metered
Cohere Embed 5 ProText and multimodal128K catalog context2,048 default; smaller choices availableCheck hosted API versus Model Vault contract
Cohere Embed 5 FastText and multimodal128K catalog context2,048 default; smaller choices availableCheck hosted API versus Model Vault contract

Important: input limits are provider API specifications, not equivalent proof of long-document retrieval performance. In practice, chunk documents carefully and verify the actual per-item limits of your chosen endpoint. “128K context” is not a reason to embed an entire unstructured report as one vector.

Conceptual chart of separate Gemini and Cohere vector spaces, showing why migrating between incompatible embedding models requires rebuilding vectors
Figure 1. Embedding spaces are learned coordinate systems. Equal vector lengths do not make vectors cross-compatible. Diagram by SXF / AI; not measured model performance.

Embedding dimensions, storage and retrieval quality

A 3,072-dimensional float32 vector stores 3,072 numbers, or 12,288 raw bytes before index structures, IDs, metadata, replicas and compression. Reducing the dimension to 768 cuts raw vector storage by 75%, but can change ranking quality. Use a retrieval validation set to decide whether that trade-off is acceptable.

Raw float32 storage; decimal gigabytes; excludes index overhead
DimensionsBytes per vectorOne million vectors
7683,0723.072 GB
1,5366,1446.144 GB
2,0488,1928.192 GB
3,07212,28812.288 GB

Google recommends 768, 1,536 and 3,072 dimensions for Embedding 001; it documents Matryoshka Representation Learning to support shorter embeddings. Embedding 001 requires manual normalization of shortened vectors for cosine or dot-product comparisons, while Embedding 2 documents automatic normalization. Cohere Embed 5 offers dimension controls; do not assume different providers use the same preprocessing or similarity normalization.

Embedding API pricing: what does one million documents cost?

The most useful number is the total text input token count, not the number of documents. If one million documents average 500 tokens each, the indexing workload is approximately 500 million input tokens. At public Gemini Developer API text prices, the arithmetic is:

Illustrative input embedding charges only, excluding storage, images, audio, reranking and generation
Gemini API modeRate per 1M text tokens500M tokens
Embedding 001 Standard$0.15$75.00
Embedding 001 Batch$0.075$37.50
Embedding 2 Standard text$0.20$100.00
Embedding 2 Batch text$0.10$50.00

A full RAG bill also includes parsing documents, hosted vector index RAM and disk, update or re-embedding frequency, query-time embeddings, hybrid search, reranking, LLM input/output tokens, observability and retries. A cheaper embedding token rate can lose its advantage if the retrieval model requires much heavier indexes or returns poorer candidates that need a more expensive reranker.

Cohere pricing requires a separate check. Its public deployment options include API services and dedicated Model Vault. Model Vault hourly instance quotations are not equivalent to per-million-token API rates, and the site catalog does not currently store a complete comparable public rate contract for every Embed 5 route. Rather than invent a per-token price, use Cohere's official pricing page and the contract for your serving channel.

For budgeting, split recurring query embedding cost from one-time ingestion cost. If your corpus changes daily, estimate the fraction of documents replaced and index storage overhead instead of multiplying total corpus cost every day.

Gemini Embedding 001 vs Gemini Embedding 2

Gemini Embedding 001 is Google's established text-only embedding model, suitable for semantic search over articles, customer tickets and text chunks. Its documented input limit is 2,048 tokens. Use different task types such as RETRIEVAL_DOCUMENT for indexed passages and RETRIEVAL_QUERY for search queries. Its current published Standard input price is $0.15 per million text tokens.

Gemini Embedding 2 handles images, audio, video and PDFs as well as text in a unified multimodal embedding space. For text it offers an 8,192-token input limit, with output dimensions configurable between 128 and 3,072. Its Standard rate for text is $0.20 per million tokens; image, audio and video prices use different meters and must not be compared as if they were pure text tokens.

The API task instructions also differ: Embedding 001 has a task-type parameter, while Embedding 2 uses natural-language instructions in the prompt instead of the same task-type control. Most importantly, the vector spaces are not compatible. To migrate, re-embed both your documents and queries; do not mix both generations in one nearest-neighbor index even if their vectors happen to share the same dimensionality. Google's official embeddings documentation covers these differences.

Choose Embedding 001 when your existing text-only index performs adequately and operational stability outweighs the newest modalities. Evaluate Embedding 2 for multimodal documents, longer text chunks or new greenfield deployments. Google's live model lifecycle documentation should inform any long-term maintenance plan.

Cohere Embed 5 Pro vs Embed 5 Fast

Cohere separates its fifth-generation Embed family into Pro and Fast. Pro is positioned for retrieval quality in demanding enterprise workflows and Fast for low latency and throughput. Both support multilingual/multimodal retrieval use cases. They share an Embed 5 vector space, so it can be reasonable to compare a Pro-based document index with a Fast-based query path—subject to the vendor's supported settings and a production evaluation.

This shared-space capability is an architectural advantage, not a claim of identical accuracy. You should still benchmark the Pro–Pro, Fast–Fast and Pro–Fast combinations with the same index, language mix and query distributions. Check whether query-time and document-time endpoints impose different input formats, rate limits, and latency expectations.

Cohere Embed v4.0 remains an earlier-generation multimodal alternative. Do not assume Embed v4.0 vectors can be mixed into an Embed 5 index. Cohere's model-provider guide also explains the distinction between Embeddings and Rerank 4.

Switching embedding models without breaking search

A vector index encodes learned geometry. Even with the same number of dimensions, two differently trained models can map identical text to unrelated coordinates. A migration is therefore a data engineering project, not a simple change to a model ID.

  1. Version every vector. Store embedding model, dimensionality, input normalization, document checksum and indexing timestamp.
  2. Create a parallel index. Re-embed the representative corpus with the candidate model. Do not overwrite your current production vectors.
  3. Run duplicate queries. Generate query vectors with the matching model and route to the matching candidate index.
  4. Measure retrieval. Compare Recall@5/10, MRR, nDCG@10, multilingual slice performance and answer faithfulness.
  5. Inspect failure cases. Pay attention to OCR-heavy passages, code, tables, negation, long documents and permissions-based filters.
  6. Roll out gradually. A/B test latency, operating cost and retrieval relevance; keep rollback until the new index is complete.

How to build a production RAG pipeline with these embeddings

Seven-stage production RAG diagram: document ingestion, chunking, embedding, hybrid search, reranking, answer generation and evaluation
Figure 2. The end-to-end RAG pipeline. Embedding choice affects retrieval but does not replace access controls, reranking or evaluating final grounded answers.

For document-heavy workflows, parse PDFs into structured paragraphs or tables, clean duplicated boilerplate, and preserve page numbers and access-control lists. Tokenize or estimate chunk sizes using the endpoint's tokenizer or documented token-counting route; character counts alone are unreliable. Use stable chunk IDs and include metadata such as tenant, title, source, section and revision.

Build a hybrid index combining lexical terms with vector similarity if users search for IDs, filenames or exact legal clauses. Add metadata filters before returning results, rather than relying on the answer generator to hide unauthorized text. A reranker such as Cohere Rerank 4 Pro can reorder the top candidates; compare this against a no-rerank baseline because the latency and billing can outweigh marginal gains on small collections.

Finally, pass the selected source chunks to a generative model and require citations to source document IDs. Measure answers for unsupported statements as well as relevance; a vector match is only a retrieval signal, not a truth certificate.

Python API examples: Gemini and Cohere embeddings

Google Gemini Embedding 001

Use the supported google-genai SDK and an environment-provided GEMINI_API_KEY. For an index of 768-dimensional vectors, the same model and dimension must be used for the query side.

from google import genai
from google.genai import types

client = genai.Client()
result = client.models.embed_content(
    model="gemini-embedding-001",
    contents="Refunds can be requested within 30 days.",
    config=types.EmbedContentConfig(
        task_type="RETRIEVAL_DOCUMENT",
        output_dimensionality=768,
    ),
)
vector = result.embeddings[0].values
print(len(vector))  # 768

For Embedding 001, manually normalize reduced-dimensional vectors before cosine or dot-product search. Google documents different multimodal request handling and normalization behavior for Embedding 2; follow its current migration and SDK examples rather than reusing task-type arguments without checking.

Cohere Embed 5 Fast

Install cohere, set CO_API_KEY and use the SDK's documented v2 embedding shape. Cohere's Embed 5 interface accepts content blocks rather than a universally interchangeable raw text API for every version.

import os
import cohere

co = cohere.ClientV2(api_key=os.environ["CO_API_KEY"])
response = co.embed(
    model="embed-v5.0-fast",
    input_type="search_document",
    embedding_types=["float"],
    inputs=[{"content": [
        {"type": "text", "text": "Refund requests close after 30 days."}
    ]}],
)
print(response)  # Inspect vectors and usage fields

Use Cohere's Embed model guide and API reference for model availability and exact input/response shapes. Never expose either provider's secret API key in a public web page.

Evaluation: how to decide which embedding model is actually best

Vendor benchmark charts are useful for shortlisting but cannot establish which model wins your own retrieval workflow. A defensible RAG evaluation begins with real queries and an independently labeled set of relevant document IDs. For instance, use 300–1,000 queries sampled across popular topics, long-tail searches, multiple languages, out-of-scope questions and known failure cases; the exact sample size should be justified by your error tolerance.

Operational evaluation checklist
MetricWhat it measuresCommon failure it exposes
Recall@KFraction of relevant documents in top KMissing useful evidence
nDCG@KQuality of graded orderingImportant documents buried lower
MRRRank of the first relevant hitBad first result
P50/P95 latencyTypical and tail response timesSlow user-facing retrieval
Cost per successful answerAll pipeline cost divided by accepted answersCheap embedding but expensive failures
GroundednessAccuracy of final response against evidenceHallucinated or unsupported answers

Control the experiment: identical corpus, same chunk boundaries, equivalent permissions, equal retrieval K, same vector index algorithm and tuned parameters. Separately test what changes when reranking or query expansion is added. Record uncertainty and never promote a provider-reported benchmark as your own independent result.

Which AI embedding model should you pick?

TEXT + PRICE SENSITIVITY

Test Gemini Embedding 001

Good starting candidate for text-only retrieval when $0.15 per million Standard tokens and the 2,048-token input limit fit your system, including existing indexes.

MULTIMODAL CORPUS

Test Gemini Embedding 2

Prioritize if your search crosses images, audio, video, PDFs and text; account for separate non-text meters and a mandatory re-embedding migration from Embedding 001.

RETRIEVAL QUALITY FOCUS

Test Cohere Embed 5 Pro

Consider for multilingual and complex enterprise content. Measure its contribution to relevant-document recall, not just model-card positioning.

INTERACTIVE QUERY LATENCY

Test Cohere Embed 5 Fast

Evaluate for high-throughput, latency-sensitive search and potential shared-space use with Embed 5 Pro.

If none of these is acceptable, consider Codestral Embed for coding-oriented retrieval or other indexed specialist families—but only compare datasets and vendor billing units that are genuinely comparable. Also review SXF model pricing for sourced pricing policy and the individual model pages for updates.

Embedding models for RAG: frequently asked questions

What is the best embedding model for RAG?

There is no universal best model. Evaluate retrieval quality, supported input types, cost, vector dimensions, language support, latency and embedding-space compatibility on a labeled corpus. Gemini Embedding 001, Gemini Embedding 2, Cohere Embed 5 Pro and Fast are practical candidates for different requirements.

Is Gemini Embedding 2 better than Gemini Embedding 001?

Embedding 2 supports more input modalities and longer text inputs. Whether it improves your retrieval ranking depends on the actual corpus. Its vectors cannot be mixed directly with Embedding 001 vectors.

How much do Gemini embeddings cost?

For paid Standard text inputs, Gemini Embedding 001 is listed at $0.15 per million tokens and Embedding 2 at $0.20. Their Batch text rates are $0.075 and $0.10. Non-text modalities and downstream RAG costs are separate.

Can I mix Cohere Embed 5 Pro and Fast vectors?

Cohere documents a shared embedding space for Embed 5 Pro and Fast, enabling supported mixed use. Verify consistent dimensions and evaluate retrieval quality. Do not extend this assumption to older Embed versions or other providers.

Can Gemini and Cohere embedding vectors share one index?

No. Separate model families have independent learned coordinate systems. Store and search vectors generated by the matching model and dimensionality. A migration normally requires re-embedding both documents and queries.

Do I need a reranker with embeddings?

Not always. A reranker can improve relevance after initial vector or hybrid retrieval, but it increases cost and latency. Compare Recall@K and downstream grounded-answer quality with and without the reranker.

What vector dimensions should I use?

Test 768, 1,536, 2,048 or 3,072 where each model supports them. Smaller vectors reduce raw float32 storage, but the retrieval-quality trade-off depends on data and model. Keep document and query dimensions identical.

What does it cost to embed one million documents?

It depends on total text tokens, not document count. If each document averages 500 tokens, 1 million documents mean about 500 million input tokens. At Gemini Embedding 001 Standard text pricing, the illustration is $75 before index storage and retrieval costs.

Official documentation and research method

Primary-source verification focuses on public model cards, API guides, and billing tables. Figures for cost and raw vector storage are transparent arithmetic, not a performance benchmark. The article does not assert that a provider universally outperforms the others. Check release lifecycle, model IDs, regional access and pricing before production use.

Editorial method: official specifications and pricing are identified as provider claims; example token bills are calculations; retrieval recommendations are engineering guidance requiring workload-specific validation.