AI + QA

Building a policy assistant for a regulated bank

What we learned building a policy assistant for a regulated bank, and why we built it to refuse.

Employees ask policy questions all day. Am I eligible for this allowance? How many days do I get? What happens if I move grade halfway through the year?

A chatbot over the policy manual looks like an easy win. A retrieval-augmented (RAG) demo takes an afternoon: split the documents, search them, hand the best passages to a language model, and let it write the answer.

The trouble starts when the bot is wrong. In a regulated bank, a confident wrong answer about an entitlement is not a small product bug. It becomes a grievance, an audit finding, or a promise the bank never meant to make.

We built an internal policy assistant for a regulated bank. The model was not the hard part. The hard part was deciding where the model is allowed to speak.

Start with what code can answer

Some questions have exact answers sitting in a table. Which allowance does each grade get? A language model reading a table can misread a row, so we do not let it try.

Facts that live in tables are read out of the policy document into lookups and answered in code. The same question gets the same answer every time, and no model is called.

Because the lookup is built from the document itself rather than typed in by hand, loading a new version of the policy updates the answers. There is never a second copy of the truth that can drift.

Ask before you guess

Many policy answers depend on who is asking. The right answer for one grade is the wrong answer for another.

A generic chatbot fills that gap with an assumption. Ours asks. If a question needs something the employee has not said, the assistant asks for it, holds on to the original question, and answers once it has what it needs.

Two kinds of “not in the policy”

Questions the assistant should not answer come in two kinds, and they need different treatment.

Far misses. The question has nothing to do with the documents. Search finds nothing close enough, and the assistant declines before any model sees the question.

Near misses. This is where most RAG bots go wrong. The policy contains text that looks related but does not actually answer the question, and the model stretches that nearby text into something that sounds right.

So before any answer is written, a separate model call asks one narrow question: does this text answer this question? Anything short of a clear yes, and the assistant says it cannot answer and points the employee to the policy owner.

The model writes, code cites

When the answer is in the policy, the model writes it, keeping the conditions and exceptions the policy attaches. It runs with no randomness, so the same question gets the same wording.

The section reference is attached by code from the passage that was retrieved. The model never writes a citation, so it cannot invent one. If an answer cannot be tied back to its source, it is thrown away.

Tone is applied last, as a wrapper. Changing how the assistant sounds never changes what it says.

Most questions never reach a model

Put those rules together and most real traffic is handled before a language model is involved at all. Table facts are answered in code. Missing details are asked for. Out-of-scope questions are declined. Only questions with a real answer in the policy take the path through the model.

That is safer, and it is also faster. The model calls are where the waiting happens, and most questions skip them.

What we would tell anyone building one

List the questions with exact answers, and answer them in code. If a lookup can be computed, it should not be generated.

Decide what the bot must know about the user before it answers. Then make it ask, every time.

Treat a refusal as a correct answer. On a compliance surface, “I can’t answer that, please check with HR” is far better than a confident answer that is wrong.

Keep the safety rules in code you can read line by line. A framework can route the flow between steps. It should not own what the assistant is allowed to say, because that is exactly what an auditor will ask to see.

Test the refusals as hard as the answers. We came to AI from software testing, so the test set came before the assistant. Near-miss questions, missing details and out-of-scope questions get as much attention as the happy path, because those are the cases a demo never shows. (We wrote up how we test agents like this here: AI assurance and evaluation.)

A policy assistant earns trust by knowing when to stay quiet. The model gives it language. The walls around the model are what make it safe to put in front of employees.

If you are putting an assistant in front of employees or customers in a regulated business and need it to know when to stay quiet, tell us what you are building. You can also read more about our AI agent development work.

Building something that has to hold up?

Bring the process, not a specification. We will tell you honestly whether an agent is the right answer.