The problem
A major regulated enterprise wanted to offer customers conversational regulated guidance: what they spend, where it goes, what a realistic savings habit could look like. The demand is obvious and so is the trap. In a regulated market there is a legal line between giving information and giving advice, and a fluent model drifts across that line in a single friendly sentence. "You spent this much on subscriptions" is information. "You should move that into this product" is regulated advice, with suitability obligations attached and a person accountable for it.
I designed the architecture for a governed conversational adviser: spending insight and savings guidance on the safe side of the boundary, a deterministic layer for every number, citations for every claim, and escalation to a human adviser the moment a conversation asks for more than guidance.
Why it was hard
The boundary is not a topic list. The same question can be information or advice depending on phrasing, customer circumstances and what was said three turns earlier, so a static blocklist fails in both directions: it refuses harmless questions and misses the drift that matters. The boundary had to be classified per turn, in context, and enforced by something stronger than a system prompt.
Numbers were the second hazard. A guidance assistant that miscalculates a customer's own spending destroys trust instantly and unfairly, because the customer can check. Language models are the wrong tool for arithmetic and the right tool for explanation, and the architecture had to keep those jobs physically separate.
And refusal itself is a product surface. A wall of "I cannot help with that" teaches customers the assistant is useless; the design needed refusals that explain the boundary and offer the human path.
Key decisions
Every turn passes a suitability router before any generation: a classifier tiered against the boundary, with ambiguous turns treated as advice-side by default. The failure mode is a conservative handoff, never a quiet overstep.
All arithmetic lives in a deterministic calculation layer: spending aggregation, categorisation, projections, comparisons. The model receives computed results and composes the explanation. It cannot produce a number the calculation layer did not.
Model answers cite approved content. The composer works from a versioned knowledge base of approved guidance material, and a blocking guardrail strips or regenerates any claim without a source.
Refusal behaviour was designed and evaluated as a feature, with its own test set: decline the advice, explain why in plain language, and offer the adviser handoff in the same breath.
The whole stack runs on the enterprise's GCP estate: managed conversational infrastructure at the front, managed model endpoints for composition, the calculation layer as ordinary governed services against curated data.
Architecture
The customer talks to the assistant in the enterprise app. Each turn crosses the suitability router; guidance-side turns fan out to the calculation layer and the approved content base, and the composer assembles a cited answer that must clear the blocking guardrails before it renders. Advice-side turns route to a human adviser with the conversation context packaged for a warm start.
The separation of jobs is total. The calculation layer computes against the customer's own transaction data through governed services; the model never sees raw balances to add up, only computed results to explain. The composer's context is the calculation output plus retrieved approved content, rebuilt fresh each turn.
Trade-offs
Treating ambiguous turns as advice-side means the assistant sometimes hands off a question it could arguably have answered, and that conservatism is the licence to operate; the cost of an over-careful handoff is a minute of an adviser's time, the cost of the opposite error is a suitability breach. The deterministic layer means new guidance capabilities need engineering work rather than a prompt edit, which slows the roadmap and keeps every number defensible. Citing only approved content narrows what the assistant can say to what the organisation has agreed to say, and in a customer conduct setting that is precisely the property you want.
Governance
The suitability router, the guardrails and the refusal behaviour each carry their own evaluation set, including adversarial phrasings designed to walk the assistant across the boundary. Every rendered answer is reconstructable: the turn classification, the calculation inputs and outputs, the retrieved content versions and the final text. The pattern shipped as a certified pattern with its evaluation pack and control mapping, and the boundary tests run on every change, because the boundary is the product's most load-bearing feature.
Outcome
The programme took the design through build and assurance for a major regulated enterprise. The shape that survived review, deterministic numbers, cited composition, a per-turn boundary classifier and a designed handoff, became the reference for other customer-facing conversational work, and the adversarial boundary test set turned out to be the most reused artefact of the engagement.
What I learned
Suitability is a per-turn property, not a product category, and anything that treats it statically will fail an honest test. Splitting computation from explanation removed the entire class of arithmetic hallucination instead of mitigating it. And a well-written refusal is not a failure state; done properly, the handoff to a person is the moment the customer trusts the machine most.