<?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: Kavya | The Tech Translator</title>
    <description>The latest articles on DEV Community by Kavya | The Tech Translator (@thetechtranslator).</description>
    <link>https://dev.to/thetechtranslator</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%2F4268539%2Fe5c68fda-e47d-4a53-9a60-296033a8211f.png</url>
      <title>DEV Community: Kavya | The Tech Translator</title>
      <link>https://dev.to/thetechtranslator</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thetechtranslator"/>
    <language>en</language>
    <item>
      <title>RAG vs. Fine-Tuning: Why Does Your AI Get It Wrong Even With the Right Information?</title>
      <dc:creator>Kavya | The Tech Translator</dc:creator>
      <pubDate>Tue, 01 Dec 2026 10:22:50 +0000</pubDate>
      <link>https://dev.to/thetechtranslator/rag-vs-fine-tuning-why-does-your-ai-get-it-wrong-even-with-the-right-information-agi</link>
      <guid>https://dev.to/thetechtranslator/rag-vs-fine-tuning-why-does-your-ai-get-it-wrong-even-with-the-right-information-agi</guid>
      <description>&lt;p&gt;It's Friday afternoon. Your new support bot goes live on Monday, and you're testing it with a simple question: Can this customer get a refund?&lt;/p&gt;

&lt;p&gt;The bot says yes. It's using last year's refund policy.&lt;/p&gt;

&lt;p&gt;You give it the current policy and ask again. This time, it quotes the exact sentence that says a manager has to approve the refund. Then it drafts the reply it wants your agent to send.&lt;/p&gt;

&lt;p&gt;"Your refund has been approved."&lt;/p&gt;

&lt;p&gt;If the agent hits Send, the customer starts waiting for money nobody has agreed to send. By the time the manager sees the ticket, they're dealing with a promise the company has already made.&lt;/p&gt;

&lt;p&gt;I'd still run the pilot on Monday. I'd let the bot draft replies for agents to review, and I'd keep refund approvals with managers. That gives the team time to figure out why the bot made two different mistakes on the same question.&lt;/p&gt;

&lt;p&gt;Think about a new support hire. If they're using an old handbook, you give them the current one. If they have the right page and still promise a refund they can't approve, you sit down and go through a few cases. That's the real difference in &lt;strong&gt;RAG vs. fine-tuning&lt;/strong&gt;. &lt;strong&gt;RAG (retrieval-augmented generation) gives the bot the relevant page while it works. Fine-tuning gives it more practice at a task.&lt;/strong&gt; Your support workflow determines who can actually approve the refund.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here's what I'd check, in order:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is it a search problem or a training problem?&lt;/li&gt;
&lt;li&gt;What changes when you have thousands of documents&lt;/li&gt;
&lt;li&gt;Why the answer's position in the list matters&lt;/li&gt;
&lt;li&gt;Three test tickets to run before launch&lt;/li&gt;
&lt;li&gt;My plan for Monday&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Give it the right page and ask again
&lt;/h2&gt;

&lt;p&gt;Pick a few questions your bot got wrong. Ask a support agent what they'd say and which paragraph of the policy they'd use. Then ask the bot the same questions again, with those paragraphs included. Keep the rest of the instructions the same.&lt;/p&gt;

&lt;p&gt;Say the bot gets the answer right this time. Look at what it saw on the first try. Maybe it found the policy for monthly plans when the customer was on an annual plan. Maybe two documents had the same title and the old one came up first. Either way, you know where to start looking.&lt;/p&gt;

&lt;p&gt;If the bot needs to look things up across a collection of documents, try &lt;strong&gt;retrieval-augmented generation&lt;/strong&gt;, or RAG. When a question comes in, the system searches your sources and gives the model the relevant passages to work from. If the pilot depends on one short policy, try putting that policy directly in the instructions first. See if that's enough.&lt;/p&gt;

&lt;p&gt;Now go back to Friday's second mistake. The bot already had the right policy. I'd give it one clear instruction: "If a manager needs to approve the refund, tell the customer we'll review the request." Then I'd show it a good reply, including an example where the customer pushes for an immediate yes or no.&lt;/p&gt;

&lt;p&gt;If the bot keeps missing the same step across cases your team agrees on, &lt;strong&gt;fine-tuning&lt;/strong&gt; is worth testing. You train the model further on examples of the task. Save some cases it hasn't seen, then test the original and trained versions on those same cases. OpenAI walks through how to compare approaches in its &lt;a href="https://developers.openai.com/api/docs/guides/optimizing-llm-accuracy" rel="noopener noreferrer"&gt;guide to improving model accuracy&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1wg3hu4sspfj9uyz63xh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1wg3hu4sspfj9uyz63xh.png" alt="Three fixes: fix the search, test fine-tuning, require approval" width="800" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What happens when the handbook has 100,000 documents?
&lt;/h2&gt;

&lt;p&gt;Morgan Stanley built an &lt;a href="https://www.morganstanley.com/press-releases/key-milestone-in-innovation-journey-with-openai" rel="noopener noreferrer"&gt;internal assistant for its financial advisors&lt;/a&gt; so they could find information in the firm's own materials. The team tested answers with advisors and kept improving search as the collection grew to about 100,000 documents. OpenAI's &lt;a href="https://openai.com/index/morgan-stanley/" rel="noopener noreferrer"&gt;account of the rollout&lt;/a&gt; reports that more than 98 percent of advisor teams actively used the tool.&lt;/p&gt;

