Amine Raji, writing on his blog aminrj.com on September 7, argues that teams building retrieval-augmented generation pipelines have been quietly treating a distance calculation as if it were a background check. The calculation is cosine similarity, the ranking function that most vector databases use by default to decide which stored passages get handed to a language model. Rajai’s point is structural, not anecdotal: the number that comes back from that calculation describes geometry, and geometry is blind to who wrote a sentence or whether it happened to be false.

Here is the mechanism in plain terms. An embedding model turns any passage into a point in a high-dimensional space, and passages that use similar words and phrasing land near each other regardless of what they claim. “Revenue was $8.3 million” and “Revenue was $24.7 million” sit almost on top of one another, since only the digits differ and the wording around them is identical. A retrieval system built to fetch the closest points to a query has no way to notice that one of those two numbers is invented. It will rank whichever passage is phrased more precisely to match the query, full stop.

That gap matters because most RAG stacks feed retrieved text directly into the model’s context window and let the model treat it as background fact. AI Insiders has flagged this pattern before in other forms: once a piece of text lands inside the loop, it tends to get read as trustworthy simply because it arrived through the retrieval step rather than from an untrusted outside channel. Rajai’s post applies that same blind spot to the ranking mechanism itself rather than to any single prompt.

The deeper reason this keeps surfacing across different pipelines is architectural rather than incidental. A vector database ships with exactly one built-in signal, a relevance score, and nothing in the default setup asks a second question about where a passage came from or who is allowed to see it. Engineers who wire retrieval straight into generation are, often without deciding to, letting that relevance score double as a trust decision nobody actually made.

Rajai does not stop at the diagnosis. He proposes several mitigations for teams that want retrieval systems to carry some notion of authority alongside relevance, though these are his recommendations rather than established industry practice: tagging documents with provenance metadata at ingestion time, filtering queries through access-control rules so a retrieval call only reaches the sources a given user is cleared to see, weighting passages by the authority of their source rather than similarity alone, and, for the highest-stakes corpora, signing documents so a retrieval layer can verify origin before a passage ever reaches the model. Each of these adds a second axis to a system that today runs on one.

None of this requires abandoning embeddings or vector search, which remain the fastest way to find relevant text at scale. It requires builders to stop assuming that “most relevant” and “safe to trust” are the same claim. A retrieval pipeline that ranks purely on distance to the query will, by construction, occasionally rank a wrong answer above a right one if the wrong answer happens to be phrased more closely to what was asked.

For anyone maintaining a production RAG system, the near-term action is an audit rather than a rebuild: check whether ingestion assigns any source-level trust signal at all, or whether every document that ever entered the corpus is being weighted as equally credible. If the answer is the latter, that is a design gap worth closing before an important query surfaces the wrong document with total confidence.

Amine Raji published this argument on his blog, aminrj.com, on September 7, 2026.