Skip to content
AI-powered appsNewChat, vision, voice, generationBookings & schedulingAppointments that book themselvesShops & sellingA storefront in every pocketClient & businessRun the operation from one placeCommunities & clubsA home that is not a group chat
Health & wellnessHabits, tracking and calmGames2D, 3D and multiplayerPersonal & toolsThe tool you wish existedInternal toolsThe tool ops never had time for
See all use cases
ArcadeNewPricingSecurity
EngineThe game engine and World EditorHow it worksFrom one sentence to a live productDocsGuides for building and publishingBlogStories, guides and newsChangelogWhat shipped latelyStatusUptime of every serviceSupportGet help from the team
AI-powered appsBookings & schedulingShops & sellingClient & businessCommunities & clubsHealth & wellnessGamesPersonal & toolsInternal tools
See all use cases
ArcadeNewPricingSecurity
EngineHow it worksDocsBlogChangelogStatusSupport
Language
Blog
GlossaryNovember 22, 20263 min read

What is AI hallucination?

A hallucination is a confident, fluent answer that happens to be wrong. It follows from how language models work, and the fixes are about grounding and checking, not hoping.

Startbase Team
Editorial ink illustration of a confident street sign pointing down a road that ends at a cliff edge, the sign arrow in ember orange

Key takeaways

  • A hallucination is AI output that sounds right but is false or invented, such as a fake citation or a function that does not exist.
  • It happens because models generate likely text rather than look facts up.
  • Reduce it by giving the model the source material, asking for structured output, allowing "I don't know", and verifying by running or checking.

An AI hallucination is output from an AI model that is presented confidently but is false, unsupported or made up, like an invented statistic, a quote nobody said, a court case that does not exist, or code that calls a library function with the right-sounding name and no real existence.

An everyday parallel is a well-meaning stranger asked for directions in a city they half know. Rather than say "not sure", they point confidently down a street. The tone gives no clue that they are guessing.

Why it happens

A large language model produces text by predicting what plausibly comes next. For well-covered facts, plausible and true usually coincide. For rare facts, recent events, exact numbers or specifics it never saw, the most plausible-sounding continuation can be invented. Training rewards fluent, helpful answers, so without care a model may fill a gap rather than admit it. Missing context makes it worse: ask about your own company's refund policy without supplying it, and the model will describe a typical one.

The forms it takes

  • Invented facts and figures: a precise percentage with no source.
  • Fake references: real-looking article titles, URLs or paper authors that do not exist.
  • Code hallucinations: imports of packages that were never published, options a library does not support, outdated APIs.
  • Misread input: a summary that adds a claim the document never made.
  • False confirmation: "I have fixed the bug" when nothing was tested.

How this plays out when you build with Startbase

For code, the cure is running it. Startbase's agent tests what it builds and runs your app before it finishes a turn, so a made-up function or package tends to surface as an error it then fixes, rather than reaching you (how the agent checks its work). It is still worth clicking through the changed screens yourself, and if a turn went wrong, restore the earlier version (checkpoints and undo). When something is broken, describe what you see rather than accept a claimed fix (fixing bugs with AI).

For AI features inside your own app, design against hallucination from the start:

  1. 01Ground it: put the real source text in the prompt, retrieved from your data (what RAG is).
  2. 02Allow "I don't know": tell the model to say so when the answer is not in the provided text, and show that state in the UI.
  3. 03Ask for structure: JSON with fixed fields and allowed values is easier to validate than free prose.
  4. 04Show sources: link each answer to the passage it came from so users can check.
  5. 05Keep humans on high-stakes calls: anything medical, legal, financial or irreversible gets a review step.
Make the help assistant answer only from our help articles. For each question, retrieve the three most relevant articles and pass them to invokeLLM with the instruction: answer only from these articles; if they do not contain the answer, reply exactly "I could not find that in our help center" and offer the contact form. Show links to the articles used under each answer.

Common confusions

  • "Newer models do not hallucinate." They do it less in many areas, but no current model is free of it. Design for checking.
  • Hallucination vs bias. Bias is a skewed pattern in answers; hallucination is fabricated content. Both need different checks.
  • "Asking it to be accurate fixes it." Instructions help a little. Supplying the facts and verifying the output help far more.

For the broader question of trusting generated software, read is AI-generated code safe?

Frequently asked questions

Can AI hallucination be fully eliminated?

Not with current technology. It can be reduced a lot by grounding answers in real sources, constraining the output and checking results automatically or by a person.

How do I spot a hallucination?

Be most suspicious of specific details: exact numbers, names, dates, quotes, links and package names. Check them against a source or by running the code.

On this page

  • Why it happens
  • The forms it takes
  • How this plays out when you build with Startbase
  • Common confusions

Keep reading

More in Glossary
Editorial ink illustration of a hand-cranked music box drum plucking a metal comb, the crank handle in ember orange
GlossaryNovember 22, 2026

What is a game loop?

Every real-time game runs one repeating cycle: read input, update the world, draw it. Here is what that cycle looks like and why it decides how your game feels.

3 min read
Editorial ink illustration of a brass stopwatch beside a small wind-up toy car, the second hand in ember orange
GlossaryNovember 22, 2026

What is delta time?

Delta time is the number that keeps your game the same speed on every screen. Here is how to use it, where it breaks, and how to spot a game that forgot it.

3 min read

Read less. Ship more.

Everything in this post is one prompt away. Describe your app and watch it build.

Start building

Apps, games, backends and publishing from one conversation.

Product

  • Features
  • Use cases
  • Pricing
  • Changelog

Resources

  • Blog
  • Docs
  • Support
  • Status
  • Security

Contact

  • w@startbase.ai
  • X / Twitter
  • LinkedIn
  • Instagram

Legal

  • Terms
  • Privacy

© 2026 Startbase. All rights reserved.