When I first built an LLM agent for a client's fee recovery workflow, the prototype worked great in testing. Then we ran it against 200 real accounts and found it had invented three policies the company had never had.
It wasn't hallucinating facts — it was hallucinating business logic. That's a different and more dangerous problem.
Separate reasoning from retrieval. The agent shouldn't "know" your business rules — it should look them up. Every policy, every threshold, every decision criteria should live in a structured store the agent can query. The LLM's job is to orchestrate and reason, not to remember.
Constrain the output space. An agent that can return free-form text will eventually return something unexpected. Where possible, route agent outputs through typed schemas. If the agent is deciding between three actions, give it exactly three choices — not an open field.
Build verification into the loop. Before any consequential action (sending a message, updating a record, triggering a payment), add a verification step. This can be a second model pass, a rules engine check, or a human approval queue. The cost of this step is trivial compared to the cost of a wrong action at scale.
Eval-driven development. Before you deploy, build a suite of test cases that represent the hard cases: conflicting rules, ambiguous inputs, known edge cases from your domain. Run every agent change against this suite. Your eval set is worth more than your unit tests.
The agents that work in production are the ones where the engineer understood that an LLM is a reasoning engine, not a business rules database. Keep those concerns separate, and the system becomes dramatically more reliable.