<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: mofuteq</title>
    <description>The latest articles on DEV Community by mofuteq (@mofuteq).</description>
    <link>https://dev.to/mofuteq</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3986517%2F1522fd82-a3f8-4372-b241-0750977f2488.JPG</url>
      <title>DEV Community: mofuteq</title>
      <link>https://dev.to/mofuteq</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mofuteq"/>
    <language>en</language>
    <item>
      <title>Why “Please Don’t Make Recommendations” Is Not a Guardrail for RAG</title>
      <dc:creator>mofuteq</dc:creator>
      <pubDate>Thu, 02 Jul 2026 12:16:14 +0000</pubDate>
      <link>https://dev.to/mofuteq/why-please-dont-make-recommendations-is-not-a-guardrail-for-rag-1an0</link>
      <guid>https://dev.to/mofuteq/why-please-dont-make-recommendations-is-not-a-guardrail-for-rag-1an0</guid>
      <description>&lt;p&gt;You built a system to surface information so a person could decide. Somewhere it started deciding for them — the output stopped saying "here's what the documents show" and started saying "you should do X." Nobody designed that drift. An LLM, when asked a question, produces an answer-shaped thing, and an answer easily becomes a verdict.&lt;/p&gt;

&lt;h2&gt;
  
  
  What everyone tries
&lt;/h2&gt;

&lt;p&gt;A prompt instruction: "Don't make recommendations." "Only state what's in the documents." People add the line and assume the boundary is enforced.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it doesn't work
&lt;/h2&gt;

&lt;p&gt;A prompt instruction is a &lt;em&gt;request,&lt;/em&gt; not a guardrail. The model follows it most of the time, then on the input that matters produces a confident recommendation anyway, because nothing structurally prevents it. "Please don't make recommendations" is to a guardrail what a sticky note saying "please don't enter" is to a locked door.&lt;/p&gt;

&lt;p&gt;And the stakes are higher than they look. When output drifts from evidence to verdict, accountability moves. As long as the system returns evidence and a human decides, the human owns the decision. The moment the system returns a verdict and the human defers, the system is deciding things it was never validated to decide — and when one is wrong, accountability is a blank. High-stakes fields separate evidence extraction from judgment on purpose; most RAG systems erase that line by default.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one shift
&lt;/h2&gt;

&lt;p&gt;Decide what the output &lt;em&gt;is&lt;/em&gt; and enforce it structurally. An output should declare itself: answer, evidence, missing facts, or out-of-scope. "Return decision material, not a decision" has to live in the output contract and in gates — not in a polite request to the model. The system supplies frames; the human supplies verdicts.&lt;/p&gt;




&lt;p&gt;This is the output boundary — one of three places production RAG dies.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://blog.mofuteq.space/your-rag-should-return-evidence-not-recommendations" rel="noopener noreferrer"&gt;Read the full version on my blog&lt;/a&gt;, where this connects to the &lt;strong&gt;RAG Failure Diagnosis Kit&lt;/strong&gt; for teams debugging production RAG.&lt;/p&gt;

</description>
      <category>rag</category>
      <category>llm</category>
      <category>ai</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Stop Sending the Raw User Prompt Straight to Your Retriever</title>
      <dc:creator>mofuteq</dc:creator>
      <pubDate>Tue, 23 Jun 2026 12:43:10 +0000</pubDate>
      <link>https://dev.to/mofuteq/stop-sending-the-raw-user-prompt-straight-to-your-retriever-m3f</link>
      <guid>https://dev.to/mofuteq/stop-sending-the-raw-user-prompt-straight-to-your-retriever-m3f</guid>
      <description>&lt;p&gt;A user types a question into your RAG system. Before anything is retrieved, something decides &lt;em&gt;what string to actually search with.&lt;/em&gt; In a lot of systems, nobody decided that on purpose — the raw prompt goes straight to the retriever and whether it works is left to luck.&lt;/p&gt;

&lt;h2&gt;
  
  
  What everyone tries
&lt;/h2&gt;

&lt;p&gt;Query rewriting: have an LLM expand or rephrase the question into better search strings. It's standard now, and it genuinely helps with vocabulary gaps — user says "login broken," docs say "authentication failure," a rewrite bridges them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it doesn't fully work
&lt;/h2&gt;

