Embeddings: Mistakes and Fixes

A practical guide to avoiding the data, retrieval, and evaluation mistakes that make embeddings unreliable in production.

Krishnam Murarka Updated 2026-07-12 Artificial Intelligence

Embeddings are numerical representations that allow software to rank items by semantic similarity. That is useful for search, retrieval-augmented generation, classification, and matching, but it also creates a common trap: a high similarity score can look like evidence even when the source is stale, unauthorized, incomplete, or contradicted elsewhere. The practical question for a CTO is not whether embeddings can find related text. It is whether the system can consistently retrieve the right approved evidence for a defined task, show why it selected it, and fail honestly when it cannot. The NIST Generative AI Profile is helpful here because it frames risk as a lifecycle and context problem, not a model-setting problem.

Start With The Retrieval Decision

Begin with one decision a person currently makes by opening documents, comparing records, or asking a specialist. For example, a service agent may need the current entitlement rule and the account facts before explaining why an export is unavailable. Define the requester, the permitted corpus, the response format, and the action that remains human-owned. This is more valuable than starting with a vector database choice because it exposes whether the work needs keyword search, structured lookup, semantic retrieval, or all three. The plain-language embeddings guide is a useful companion for teams still choosing that initial boundary.

MistakeWhy it breaks retrievalPractical fix
Indexing every document equallyAn expired policy can outrank a current, authoritative rule because both are semantically close.Give documents an owner, effective date, authority level, tenant scope, and retirement process before indexing.
Treating chunks as neutralChunk boundaries can separate exceptions from the rule they qualify or remove the record needed to interpret a clause.Test chunking against real questions; retain document, section, version, and neighbouring-context identifiers.
Using similarity as a permission checkSemantic relevance does not establish that the requester may read a record.Authorize at retrieval and again at any protected action; never rely on prompt wording for access control.
Measuring only response fluencyA polished answer may cite a weak passage or omit the fact that the corpus has no answer.Score evidence selection, citation accuracy, abstention, and user resolution separately.

Design A Retrieval Contract

Write a service contract in plain language: when a named user asks this class of question, the application may retrieve these sources under these filters, produce this bounded result, and escalate under these conditions. The contract should name source-of-truth rules, freshness expectations, and the point at which a person takes over. It also clarifies operational ownership. Content owners decide what is authoritative; engineering owns ingestion and access enforcement; the workflow owner accepts or rejects the result. That division prevents the familiar situation where a content-quality issue becomes an endless argument about the embedding model.

embeddings operating path
A practical path for turning an embeddings prototype into a retrieval service with visible quality controls.
  • Keep canonical facts in systems of record; embeddings should locate evidence, not become the record of truth.
  • Attach metadata that supports real decisions: tenant, document type, effective date, jurisdiction, product, language, and access scope.
  • Store the retrieval query, candidate identifiers, filters, reranking result, and answer version for consequential interactions.
  • Define an abstention result that tells the user what is unknown and where the case will go next.
  • Set a deletion and re-indexing path for withdrawn documents, corrected records, and changed permissions.
  • Maintain a small reviewed question set so a configuration change can be compared with a known baseline.

Protect The Boundaries Around The Model

Most damaging embeddings failures occur at the edges. A source can be injected with instructions, a connector can expose material from another tenant, or a downstream answer can imply an approval it does not possess. OWASP's LLM application guidance describes why retrieval and tool integrations need explicit controls rather than confidence in the generated text. Authenticate the user before retrieval, apply document-level policy filters, validate structured inputs, and keep write operations behind deterministic authorization. A system that can explain a policy is not therefore allowed to change an entitlement, send an email, or disclose a customer record.

Test Evidence, Not Demos

A credible evaluation set includes the questions that expose ambiguity: current versus superseded policy, a user who lacks access, near-duplicate products, documents with conflicting claims, and a question for which the right result is no answer. Label the expected document or structured record, not just an ideal sentence. Then inspect whether the top retrieved evidence is sufficient, current, and permitted before judging the generated response. Include people who handle escalations in the review. They know which apparently small exceptions produce costly support loops. The UK secure AI development guidance similarly emphasizes that secure design and operation must be continuous rather than a launch checklist.

SignalWhat it can revealReview action
Evidence recallThe expected authoritative item is missing from the first candidate set.Check ingestion, metadata filters, chunking, vocabulary, and whether the item is actually eligible for the task.
Citation precisionThe answer links to a related passage but not the passage that supports the claim.Review reranking, context assembly, and answer instructions; do not hide the mismatch with a lower confidence label.
Stale-source rateUsers are shown material after its effective date or withdrawal.Trace retirement events through caches and indexes, then test the removal path with a controlled fixture.
Abstention qualityThe system either guesses too often or sends routine work to review.Tune the decision boundary using observed error cost, and make the user-facing handoff specific.

