Here is the short version: text-embedding-004 is a capable starting point for semantic search, but the useful question is not whether an embedding model sounds strong. It is whether the model retrieves the right passage for your documents, query style, latency budget, and privacy requirements. A small benchmark against BM25 and a local baseline will tell you more than a leaderboard screenshot.
I approach text-embedding-004 as an engineering component rather than a complete search solution. It converts text into numerical vectors that represent meaning. A vector database can then compare a user query with document chunks using cosine similarity or another distance function. That sounds simple, but chunk boundaries, metadata, query formatting, and evaluation data often matter as much as the model.
What text-embedding-004 actually does
An embedding model maps text to a fixed-length vector. Similar meanings should produce vectors that are close together, while unrelated passages should be farther apart. The result is useful for document search, retrieval-augmented generation, recommendation prototypes, clustering, and duplicate detection.
Google’s text-embedding-004 was designed for text representation through Google’s model APIs and related cloud tooling. In common configurations, developers work with a 768-dimensional output, although the exact endpoint, available options, quotas, and SDK behavior depend on the service version. That detail matters because changing dimensions or normalization settings can require rebuilding an index.
The model does not generate answers, verify facts, or understand your application’s access rules. If a support document contains two versions of a policy, the embedding may retrieve both without knowing which one is current. Retrieval quality still depends on filters, ranking, source metadata, and the prompt given to the downstream language model.
A useful first experiment is deliberately boring. Create 100 to 300 representative queries, label the relevant document or passage, and measure recall at five and ten. Recall at five asks whether the correct result appeared anywhere in the first five retrieved items. That gives you a concrete baseline before you tune anything.

A reproducible text-embedding-004 setup
For a clean test, keep the corpus, chunker, and query set unchanged while you compare models. Store the original text, document identifier, section heading, source timestamp, and access category alongside each vector. Without those fields, debugging a bad result becomes guesswork.
Start with chunks around 400 to 800 tokens and an overlap of roughly 50 to 100 tokens. These are starting points, not universal settings. A legal clause may need a smaller chunk to preserve one rule, while an API guide may work better when a method description and its parameter table stay together. Record the exact chunk size in your experiment notes.
Send document chunks using the model’s document-oriented setting when the API exposes task types, and send user questions using its query-oriented setting. If your client library does not expose those controls, use one consistent method for every run and document it. Mixing incompatible settings between indexing and querying can create a confusing quality regression.
For a small prototype, Python, the official Google client library, and a local vector store such as FAISS or Chroma are enough. Save vectors to disk, pin the package versions, and keep a JSONL file containing query text, expected identifiers, and relevance judgments. A reproducible test should be runnable on another laptop without relying on an undocumented notebook state.
Measuring quality instead of trusting intuition
A text-embedding-004 demo can feel impressive because semantic search returns something related. Related is not the same as correct. For each query, record whether the answer-bearing passage appears in the top five, top ten, and top twenty. If multiple passages are acceptable, label all acceptable identifiers before calculating the result.
Mean reciprocal rank is useful when one result is usually the desired answer. It rewards a correct passage appearing first more than one appearing fifth. Recall is more forgiving when a later generation step can read several passages. Keep both metrics when possible, because a system can improve recall while making the first result less useful.
Compare text-embedding-004 with BM25, a sparse lexical retrieval method. BM25 often wins on product codes, error messages, names, and exact policy language. Dense embeddings often help with paraphrases and natural-language questions. A simple hybrid method that combines normalized BM25 and vector scores can outperform either method on a mixed corpus, but that claim belongs to your measured dataset, not to a generic promise.
I would also inspect ten failures manually. Look for short queries, negation, stale documents, tables split across chunks, and questions requiring metadata filters. A failure report saying “the model was bad” is less useful than “the correct section was ranked 14th because the query omitted the product name.”

Hardware, cost, and privacy tradeoffs
The main attraction of text-embedding-004 is convenience: you can call a hosted endpoint instead of managing model weights, CUDA libraries, and memory pressure. That can reduce setup time for a small team. The tradeoff is that document content and queries leave your local environment, subject to the provider’s terms, configuration, retention controls, and regional requirements.
Hosted pricing also changes the shape of the workload. A one-time index of 50,000 chunks may be inexpensive compared with repeatedly embedding the same files after every development run. Cache vectors by a content hash, batch requests where the API permits it, and re-embed only changed chunks. Track input volume, request failures, retry time, and index rebuild duration rather than recording only the final API bill.
If privacy or offline operation is central, compare this model with a local embedding model such as EmbeddingGemma 2, a sentence-transformers model, or another model that fits your hardware. A modern laptop can run small models, but CPU latency, RAM usage, batching, and quantization determine whether the experience is pleasant. Do not assume a local model is automatically cheaper: engineering time and maintenance are part of cost.
When text-embedding-004 is a sensible choice
text-embedding-004 is reasonable when you want a hosted baseline, your data policy allows external processing, and your team values a fast path to a working retrieval experiment. It is especially useful as a comparison point for a private local system. If the hosted model wins clearly on your labeled queries, you have a measurable reason to accept its operational tradeoffs.
It is less attractive when every document must remain inside a controlled network, when offline operation is mandatory, or when your corpus is dominated by exact identifiers and structured filters. In those cases, BM25, a local encoder, or a hybrid architecture may be a better first implementation. You can still test text-embedding-004 later without making it the foundation of the entire application.
Keep the interface replaceable. Define one embedding service with methods for indexing and querying, store the model name and dimensions with each index, and make migrations explicit. This prevents a model change from silently mixing incompatible vectors in one collection.
A practical decision process
Run a small corpus first. Use real queries from support tickets, documentation searches, or internal workflows, and remove sensitive content if you are sending it to a hosted service. Establish BM25 before adding dense retrieval. Then test text-embedding-004, a local baseline, and a hybrid score using the same chunks and relevance labels.
Report recall at five, recall at ten, mean reciprocal rank, p95 query latency, indexing time, memory use, and estimated monthly cost. Include at least a handful of failed queries and note whether filtering or reranking would fix them. The benchmark is the conversation starter, not the verdict.
My recommendation is to treat text-embedding-004 as a useful reference implementation, not an unquestioned default. It can shorten the path from an idea to a measurable search system, while BM25 and local models expose the privacy, cost, and maintenance alternatives. Once the experiment is reproducible, the decision becomes an engineering choice rather than a model-fashion choice.

No feedback yet — submit the first.