<?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: Sangam Shrestha</title>
    <description>The latest articles on DEV Community by Sangam Shrestha (@sangam_shrestha_07).</description>
    <link>https://dev.to/sangam_shrestha_07</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%2F4040405%2Fa7dc7c9d-e514-4d10-b532-54f18471dd83.png</url>
      <title>DEV Community: Sangam Shrestha</title>
      <link>https://dev.to/sangam_shrestha_07</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sangam_shrestha_07"/>
    <language>en</language>
    <item>
      <title>Understanding LLM Hallucinations: Why AI Lies and How to fix it.</title>
      <dc:creator>Sangam Shrestha</dc:creator>
      <pubDate>Thu, 13 Aug 2026 07:35:37 +0000</pubDate>
      <link>https://dev.to/sangam_shrestha_07/understanding-llm-hallucinations-why-ai-lies-and-how-to-fix-it-bm7</link>
      <guid>https://dev.to/sangam_shrestha_07/understanding-llm-hallucinations-why-ai-lies-and-how-to-fix-it-bm7</guid>
      <description>&lt;p&gt;AI writes code, builds apps, and answers complex questions in seconds. But it has a dark side: it lies to your face with absolute confidence.&lt;/p&gt;

&lt;p&gt;In tech, these believable fabrications are called hallucinations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Does AI Make Things Up?&lt;/strong&gt;&lt;br&gt;
LLMs do not actually "know" facts. They operate on probability:&lt;br&gt;
▪︎ Advanced Autocomplete: AI predicts the next most likely word, not factual truth.&lt;br&gt;
▪︎ &lt;strong&gt;Statistical Guesswork&lt;/strong&gt;: If data is missing, the model invents a plausible answer.&lt;br&gt;
▪︎ &lt;strong&gt;Optimized to Please&lt;/strong&gt;: AI prefers a confident lie over admitting "I don't know."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Real-World Risks&lt;/strong&gt;&lt;br&gt;
▪︎ &lt;strong&gt;Security Vulnerabilities&lt;/strong&gt;: AI can invent non-existent software packages, opening doors to malicious exploits.&lt;br&gt;
▪︎ &lt;strong&gt;Ruined Credibility&lt;/strong&gt;: Shipping broken code or publishing false data destroys user trust instantly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to Fix Your Workflow&lt;/strong&gt;&lt;br&gt;
You don't need to stop using AI—you just need to secure it:&lt;br&gt;
▪︎ &lt;strong&gt;Ground the AI&lt;/strong&gt;: Provide specific source documentation and restrict the model from answering outside of it.&lt;br&gt;
▪︎ &lt;strong&gt;Lower the Temperature&lt;/strong&gt;: Drop your API temperature parameter toward 0 to kill unwanted creativity.&lt;br&gt;
▪︎ &lt;strong&gt;Human-in-the-Loop&lt;/strong&gt;: Treat AI outputs as an unverified draft. Never push to production without a human review.&lt;/p&gt;

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