Operate A Living Corpus

Embeddings quality changes when business language, source ownership, permissions, or user behaviour changes. Monitor corpus freshness, retrieval latency, candidate quality, correction volume, and the proportion of cases resolved without unsupported claims. Sample traces regularly rather than relying only on aggregate dashboards. A trace should let an operator reconstruct the user request, permitted sources, retrieved passages, model and prompt version, and final outcome without collecting unnecessary sensitive content. Release changes gradually, compare them to the standing evaluation set, and retain a reversal path. The OpenAI Agents guide provides a useful general reminder to keep agent behaviour observable and bounded as workflows add components.

Governance And Change Control

Governance for embeddings should describe the corpus and retrieval rules in the same practical terms used to run the service: who can change it, what evidence is required, how a change is reviewed, and how the previous state can be restored. Treat a source changes, a document is withdrawn, or a permission scope changes as a production event rather than routine maintenance. The owner should assess whether the change alters the permitted decision, data scope, safety controls, user explanation, or support obligation. Record the outcome in a change log that links to test results and the responsible approver. That modest discipline avoids a common failure mode in which a technically small update changes behaviour but nobody can later explain why.

Build A Review Pack

Keep a compact review pack for embeddings, made from reviewed business questions with expected evidence. For every example, retain the expected result, the evidence a reviewer should inspect, the unacceptable result, and the recovery action. Refresh the pack when operations expose a new failure class, but preserve a stable core so releases can be compared over time. Invite the people who own source records, resolve exceptions, and answer customer questions to review samples with engineering. Their observations often reveal that a failure is caused by an outdated record, confusing state, or incomplete policy rather than a model defect. A useful review ends with an owner and a measurable follow-up, not a vague request to improve quality.

Turn Feedback Into Improvement

Do not expand embeddings simply because early users like the experience. First classify feedback by severity, frequency, affected user group, and reversibility. Fix issues that expose protected data, create unsupported decisions, or trap people in an unclear state before pursuing broader coverage or lower costs. Then decide whether the repair belongs in source stewardship, interface design, policy logic, model configuration, evaluation data, or team training. This framing keeps the improvement loop honest: the model is one component of a service with people and systems around it. Publish the decision and its expected signal, then verify after release that the change reduced the observed problem without moving it into an invisible manual process.

  • Name the accountable owner for the corpus and retrieval rules and the person who approves material changes.
  • Define which change events must trigger testing, access review, communications, or rollback preparation.
  • Keep a representative case pack with expected evidence and a documented reason for each outcome.
  • Review correction and override data with operations, security, and the people who own the underlying records.
  • Prioritize failures by user impact and reversibility before optimizing speed, appearance, or model cost.
  • Close each recurring issue with a specific test, control, owner, and a date to check the effect.

Key Takeaways

  • Embeddings rank semantic candidates; they do not prove authority, freshness, or permission.
  • A retrieval contract makes data ownership, access policy, and escalation testable before implementation grows.
  • Evaluate the selected evidence and abstentions, not only the fluency of the final answer.
  • Keep retrieval traces and correction reasons so failures can be reproduced and repaired.
  • Expand only after a real corpus, real users, and exception cases show the workflow is dependable.

Frequently Asked Questions

What is the first thing to build for embeddings? Start with a narrow, high-frequency task with a known owner, accessible evidence, and a safe fallback. How much human review is required? Match review to impact, uncertainty, reversibility, and legal obligations; low-risk drafts differ from irreversible record changes. What should be logged? Keep the minimum information needed to reconstruct inputs, policy and validation decisions, versioned configuration, and outcome, with retention and access controls. When should a team expand embeddings? Only after the evaluation set, live exception data, and user feedback show the existing boundary is stable enough to support more work.

Conclusion: Make Retrieval Accountable

The durable embeddings implementation is not the one with the largest corpus or the highest demo score. It is the one that retrieves approved evidence for a bounded decision, shows its work, respects permissions, and gives people a safe route when evidence is missing. Start there, measure it on real work, and let those results determine whether broader automation is justified.

Continue with related articles

Prompt Engineering: Security Review

How engineering teams can review prompt engineering as a controlled interface, not a collection of clever instructions.

Artificial Intelligence · 12 min

How CTOs Should Think About Semantic Search

A CTO guide to semantic search that treats retrieval as an evidence service: define the question, protect the corpus, measure relevance, and expose uncertainty.

Artificial Intelligence · 11 min read