Kodokon kodokon.com

What AI does well… and what it gets wrong

Learn to spot hallucinations, outdated knowledge, and the overconfidence of assistants.

7 min · 3 questions

Open this lesson in Kodokon

For learning to code, a generative AI is a formidable ally. It excels at: explaining a concept at your exact level, rephrasing things differently when you didn't get it, giving extra examples on demand, creating tailor-made exercises, and reviewing your work to point out your mistakes. No textbook adapts to you like this, and no teacher is available 24/7. But this ally has three flaws you need to know before trusting it.

First flaw: hallucinations. A hallucination is an answer that is false but phrased as if it were obvious. Remember the previous lesson: the model produces *plausible* text, not *verified* text. Real examples: inventing a JavaScript function that doesn't exist (such as a made-up array.shuffle()), citing a book that was never written, or attributing a quote to the wrong person. The text is fluent, confident, well built… and wrong.

Second flaw: outdated knowledge. A model is frozen at the moment its training stops; that date is called the knowledge cutoff. Anything that appeared afterward - a new version of a language, a new library, current events - is unknown to it, unless the assistant has a web-search tool. In practice: if you ask "what is the latest version of Python?", the answer may be out of date without anything signaling it.

Third flaw: overconfidence. A competent human says "I don't know" or "I'm not sure". An LLM, by default, produces an affirmative answer, because hesitant texts are rare in its training. The result: the more of a beginner you are, the more you risk taking a guess for a fact. The remedy: explicitly ask the model to distinguish what is certain from what is not.

PROMPT
You are a rigorous assistant who would rather admit uncertainty than make things up.

Answer my question below while strictly following these rules:
1. Clearly distinguish ESTABLISHED FACTS from ASSUMPTIONS.
2. If you are unsure about a point, write "TO VERIFY:" in front of it.
3. State your knowledge cutoff date and flag what may have changed since.
4. End with a list of the official sources where I can check for myself.

My question: [write your question here]
A reusable safeguard: force the AI to show its uncertainties.

The right habit to adopt starting today: treat AI as a starting point, never as a final source. For any important piece of information (a syntax, a version, a fact), cross-check it against the official documentation or a reference source. This small verification effort is not a waste of time: searching the documentation is a programming skill you train along the way.

PROMPT
You just told me the following: [paste the AI's statement here].

Now play devil's advocate: give me the reasons this statement might be false, incomplete, or outdated, then tell me exactly how to verify it myself (which official documentation to consult, what to look for in it).
Making the AI doubt its own answer: simple and highly effective.

Knowledge check

Make sure you remember the key points of this lesson.

  1. What is a hallucination in a generative AI?
    • A bug that crashes the application
    • A false answer presented confidently as if it were true
    • A deliberately misleading answer programmed by the publisher
  2. What does a model's "knowledge cutoff" refer to?
    • The date your subscription expires
    • The deadline after which your conversations are deleted
    • The end date of its training: it knows nothing that appeared after it
    • The release date of the mobile app
  3. The AI answers you in a very confident tone. What should you conclude?
    • Nothing: a confident tone does not prove the answer is correct
    • That the answer is reliable, otherwise it would have expressed doubt
    • That the answer comes from an official source