What is a hallucination?
BeginnerConceptLLM fundamentals
Answer
A hallucination is a confident answer that is false or made up, such as an invented CLI flag, a fake config key or a non-existent API. It happens because the model generates plausible text, not verified facts. You reduce it with retrieval (RAG), tools that fetch real data, instructions to say "I don't know", and evaluation.