Back to Blog
llm-guardrailscatalogquotingclaudestructured-output

Prevent AI Hallucination in Product Recommendations (Simply Explained)

A plain-language guide to prevent AI hallucination product recommendations. No jargon, no tech speak, just what it means for your business.

By Mike Hodgen

Want the full technical deep dive? Read the detailed version

The fear that stops most businesses from using AI

A guy who sells packaging supplies came to me with a simple ask. About 20 products total. He wanted a smart assistant on his website that could answer questions like "what do I use to ship fragile candles" and point the customer to the right box.

His first question wasn't "can it be smart." It was "can it lie to my customers."

That's the right question. It's the only one that matters before you put AI in front of people who are about to spend money. Because the moment your assistant confidently recommends a product you don't actually sell, you've built something worse than useless. You've built a machine that promises things you can't deliver, in your own brand voice.

I hear this fear in every conversation with a business owner. "What if it makes something up." "What if it promises a discount we don't offer." "What if it says we still carry something we stopped selling." Same worry underneath. The AI will confidently invent things, and the customer won't know the difference.

Here's the thing. That fear is completely correct. Left on its own, AI will absolutely do this. But most people get the fix wrong.

Why telling the AI "don't lie" doesn't work

The first thing almost everyone tries is to add an instruction: "Only recommend products we actually sell." Then they launch it.

That helps. It does not solve the problem. And the gap between "mostly honest" and "never lies" is exactly where your reputation lives.

Here's why. AI that reads and writes like a human isn't looking anything up. It's guessing the most likely next words based on everything it has ever read. Most of the time those guesses land on real products. But ask it an unusual question, phrase it the wrong way, and it'll invent something that sounds totally believable. It'll suggest a "Heavy Duty Mailer, model HD-1200" because that's exactly the kind of thing a packaging company would sell. It just isn't a thing this guy sells.

You told it "only recommend real products." It agreed, sincerely, and then made one up anyway, because it has no actual way to know what's real. It's just matching the pattern of what a good answer looks like.

Here's the line I make every client sit with. If a wrong answer can ever reach a customer, you don't have a safe system. Not "rarely wrong." Not "usually right." If there's any path where a fake product can show up on the screen, your AI can lie to your customers, and you're one weird question away from finding out.

The only real fix is to stop trusting the AI to police itself. You put a checkpoint between the AI and the customer. Code that cannot be talked into anything, cannot get confused, and cannot improvise.

That checkpoint is built from three moves.

The three moves that make it safe

Move one: hand the AI the actual menu.

By default, when you ask the AI about packaging, it pulls from everything it has ever read. Vague, fuzzy, disconnected from your real inventory. That's where the made-up products come from.

So you take that away. You hand it the literal list, every real product, the name, the size, what it's for, whether it's in stock. Right before it answers the question.

For 20 products this is dead simple and basically free. Now the AI's job changes completely. It's no longer "know about packaging." It's "pick from this exact list." The customer says "I ship fragile candles," and the AI matches that plain-English request to the real products that fit. It's doing the thing it's genuinely good at, understanding messy human language, while pointed at a real, finite set of options.

For a store with 5,000 products, you don't hand it everything. You first narrow it to the 30 or 50 products that match the question, then hand it those. The principle is the same: the AI only ever sees real products.

Move two: make it answer in a strict format.

Now I force two rules. First, the AI has to copy the product code exactly, character for character, from the list I gave it. No paraphrasing, no "close enough."

Second, it has to answer in a strict, structured form instead of a friendly paragraph. People resist this one because a paragraph feels warmer. But a paragraph is exactly what makes a fake product invisible.

Think about the sentence "I'd suggest our heavy-duty candle mailer for that." Where's the part my code can actually check? There isn't one. "Heavy-duty candle mailer" is just a phrase. A fake product hides perfectly inside a friendly sentence.

So instead, I make it return each recommendation as a clean line item with the exact product code in its own slot. The explanation can be as conversational as you want, because nothing in the explanation gets trusted. Only the code does, and the code is checkable.

Move three: the checkpoint that rejects anything fake.

This is the actual guardrail. After the AI gives its answer, plain code, not AI, takes every product code and checks it against the real list. Is this code one we actually sell? Yes, it passes. No, it gets thrown out before the customer ever sees it.

That's it. That's the move that turns "usually right" into "cannot be wrong."

The AI proposes. The code decides. The AI can suggest whatever it wants, and it doesn't matter, because nothing reaches the customer without clearing a check the AI has no ability to bend. The checkpoint isn't smart. It doesn't reason. It can't be talked into anything. It just compares against the list, and a made-up product fails that comparison every single time.

When something fails the check, the system has honest options. Drop that one and show the ones that passed. Ask the AI to try again. Or say "let me connect you with our team for that one." What it never does is show a customer a product that doesn't exist. There's no path where that happens.

The same guardrail, all the way through checkout

This distributor didn't just want recommendations. He wanted a real quote the customer could act on. So we carried the exact same protection through to the quote.

The quote builder only accepts product codes that already passed the check. It pulls the real price and real stock for each one from the actual price book, then builds a branded quote. The AI never invents a price, never guesses at a discount, never promises a quantity you can't fulfill. Every number on that quote traces back to a real product with a real price.

And before the quote goes out, it stops for a human. A quote is a promise your business has to honor, so the owner or a rep glances at it, confirms, and sends. A few seconds of human time, full protection on the money side.

So the full loop: a customer types "I ship fragile candles, need about 200 a month." The assistant matches that to real, in-stock products, builds a branded quote with real pricing, a human approves it, and it goes out. Plain-English question in, real quote out, nothing on it the business can't actually deliver.

The pattern works for any business

That catalog had 20 products. The exact same approach works for a 500-product store, a 12-item services menu, a price book, a software pricing page. Anything with a real, finite list of things you actually deliver.

Three moves, and they don't change with size:

  • Hand the AI the real list, so it chooses from reality, not guesses.
  • Make it copy exact codes in a strict format, so every claim is checkable.
  • Run every answer through a checkpoint, so nothing fake reaches a customer.

That sequence is the whole difference between an AI demo and an AI you can actually put in front of paying customers. A demo looks great in a quiet room. A real product survives the weird question at 11pm from a customer about to spend money.

Here's what I told that distributor, and it was literally true. Built this way, the AI physically cannot recommend something you don't sell. Not "is trained not to." Cannot. The fake product fails the check and never shows up.

If you've held back from using AI because you're scared it'll lie to your customers, your instinct is right. Most AI out there deserves that skepticism. But the fear points at a problem you can actually solve. The fix isn't a cleverer instruction. It's the way the thing is built, and that's the part I do.

Want to explore what AI could do for your business?

Book a free 30-minute strategy call. No pitch deck, no sales team, just a real conversation about your operations and where AI fits.

Book a Discovery Call

Get AI insights for business leaders

Practical AI strategy from someone who built the systems — not just studied them. No spam, no fluff.

Ready to automate your growth?

Book a free 30-minute strategy call with Hodgen.AI.

Book a Strategy Call