&lt;p&gt;A rewrite that improves retrieval can also quietly change the question. The user asked one thing; the rewritten query retrieves great documents for a &lt;em&gt;slightly different&lt;/em&gt; thing; the answer is fluent, grounded, and not what they asked. Recall went up, fidelity went down, and nothing noticed because retrieval metrics improved.&lt;/p&gt;

&lt;p&gt;The real issue: there are two languages in the room — the user's task language and the corpus's author language — and the retriever sits on the boundary. Treating it as "just rewrite the query" hides that you're making a translation decision with consequences.&lt;/p&gt;

&lt;h2&gt;
  
  
  The one shift
&lt;/h2&gt;

&lt;p&gt;Treat the gap between user question and search query as an explicit interface boundary, not a hidden preprocessing step. Decide on purpose: what does the retriever search for, how is user language reconciled with document language, and does the rewritten query still answer what was asked? Make the translation visible and checkable, so "we rewrote the query" doesn't silently become "we answered a different question."&lt;/p&gt;




&lt;p&gt;This is the query boundary — one of three places production RAG dies. Full version on my blog; the diagnostic questions for all three boundaries are in a &lt;a href="https://blog.mofuteq.space/your-users-ask-one-question-your-retriever-searches-another" rel="noopener noreferrer"&gt;RAG Failure Diagnosis Kit&lt;/a&gt; for teams debugging production RAG. Link in the canonical post.&lt;/p&gt;

</description>
      <category>rag</category>
      <category>llm</category>
      <category>ai</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Your RAG Retrieved the Right Documents but Still Gave the Wrong Answer</title>
      <dc:creator>mofuteq</dc:creator>
      <pubDate>Fri, 19 Jun 2026 12:35:09 +0000</pubDate>
      <link>https://dev.to/mofuteq/your-rag-retrieved-the-right-documents-but-still-gave-the-wrong-answer-5fdo</link>
      <guid>https://dev.to/mofuteq/your-rag-retrieved-the-right-documents-but-still-gave-the-wrong-answer-5fdo</guid>
      <description>&lt;p&gt;Your retriever returned the right documents. The similarity scores look fine. The answer is still wrong. If you've shipped RAG, you've seen this — and it's the failure that survives every retrieval upgrade.&lt;/p&gt;

&lt;h2&gt;
  
  
  What everyone tries
&lt;/h2&gt;

&lt;p&gt;Reranker. Higher top-k. Hybrid search. A better embedding model. All of these chase the same goal: &lt;em&gt;documents more similar to the query.&lt;/em&gt; They help when the right document wasn't being retrieved. They do nothing when the right document &lt;strong&gt;was&lt;/strong&gt; retrieved and the answer is still wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it doesn't work
&lt;/h2&gt;

&lt;p&gt;Similarity answers "is this chunk about the same topic?" It does not answer "does this chunk contain the facts needed to support the answer?" Those come apart constantly. A chunk can be highly similar — same vocabulary, same subject — and contain nothing that actually grounds the answer. Hand the model a pile of on-topic text and it will produce a fluent, plausible, even cited-looking answer. The grounding is cosmetic: the text was nearby, not load-bearing.&lt;/p&gt;

&lt;p&gt;High similarity with a wrong answer isn't a contradiction. You asked retrieval to find related text. It did. Nobody asked whether the text was &lt;em&gt;enough.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The one shift
&lt;/h2&gt;

&lt;p&gt;Stop treating retrieval output as evidence. Treat it as candidate material that has to pass an explicit evidence check before it can support an answer. Put a step between retrieval and generation: &lt;em&gt;does the retrieved set actually contain the facts this answer requires? If not, abstain.&lt;/em&gt; When the documents don't contain the facts, the system should return nothing rather than a confident guess.&lt;/p&gt;

&lt;p&gt;Relevant context in, only sufficient evidence allowed through. That's the line between a RAG demo and a RAG system you can trust in production.&lt;/p&gt;




&lt;p&gt;I write about the three boundaries where production RAG dies — query, evidence, output — from the angle of shipping under security and model constraints. &lt;a href="https://blog.mofuteq.space/your-rag-retrieved-documents-not-evidence" rel="noopener noreferrer"&gt;Read the full version on my blog&lt;/a&gt;, where this connects to the practical &lt;strong&gt;RAG Failure Diagnosis Kit&lt;/strong&gt; for teams debugging production RAG.&lt;/p&gt;

</description>
      <category>rag</category>
      <category>llm</category>
      <category>ai</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
