> ## Documentation Index
> Fetch the complete documentation index at: https://university.gumloop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Hallucinations | AI Fundamentals

> Why AI models sometimes make things up, how to spot it, and the verification mindset you need to work with AI effectively.

<div id="gumloop-auth" data-token={user?.accessToken || ''} data-email={user?.email || ''} style={{display: 'none'}} />

<div className="lesson-page">
  <div className="lesson-breadcrumb">
    <a href="/">University</a>

    <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="chevron">
      <path d="m9 18 6-6-6-6" />
    </svg>

    <a href="/ai-fundamentals/what-is-an-ai-model">AI Fundamentals</a>

    <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="chevron">
      <path d="m9 18 6-6-6-6" />
    </svg>

    <span className="current">Hallucinations</span>
  </div>

  <div className="lesson-card">
    <h1 className="lesson-title">Hallucinations</h1>

    <p className="lesson-desc">AI models sometimes generate plausible-sounding information that is completely wrong. Understanding why — and building the habit of checking — is essential.</p>

    <div className="lesson-content">
      <h2>What Is a Hallucination?</h2>

      <p>A <strong>hallucination</strong> is when an AI model confidently generates information that sounds right but isn't. It doesn't know it's wrong. It's not lying. It's doing what it always does — predicting the most likely next words — and sometimes that prediction lands on something false.</p>

      <p>This happens because models are pattern matchers, not fact databases. They learned from billions of web pages, and they're very good at producing text that <em>looks</em> like correct information. But "looks correct" and "is correct" are not the same thing.</p>

      <h2>Why Do Models Hallucinate?</h2>

      <ul>
        <li><strong>Pattern prediction can go astray</strong> — the model picks the statistically likely next word, not necessarily the factually correct one. When it hasn't seen enough examples of a topic, it fills in the gaps with plausible-sounding guesses.</li>
        <li><strong>Models rarely say "I don't know"</strong> — they're trained to be helpful, which means they'll attempt an answer even when they shouldn't. A confident tone doesn't mean a correct answer.</li>
        <li><strong>Knowledge cutoff dates</strong> — models are trained on data up to a certain point. Ask about something that happened after that date, and the model may fabricate an answer rather than admitting it doesn't have the information.</li>
      </ul>

      <h2>Hallucination in the Wild</h2>

      <p>Here are three real scenarios where hallucination shows up:</p>

      <table>
        <thead>
          <tr><th>Scenario</th><th>What happens</th><th>Why it's dangerous</th></tr>
        </thead>

        <tbody>
          <tr><td><strong>Contact enrichment</strong></td><td>You ask the model to look up someone's job title and company. It invents a plausible-sounding role at a real company.</td><td>You send a personalized email to the wrong person at the wrong company.</td></tr>
          <tr><td><strong>Math and calculations</strong></td><td>You ask the model to calculate revenue growth. It produces a number that looks right but is wrong.</td><td>You present incorrect numbers in a report or deal review.</td></tr>
          <tr><td><strong>Tool invention</strong></td><td>You ask the model to use a tool that doesn't exist. Instead of saying it can't, it pretends to call a made-up tool and fabricates a result.</td><td>You act on data that was never actually retrieved from any system.</td></tr>
        </tbody>
      </table>

      <h2>Other Model Limitations</h2>

      <p>Hallucination isn't the only quirk. Models have a few other tendencies to be aware of:</p>

      <ul>
        <li><strong>Sycophancy</strong> — models tend to agree with you even when you're wrong. If you say "This looks correct, right?" the model is biased toward saying "You're absolutely right!" rather than pushing back.</li>
        <li><strong>Struggles with randomness</strong> — ask a model for a truly random number and it'll often pick something predictable. It's a pattern machine, and randomness is the opposite of patterns.</li>
        <li><strong>Character and word counting</strong> — models process text as tokens (chunks of text), not individual characters. Counting letters in a word or words in a sentence is surprisingly unreliable.</li>
      </ul>

      <div className="lesson-callout">
        <div className="lesson-callout-header">
          <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
            <path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5" />

            <path d="M9 18h6" />

            <path d="M10 22h4" />
          </svg>

          <span>The best defense is tools</span>
        </div>

        <p>Hallucination is most dangerous when models guess instead of looking things up. The more real data you give an agent through tools, the less it needs to guess — and the less it hallucinates.</p>
      </div>

      <form className="quiz-widget">
        <h3>Quiz: Why do AI models hallucinate?</h3>

        <input type="radio" name="q-quiz" id="q-q0" className="quiz-input" />

        <input type="radio" name="q-quiz" id="q-q1" className="quiz-input" />

        <input type="radio" name="q-quiz" id="q-q2" className="quiz-input" />

        <input type="checkbox" id="q-check" className="quiz-check-input" />

        <label htmlFor="q-q0" className="quiz-option">
          <span className="quiz-circle" />

          <span>The model intentionally makes things up to fill gaps in conversation.</span>
        </label>

        <label htmlFor="q-q1" className="quiz-option quiz-correct">
          <span className="quiz-circle" />

          <span>The model predicts statistically likely words, which can sound correct but be factually wrong.</span>
        </label>

        <label htmlFor="q-q2" className="quiz-option">
          <span className="quiz-circle" />

          <span>Hallucinations only happen with older, outdated models.</span>
        </label>

        <div className="quiz-explain-correct quiz-explanation">
          Correct! Models are pattern matchers, not fact databases. They predict the most likely next words, and sometimes that prediction lands on something plausible but false.
        </div>

        <div className="quiz-explain-wrong quiz-explanation">
          Not quite. Models don't have intent — they're not trying to deceive. Think about the core mechanism of how they generate text.
        </div>

        <div className="quiz-actions">
          <label htmlFor="q-check" className="quiz-check-btn">Check</label>
          <button type="reset" className="quiz-reset-btn">↺ Reset</button>
        </div>
      </form>
    </div>
  </div>

  <div className="lesson-nav-grid">
    <a href="/ai-fundamentals/what-is-an-ai-model" className="lesson-nav-card">
      <span className="nav-label">
        <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
          <path d="M19 12H5" />

          <path d="m12 19-7-7 7-7" />
        </svg>

        Previous Lesson
      </span>

      <span className="nav-title">What is an AI Model?</span>
    </a>

    <a href="/ai-fundamentals/tokens-and-costs" className="lesson-nav-card lesson-nav-next">
      <span className="nav-label">
        Next Lesson

        <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
          <path d="M5 12h14" />

          <path d="m12 5 7 7-7 7" />
        </svg>
      </span>

      <span className="nav-title">Tokens, Costs & Paying for Gumloop</span>
    </a>
  </div>
</div>
