How do you stop an LLM from inventing answers when the tool call never ran?

Aggressive-Narwhal-3 · reddit · 2026-10-04

An engineer's postmortem on a Slack order-lookup bot: a 6-digit-only regex meant 5-digit order numbers never triggered tool calls, so the LLM improvised fake answers. Fixes: accept both lengths, strip Slack markup, search all order states, feed the bot's action log into model facts, force an explicit 'searched everything, not found', and add format tests. Open question: a general rule preventing hallucination when a tool call silently fails.

Original post →

More from coding & agent

coding & agent channel →