&lt;p&gt;You can borrow the testing habit with 40 help articles. Ask support which questions make them open three tabs or message a coworker. You might find that ordinary refunds are easy, but annual renewals cause trouble because the exceptions live in a separate document.&lt;/p&gt;

&lt;p&gt;Start with that one problem. Give the bot a monthly refund question, an annual renewal question, and one where the customer never says which plan they're on. You'll see whether it can find the right rule and whether it knows when to ask a follow-up.&lt;/p&gt;

&lt;p&gt;Before you connect the whole help center, decide who owns those documents and what happens to old versions. If you're ready to set up the search, this &lt;a href="https://www.resourcifi.com/insights/how-to-build-a-rag-system/" rel="noopener noreferrer"&gt;step-by-step guide to building a RAG system&lt;/a&gt; covers how to connect your sources and check what comes back.&lt;/p&gt;

&lt;h2&gt;
  
  
  What if the right page is buried in the middle?
&lt;/h2&gt;

&lt;p&gt;Say the bot keeps quoting the wrong refund rule. Someone suggests giving it every policy that might apply. I'd try that on a few questions before making it the default.&lt;/p&gt;

&lt;p&gt;Researchers from Stanford University, UC Berkeley, and Samaya AI tested something similar in &lt;a href="https://www-cs.stanford.edu/~nfliu/papers/lost-in-the-middle.tacl2023.pdf" rel="noopener noreferrer"&gt;Lost in the Middle&lt;/a&gt;. For each question, they gave the model a list of 20 documents. Only one document contained the answer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First, tenth, and twentieth are positions in that list.&lt;/strong&gt; The researchers put the document with the answer at the very beginning, near the middle, or at the very end. Then they checked how often the model got the answer right. For example, 54% means it answered correctly about 54 times out of 100 when the useful document was tenth.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwasyhqwzfx95qxay8zt1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwasyhqwzfx95qxay8zt1.png" alt="Chart showing accuracy drops when the useful document is in the middle" width="800" height="330"&gt;&lt;/a&gt;&lt;br&gt;
The model got the same information each time. It answered correctly less often when the useful document sat in the middle. That's where the study gets its name. The chart shows one test with an older model.&lt;/p&gt;

&lt;p&gt;For our refund bot, I'd run the same questions twice. In the first run, give it a short list of relevant passages. In the second, give it the longer list you were planning to use. Have agents count how many answers they'd need to correct. If the short list works better, you've saved yourself some guesswork about what to fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test these three support tickets before launch
&lt;/h2&gt;

&lt;p&gt;Start with a customer who leaves out which plan they're on. See whether the bot asks a follow-up before giving an answer. Next, use a ticket that could pull up either the old policy or the new one. Check which policy the bot found and whether its answer matches the effective date.&lt;/p&gt;

&lt;p&gt;Finally, use Friday's refund request. Have an agent read the draft as if they were about to send it. The reply should say the request is under review. It should give the manager what they need to decide, and it shouldn't trigger a refund when the agent hits Send.&lt;/p&gt;

&lt;p&gt;If agents and supervisors have different access, run that test from both accounts. The &lt;a href="https://www.resourcifi.com/insights/ai-security-best-practices/" rel="noopener noreferrer"&gt;guide to AI security best practices&lt;/a&gt; covers how to check what each person can see and what the bot can do on their behalf.&lt;/p&gt;

&lt;p&gt;Agree on what would stop the pilot before it starts. A reply that needs a small wording change is easy for an agent to handle. A reply that promises money before approval is a reason to pause and fix the workflow.&lt;/p&gt;

&lt;p&gt;If you're the person approving the budget, ask the team to show you a few bad answers before they ask for more engineering time. For each one, have them show the policy the bot saw, the reply it wrote, and what the agent changed. That's enough to have a useful conversation about what to pay for next. If agents keep pasting in the same missing paragraph, there's a search problem. If they keep rewriting the same sentence after the bot has found the right rule, try changing the instructions and check whether the edits go away.&lt;/p&gt;

&lt;p&gt;Here's what I'd put in the pilot notes. Say an agent asks about an annual renewal and the bot pulls a policy for a monthly plan. Save the question, the passage the bot used, and the current annual policy. Run that ticket again after you fix search. If the bot now finds the annual policy but still promises a refund, leave that ticket open. The search fix did its job. There's still a problem with the reply.&lt;/p&gt;

&lt;p&gt;For the next round, use a different ticket with the same approval rule. The customer might ask for a refund after a price increase instead of after a renewal. If the bot handles both cases, you have better evidence that it learned what to do when approval is required. If it only gets the original ticket right, keep testing before you commit to training. A pilot review should show whether the fix holds up on a question the team didn't write it for.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd launch on Monday
&lt;/h2&gt;

&lt;p&gt;On Monday, I'd give the bot the current policy, let agents review its drafts, and leave approvals with managers. By Friday, I'd look at what agents spent their time correcting.&lt;/p&gt;

&lt;p&gt;If they kept replacing outdated answers, I'd spend the next week fixing search. If the bot had the right rule and still wrote poor handoffs after we clarified the instructions, I'd test fine-tuning on that one task. If the current policy and a few good examples got the team through the week, I'd keep using them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Last time your bot got something wrong, did it have the information it needed?&lt;/strong&gt;&lt;/p&gt;

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