Deep Dive · Nov 20, 2026 · 7 min read
GenAI for Finance: Numbers-First Reporting and Controls
A design where the data layer computes the figures and the model only explains them, with reconciliation and audit.
Finance teams cannot accept invented numbers. The safe architecture computes every figure in code from governed data, then asks the model to describe them, and then checks that the description uses only those figures.
Compute in the data layer
SELECT account_group,
SUM(CASE WHEN period = %(cur)s THEN amount END) AS actual,
SUM(CASE WHEN period = %(prev)s THEN amount END) AS prior,
SUM(CASE WHEN period = %(cur)s THEN amount END) -
SUM(CASE WHEN period = %(prev)s THEN amount END) AS variance
FROM gl_summary
WHERE entity = %(entity)s
GROUP BY account_group
ORDER BY ABS(SUM(CASE WHEN period = %(cur)s THEN amount END) -
SUM(CASE WHEN period = %(prev)s THEN amount END)) DESC
LIMIT 10;Narrate from a fixed fact table
Give the model the table and instruct it to explain only what is in it, noting that causes not present in the data must be marked as hypotheses to confirm.
SYSTEM = """You write finance commentary. Use only figures from FACTS, quoted exactly.
Do not calculate new figures. When you suggest a cause not in FACTS, label it 'to be confirmed'."""
def commentary(gateway, facts):
return gateway.complete("finance_narrative", "large",
[{"role": "system", "content": SYSTEM},
{"role": "user", "content": json.dumps(facts)}], temperature=0.2).textReconcile the output
Extract every number from the commentary and confirm each one appears in the fact table, using the same rounding. Reject and retry otherwise.
def numbers_in(text):
return {n.replace(",", "") for n in re.findall(r"\d[\d,]*\.?\d*", text)}
def reconcile(text, facts):
allowed = {str(v).replace(",", "") for row in facts for v in row.values()}
return [n for n in numbers_in(text) if n not in allowed] # non-empty => unverified numbersDates and years also match this pattern, so allow-list them. Adjust the rounding rules to your reporting conventions.
Controls
- Segregation of duties: preparer and approver are different people.
- Immutable audit trail: facts, prompt, output, approver, timestamp.
- Access control inherited from the finance data platform.
- Version the prompts and keep them under change control.
Good first uses
- Variance commentary drafts.
- Summaries of long contracts and board papers.
- Q&A over policy and accounting manuals, with citations.
Governed data and definitions
Narratives are only as good as the data behind them. Define metrics once, in a governed layer, such as a semantic layer or a tested set of views, and have the assistant use them. If revenue means something different in two reports, the assistant will confidently contradict itself.
Explaining variances
Compute drivers in code: price, volume, mix, and one-off items, using your standard decomposition. Pass the decomposition to the model, and let it describe the main drivers in plain language, labeling any explanation that is not in the data as a hypothesis for the analyst to confirm.
def price_volume_effect(cur_qty, cur_price, prior_qty, prior_price):
volume = (cur_qty - prior_qty) * prior_price
price = (cur_price - prior_price) * cur_qty
return {"volume_effect": volume, "price_effect": price, "total": volume + price}Close and reporting calendar
Time the assistant to the calendar. A draft of commentary the moment figures are final saves days. Make sure it is run again after late adjustments, and that the version history shows what changed between drafts.
Review and sign-off
- The analyst checks the numbers against the source and edits the narrative.
- The controller approves, and the approval is recorded.
- Any change after approval creates a new version.
- The prompt, data snapshot, and output are archived together.
Other finance uses
- Policy Q&A over accounting manuals, with citations.
- Contract summaries for leases and supplier agreements, with clause extraction.
- Anomaly explanations: the system flags unusual entries and gathers context for an analyst.
- Board paper first drafts built from approved tables.
Risks to manage
Confidential data, such as unreleased results, needs approved infrastructure and access restrictions. Models can misstate a calculation if allowed to compute, so keep arithmetic in code. And remember the audience: a persuasive but wrong narrative is worse than no narrative.
How we can help
We build finance reporting assistants that respect your controls and integrate with your ERP and data warehouse. Ask for a scoping call with a finance technology consultant.
Related reading
Need help implementing this?
Our consultants run architecture reviews and build production pilots. Book a free scoping call to talk through your design.
Book a Free Scoping Callor email us at hello@deepvero.com