AI Hallucination — AI Technical Interview Questions & Answers

AI Hallucination

AI Hallucination

  • Hallucination: the model outputs fluent text that is false — fake citations, wrong dates, invented APIs. LLMs predict likely words, not a truth database. Mitigate: retrieval (RAG), citations, human check, lower temperature for facts.
  • Classroom: ask for a paper title that does not exist — a chat model may invent one. That demo is the warning.
  • AI Hallucination — output: warning. LLMs predict likely words, not a library catalogue.

Technical Interview Tip: What it is + one mitigation.

Code Examples for AI Hallucination

Example

# Hallucination
print("Asked: cite the 2019 Sharma paper on jug algorithms.")
print("Model: invents author, title, year — looks real.")
print("Fix: retrieve docs / ask a human / lower temperature.")

AI Hallucination — output: warning. LLMs predict likely words, not a library catalogue.

How to Explain AI Hallucination to an Interviewer

Explain AI Hallucination as if you are teaching a junior — definition, then one example.

Fluent but false. Fix : RAG + human check.

What does the example print, and what does that prove?

AI Hallucination — output: warning

What mistake do freshers make with AI Hallucination?

Only the buzzword, no example