Back to blog
RAG Systems

RAG Embeddings: What They Do and What They Cannot Guarantee

A vector similarity signal can find a candidate, but cannot prove an answer

Source, encoder, index, filters, evidence review and an honest no-answer

Original EMBED-5 model with one practical example and applicability limits
RAG embeddings, vector embeddings, semantic search, RAG system, AI knowledge base and EMBED-5
Primary nodeSimilarity signal boundary
Routing modeEMBED-5
StatusPUBLISHED
A document and a question pass through an encoder into vector space, where similarity finds evidence but cannot guarantee truth
EMBED_5_V01: use similarity to narrow candidate evidence, then verify source, permission, version and answerability.
TERMINAL_PREVIEW.LOG
$ inspect embeddings --contract EMBED-5
> receive: source / version / access / language
> encode: passage / query / model-version
> retrieve: similarity / filters / provenance
> verify: evidence / contradiction / no-answer
> route: answer / review / correction
RAG embeddings

Embeddings are numerical representations that place text in a shared vector space. In a RAG system, they help a retrieval component find source passages whose meaning is plausibly related to a question. That is useful, but it is narrower than understanding, verification, permission, or truth.

This article answers one question: what embeddings do inside a RAG pipeline and where their responsibility stops. It does not replace the broader RAG systems service guide, which is where architecture, delivery scope and a first implementation conversation belong. Here, the focus is the retrieval signal itself.

1. Definition without marketing: an embedding is a similarity signal

An embedding model converts an input such as a paragraph, a product title, or a question into a fixed-length array of numbers. Inputs that the model considers semantically related are often nearer to one another than unrelated inputs. A vector database or search index can then compare the query vector with stored vectors and return nearby candidates.

The important word is candidate. A high similarity score does not prove that a passage answers the question. It does not prove that the passage is current, permitted for the caller, complete, authoritative, or free of a contradictory exception. It means only that the encoder judged the two inputs related in its learned representation.

For example, an employee asks: “When can I refund a subscription?” The query embedding may retrieve a passage headed “Cancellation and refunds.” That is a useful start. But the answer still needs the correct product, country, effective date, customer status, and exception rules. If those conditions live elsewhere, a vector match alone cannot safely fill them in.

An embedding therefore belongs in the retrieval layer, between source preparation and answer composition. It is not a database schema, an access-control mechanism, a policy engine, or a decision maker.

2. How embeddings work in a RAG pipeline

EMBED-5 is a compact way to describe the handoffs that make the signal usable:

  1. Receive an owned source passage with an ID, version, access rule, language, lifecycle and source locator.
  2. Encode the passage with a named embedding model and retain the model version with the vector.
  3. Retrieve query-near candidates, then apply deterministic filters for tenant, role, language, document type and current lifecycle.
  4. Verify whether the selected evidence supports the requested claim, includes material limits and contains no unresolved contradiction.
  5. Route either to an answer with a citation, a human review path, or an explicit no-answer.

The same encoder should normally be used for documents and queries in one index. Changing models, normalization, chunking policy, or source language handling is not a cosmetic update: it can change which passages become “near.” Keep these choices versioned and test them against a representative evaluation set before replacing an active index.

ts
type RetrievalCandidate = {
  sourceId: string;
  sourceVersion: string;
  locator: string;
  text: string;
  embeddingModel: string;
  accessRule: string;
  lifecycle: "current" | "superseded" | "quarantined";
  similarity: number;
};

const candidates = search(queryVector, { topK: 12 });
const permitted = candidates.filter((item) =>
  caller.permitted(item.accessRule) && item.lifecycle === "current",
);

The code intentionally does not turn similarity into an answer. The answer layer must still decide whether the retrieved material supports the question and cite the source a reviewer can inspect.

3. One practical example: policy retrieval for a support assistant

Consider a small support corpus with three documents: a public refund policy, a country-specific exception, and an internal escalation procedure. The ingestion process preserves the document title, effective date, customer segment, access rule and heading locator with each passage. Each passage is encoded after chunking, not before it.

