Main page Georgio Hajj Boutros
All case studies

Case 04 · Natural-language layer over governed data

Asking a finance question in English

A governed model will answer almost any question you can express in it. Expressing it requires knowing the model — which puts a person in the loop for every ad-hoc question. During close, that person was me. This is the agent that removed that dependency, first as a prototype and now in production, without giving up auditability.

Role
Design, build and production rollout
Scale
Live finance users
Systems
Claude, MCP, semantic layer
Status
In production
01 — The situation

What was actually happening

The reporting estate answered the questions it had been built to answer. Anything outside that — a one-off cut, an unusual comparison, a question raised live in a review — required someone who knew the semantic model to translate it.

The load was concentrated exactly where it was least affordable. Ad-hoc requests peak during close, which is the week the same person is running reconciliation and consolidation.

A language model that computes a financial figure is a liability. A language model that decides which governed measure answers your question is an interface.

02 — The constraint

Why the obvious fix does not work

The failure mode of this class of tool is well known and severe: a model that does arithmetic will sometimes do it wrong, and will present the wrong result with exactly the same confidence as a right one. In a finance context that is worse than having no tool, because the output looks like the output of the certified system.

The constraint I set was that no figure reaching a user may have been computed by the model. Every number had to come from the same governed engine that produces the board pack, by the same path, or the agent had failed regardless of how well it demonstrated.

03 — The approach

What I built

The architecture separates routing from computation. The model's only job is to resolve a plain language question into three things: which governed measure, which dimension, which filter. Its vocabulary is the existing semantic layer — it cannot invent a measure that does not exist, because it is choosing from a list rather than writing arithmetic.

That resolution is handed to the governed query engine, which computes the figure against certified data exactly as any dashboard would.

The answer is returned with the resolution plan attached — the measure, the dimension, the filter, stated plainly. The user does not have to trust the routing, because they can read it. And where the question cannot be resolved unambiguously, the system asks a clarifying question rather than picking the most likely interpretation.

Question plain English Model · resolve only measure · dimension · filter vocabulary = the semantic layer governed measure definitions Cannot resolve asks back — does not guess resolved plan Query engine runs the arithmetic against certified data Answer + plan the figure and how it was reached ROUTING · nothing on this side of the line computes a number COMPUTATION · every figure is produced here, from certified data Swap the model and the answers stay the same, because the model was never the thing producing them.
The model resolves the question into governed vocabulary and stops there. Computation happens in the certified engine, the plan is returned alongside the answer, and an unresolvable question is refused rather than guessed.
04 — Judgement

Decisions, and what each one cost

Every one of these had a defensible alternative. The trade-off is stated because the trade-off is the point.

Decision 01

The model routes, the warehouse computes

This is the whole design. It bounds the blast radius of a model error to a mis-routed question — visible, recoverable — rather than a wrong number presented as certified.

Cost: questions the semantic layer cannot express simply cannot be answered, rather than being approximated.

Decision 02

Return the plan with the answer

Showing the resolution — measure, dimension, filter — turns an opaque answer into a checkable one. In testing this was what moved finance users from interested to willing.

Cost: more interface to design, and it exposes the semantic model's naming to people who had never seen it.

Decision 03

Refuse rather than guess

Ambiguous questions get a clarifying question back. The alternative — choosing the most probable reading — is precisely how a plausible wrong answer enters a review meeting.

Cost: it feels less impressive in a demonstration, which is a real cost when you are still trying to win backing for the work.

Decision 04

Reuse the semantic layer as the vocabulary

Rather than building a parallel definition set for the agent, I pointed it at the governed measures already in production. The agent inherits governance instead of duplicating it.

Cost: the agent is only as expressive as the semantic layer, so its limits are the model's limits.

05 — Outcome

What changed

  • In production with live users, answering data requests and drafting reporting narratives from certified figures.
  • Every returned figure traceable to the same governed measure that feeds the board pack.
  • The design principle outlives the tooling — swap the model and the answers do not change.
  • Removed a single-person dependency for ad-hoc reporting during close.
  • Claude
  • MCP
  • LLM tooling
  • Semantic layer
  • Auditability
  • Python
06 — Retrospective

What I would do differently

Honestly assessed, with hindsight

I optimised the first version for demonstration rather than for the boring questions people actually ask. It handled an impressive multi-part comparison and stumbled on what was margin last month, because I had not spent enough time on the resolution of relative dates. Frequency beats sophistication in what you harden first.

I would also instrument the refusals from the start. The questions the system could not resolve turned out to be the most valuable output of the whole first version — they are a direct, unfiltered list of what the semantic layer is missing. I was discarding that signal for the first several weeks.

Figures on this page are illustrative. No employer data is reproduced.