Hallucination
What is Hallucination?
Hallucination is the failure mode in which an LLM produces fluent output that is factually wrong, fabricated or unsupported by the provided context. It is not a bug to be patched but a property of how language models sample from a probability distribution, which means commerce systems must design around it instead of expecting it to disappear.
Definition
Technically, Hallucination occurs because LLMs predict the next token by likelihood, not by truth, so they will gladly continue a confident-sounding sentence with invented numbers, product names or citations when training data is sparse or the prompt under-specifies. Severity ranges from harmless paraphrase to invented SKUs, wrong prices and fabricated policy clauses. Mitigations include Retrieval-Augmented Generation to ground answers in source documents, structured Tool Use so the model fetches data rather than recalls it, lower decoding temperature, self-consistency voting, and Guardrails that block low-confidence outputs. Eval pipelines track hallucination rates per task by comparing claims against a ground-truth corpus.
Why it matters
A single hallucinated specification on a high-traffic product page can drive chargebacks, complaints and legal exposure, especially in regulated categories like electronics, cosmetics or finance. Worse, the failure looks confident, so human reviewers miss it more often than crude bugs. Treating Hallucination as a measured operational metric, alongside latency and cost, lets commerce teams set acceptable thresholds per use case: tolerant for brainstorming, near-zero for product attributes. In a Composable Commerce stack this is enforced by routing factual queries through grounded services such as the catalog, the Knowledge Graph and the Recommendation Engine, and by reserving open generation for low-risk surfaces.
Use cases
A product-description agent uses Retrieval-Augmented Generation against the PIM, so every claim cites a source field and any uncited sentence is dropped. A support agent answers only from approved help-center articles and falls back to a handoff template when context is missing. A pricing copilot is forbidden from quoting numbers in prose and must invoke a get_price tool, with the output rendered verbatim in the response.
Related
Explore Agentic Frontend Management Platform · Composable Digital Experience Platform.