The assistant keeps recommending products you stopped selling
In short
An AI shopping assistant that recommends out of stock products is usually not hallucinating. Four faults produce the same sentence: a stale retrieval index, a lifecycle field missing from the indexed document, a model answering from memory, and a tool returning rows your storefront would never show. One check separates them — ask again and see whether a tool call happened at all.
Key takeaways
- Check whether a tool call happened before anything else — that single observation splits 4 causes into 2 pairs.
- A retrieval index that lags the catalogue by hours is a cadence problem, not a model problem, and no prompt fixes it.
- If the indexed document has no lifecycle field, retrieval cannot filter on availability no matter how good the embedding is.
- Deleting a discontinued product is worse than retiring it: the index keeps the copy and the URL starts returning 404.
- A tool wrapping an internal catalogue API will happily return draft, unpublished and regionally delisted rows unless filters are explicit.
Start by ruling out the explanation everyone reaches for. A model inventing a product it has never seen is rare in a working assistant; naming a product you genuinely sold until March is not invention, it is retrieval doing its job against data that no longer matches the shop. There are 4 mechanisms that produce that behaviour, they need different fixes, and 1 observation separates them.
This is the failure mode most likely to reach a customer, because a discontinued recommendation reads as confident and correct right up to the moment somebody tries to buy it. It is also the one that undermines the case for the assistant internally faster than any latency number.
The check that splits it in 10 minutes
- Reproduce the answer with the exact wording the customer used, and capture the full trace: the messages, any tool calls, the arguments sent, and the raw tool responses. If your assistant does not log tool calls with arguments, stop here and add that — every question below is unanswerable without it.
- Call the tool yourself with the same product identifier or query, outside the assistant, and record what comes back.
- Fetch the indexed document for that product directly from the retrieval store, and read its fields — not just the text, the metadata.
- Look up the product in the catalogue of record and note its lifecycle state, its published state per region, and when it last changed.
- Compare all 4. The pattern of agreement tells you which layer is lying.
| What the trace shows | What it means | Where to look next |
|---|---|---|
| No tool call was made at all | The answer came from the model's own memory or from a system prompt, not from your data | Tool-call enforcement and prompt design |
| A tool call was made and returned the withdrawn product | Your tool is exposing rows the storefront would not show | Query filters and the tool's read boundary |
| A tool call returned nothing, but the retrieval store still holds the document | The index is stale or the delete never propagated | Index refresh cadence and deletion handling |
| Tool and index agree the product is live, and only the catalogue says otherwise | The lifecycle change never left the system of record | The publish pipeline, not the assistant |
Row 4 is the one that changes the meeting. It is not an AI problem at all: the assistant is faithfully reporting what your own systems believe, and the withdrawal never propagated past the merchandising screen where somebody clicked it.
Cause 1: the index lags the catalogue, and nobody set the cadence
Most retrieval indexes are rebuilt on a schedule inherited from the first proof of concept — nightly, because that was easy in week 2. A catalogue that changes hourly against an index that changes daily produces exactly this symptom, and it gets worse in the weeks when merchandising is most active.
- Distinguish addition lag from deletion lag. Many pipelines upsert on change and never delete, so a withdrawn product stays retrievable forever while new products appear promptly.
- Check that the identifier used for upsert is the same one used for delete. A pipeline keyed on a product id that writes and a pipeline keyed on a URL that deletes will leave orphans indefinitely.
- Measure the lag rather than guessing: pick 20 products changed in the last week and check how long each took to appear correctly in the index.
- Two-speed retrieval is the durable answer — a slow semantic index for finding candidates, a live authoritative call before anything is quoted or committed, as set out in grounding an assistant in a catalogue that moves.
Cause 2: the indexed document has no field that says the product is gone
Retrieval can only filter on fields that exist in the document. A pipeline that indexes title, description and category — the 3 fields that make embeddings look good in a demo — leaves the retriever with nothing to exclude on. The document then competes on relevance forever, and the product sounds appealing because the copy was written when it was appealing.
The fields worth carrying on every indexed document are unglamorous: lifecycle state, published state per market, availability at index time, the last-updated timestamp, and the identifier that joins back to the catalogue of record. That list is a subset of the readiness gate in what has to be true before an assistant may quote price and stock, and skipping it is why so many assistant projects stall at the demo.
A related variant hits configurable products specifically: the parent is live, 1 variant is withdrawn, and the indexed document describes the parent. The assistant recommends a combination that cannot be bought, which is the same defect that produces orders arriving for combinations that do not exist. If your catalogue has variants, the index has to hold their state, not the parent's summary.
Cause 3: the model answered from memory because nothing made it call the tool
If the trace shows no tool call, retrieval is innocent. The model produced a plausible answer from training data, from a summary sitting in the system prompt, or from earlier turns in the conversation where a product was mentioned while it was still live. Long conversations make this worse: a product named 12 turns ago is in context, and context is cheaper to use than a tool.
- Make product-specific claims structurally impossible without a tool call — no name, price, availability or policy statement unless it came from a response in this turn.
- Give the assistant a way to say it does not know, and treat refusal as a passing outcome in evaluation rather than a failure, as an evaluation loop for a shopping assistant argues.
- Expire product facts from context. A recommendation made 10 turns ago is not evidence, and re-checking before a second mention costs 1 call.
- Add withdrawn products to the frozen evaluation set. This regression only appears when something has been removed, so a test set built from live products cannot catch it.
Cause 4: the tool returns rows the storefront would never show
This is the cause that appears when an internal API gets wrapped in a hurry. Admin and PIM endpoints exist to show merchandisers everything — drafts, scheduled products, regional delistings, items live in 1 market and withdrawn in another — and the filters that hide them are applied by the storefront, not by the data layer. Wrap the endpoint and the assistant inherits the merchandiser's view of the catalogue.
- Set the read boundary explicitly: published catalogue, live availability, published price, scoped to the requesting market. The full argument is in what a catalogue tool server may expose.
- Make the market a required argument rather than a default, because "available" without a market is a claim that is true somewhere and wrong here.
- Shape responses so the assistant cannot misread them: a status field the model has to acknowledge beats a silently absent one, which is the response-shaping point in designing the tools a shopping agent may call.
- Test the tool independently of the assistant, with withdrawn products as fixtures. Most teams only ever test it through the assistant, where a wrong row and a good answer can coexist.
What a correct fix still will not do
Fixing all 4 causes fixes the assistant you control. It does nothing about the copy of your catalogue sitting in a third-party surface, where an agent may hold a feed it fetched last week and answer from that. If discontinued products keep appearing outside your own assistant, the question is which of your published surfaces is stale, and the shape of that investigation is different — agents fetch your manifest and still skip your store covers the declaration side.
Two other symptoms look related and are not. If agents cannot reach your data at all, the cause is usually your own edge rules rather than your catalogue — bot protection blocking the buyers you want. And if the products are right but the numbers disagree at checkout, that is an authority problem between the agent's rendered state and your session, handled in the agent shows one total and your checkout session returns another.
| Cause | Distinguishing signal | Fix | How long the fix holds |
|---|---|---|---|
| Stale or undeleted index entries | Tool says gone, index still holds the document | Delete path keyed correctly, plus a measured refresh cadence | Until the pipeline changes; add a lag check to monitoring |
| No lifecycle field in the indexed document | Document has copy but no state to filter on | Re-index with state, market and timestamp fields | Durable, if the schema is owned and versioned |
| Model answering without a tool call | No tool call in the trace | Enforce tool use for product claims; expire context facts | Durable, and cheap to regression-test |
| Tool exposing unpublished rows | Tool call returns the withdrawn product | Explicit read boundary and required market argument | Durable, and it closes a data-leak risk too |
An assistant that recommends what you stopped selling is usually telling the truth about your data. The uncomfortable part is that a customer asked before anyone internal did.
Run the check before opening the prompt file — the answer is almost always in the trace, and the fix is almost always in the data layer rather than the model. Building that layer properly, with a read boundary and a schema somebody owns, is product build work. The rest of this silo sits under agentic commerce and AI shopping assistants, inside our retail and ecommerce practice.
Frequently asked questions
Short answers to the follow-ups this page tends to raise.
Is an assistant recommending discontinued products hallucinating?
Usually not. Hallucination means inventing something that never existed; recommending a product you genuinely sold last quarter means the assistant found it somewhere — in a stale index, in a tool response, or in its own training data. The trace tells you which, and only the last of those 3 is a model problem.
How do we tell a retrieval problem from a grounding problem?
Look at whether a tool call happened. If the assistant answered without calling anything, the problem is grounding: nothing forced it to consult your data. If it called a tool and the tool returned the withdrawn product, the problem is your data or your query filters. That single observation splits the 4 common causes into 2 pairs and saves days of prompt tuning.
Should we delete discontinued products from the catalogue?
No. Retire them with a lifecycle state and, where possible, a successor product. Deleting removes the record that tells your index to drop the document, breaks the URL for agents and crawlers that already know it, and destroys the history every report and return needs. A retired product is still answerable — the assistant can say it was withdrawn and offer the replacement.
How fresh does the retrieval index need to be?
Fresh enough for discovery, which is usually hours rather than minutes — but freshness is the wrong control on its own. Anything the assistant commits to, such as price, availability or a policy statement, should come from a live call to the authoritative system at the moment of answering, with the index used only to find candidates. That way index lag costs relevance rather than accuracy.
- agentic commerce
- retrieval
- catalogue data
- diagnostics
The work behind this page
Builds from our portfolio that this page draws on.
AskVault
An AI internal knowledge-search platform that answers employee questions from your own docs — grounded in citations, with knowledge gaps surfaced and deflection tracked.
Productivity AISupport Pulse
AI ticket triage and drafted replies for SaaS support teams — cut first response time and stop SLA leaks.
SaaS ToolsRead next
- The catalogue tool server: what it may expose, what it must never returnA read-only surface an agent may call over your catalogue. The definition is the boundary: published data and coarse availability in, cost price and customer-keyed data out.definition
- Agents fetch your manifest and still skip your storeA file that loads in your browser can be unreachable, unparseable or disqualifying to an agent. Three verdicts, and the ordered checks that tell them apart.diagnostic
- The agent confirmed the order and the charge failed afterwardsAn order exists, the shopper was told it is placed, and no money moved. The cause is almost never the card: it is one of the 4 constraints on the delegated token refusing the charge.diagnostic
- The agent shows one total and your checkout session returns anotherThe shopper saw one number and your server charged another. Replay the call sequence: the agent is nearly always displaying a response that a later call replaced.diagnostic
- The agentic checkout session: a cart your server ownsA server-side basket the merchant owns and an AI agent only renders. Every create, update or complete call returns the merchant's full current state — the property that makes agent buying safe to allow.definition
- The commerce manifest: the file an agent reads before anything elseA machine-readable declaration of what your store can do, served at a fixed path. It is not marketing, it carries no prices, and 3 serving conditions decide whether an agent can read it at all.definition
Working on something in this space?
Tell us where you are in a sentence or two. We'll tell you honestly whether we're the right team, and what a sensible first slice of the work looks like.
Start the conversation