When a customer asks about a refund, the query embedding may surface the general policy and an exception. Filters remove internal-only escalation notes before the model sees them. The system then checks whether both retrieved passages apply to the customer’s plan and country. If the exception is ambiguous or the policy is no longer current, the system should not infer an outcome from a close vector match. It should return a bounded response such as “I cannot confirm eligibility from the available policy” and route the case to the authorised support path.

This is where embeddings help: they reduce the search space to plausible evidence. They do not replace the policy’s conditions or grant permission to reveal a document. The same separation matters for contracts, HR guidance, product manuals, and multilingual internal knowledge bases.

SituationEmbeddings are useful forEmbeddings do not establish
A question uses different wording from the documentFinding semantically related passagesWhether the passage is the governing policy
Many documents discuss the same productRanking likely candidates before reviewWhich version is current or permitted
The answer needs a cited paragraphSelecting a likely source locatorThat the paragraph contains every qualifier
A user asks something outside the corpusDetecting weak or scattered retrievalPermission to invent a plausible answer

4. Where embeddings help — and where another mechanism is smaller

Embeddings are a good fit when people ask varied natural-language questions against a bounded, governed set of text and exact keyword matching would miss relevant wording. They are also useful for clustering similar support issues, recommending related documentation, or supplying candidate passages to a hybrid search system.

They are often the wrong first tool when the operation has a deterministic key. If someone needs the balance of order A-1042, query the system of record. If a workflow needs a mandatory form, use validation. If a policy outcome depends on a small decision table, model the table. If a source is unowned, stale, or inaccessible, improving the embedding model is not a repair.

This distinction prevents a familiar failure: a team spends time tuning vector similarity while its corpus has duplicated policies, missing dates, weak access rules, or no way to show a source. The article on RAG source quality covers those upstream responsibilities, while RAG chunking explains why the passage boundary changes what an embedding represents.

5. Limits to test before calling retrieval reliable

Meaning is compressed. A vector does not preserve every detail of its source. Negation, a date, a product code, a number, or a narrow exception can be important to the answer yet weak in a broad semantic representation. Keep structured fields and deterministic filters alongside vector search.

Similarity is relative. A score has no universal “safe” threshold. Its interpretation depends on the model, language, corpus, chunking policy and competing candidates. Evaluate score distributions on your own questions rather than borrowing a threshold from another project.

Retrieval can be confidently wrong. Near passages may describe a retired product, another tenant, a related but incompatible procedure, or a contradictory exception. Lifecycle, permissions, metadata filters and source citations must operate before the response is trusted.

Language coverage varies. A multilingual RAG system should test retrieval separately for Armenian, Russian and English material if those languages are in scope. Translation, transliteration and mixed-language queries can change vector neighborhoods. Do not assume one good English demo proves equivalent retrieval elsewhere.

An embedding cannot judge sufficiency. A query may retrieve something related without retrieving enough evidence to answer. Explicit no-answer behavior is a product requirement, not an embarrassment to hide.

A minimal acceptance check

Start with a small evaluation set, not a sweeping re-index. Include ordinary questions, paraphrases, exact identifiers, stale-policy questions, denied-access questions, mixed-language inputs if relevant, and questions that should receive no answer. For each result, inspect the returned passage, source version, access decision, locator and whether the claimed answer is actually supported.

ts
require(source.id && source.version && source.accessRule);
require(vector.modelVersion && candidate.provenance);
require(filters.applied && candidate.lifecycle === "current");

answerable = evidence.supportsClaim && !evidence.conflicts;
route = answerable ? "answer-with-citation" : "no-answer-or-review";

The practical outcome is not “better embeddings” in the abstract. It is a retrieval layer that can show why a passage was selected, whether it was allowed, which version it came from, and when the system must decline to answer. For a broader architecture review or a bounded RAG pilot, use the RAG service guide or inspect the engineering approach in the case studies.

CODE_BLOCK.TXT
require(source.id && source.version && source.accessRule);
require(vector.modelVersion && candidate.provenance);
require(filters.applied && candidate.lifecycle === "current");

answerable = evidence.supportsClaim && !evidence.conflicts;
route = answerable ? "answer-with-citation" : "no-answer-or-review";