Agentic patterns · Generative reporting
Approved queries
A named, parameterised query the data owner signed off. The only way a number reaches a report.
What one consists of
- Name and description. All the model reads.
- Typed parameters. Metric, period, dimension. No free text, no SQL.
- Scope rule. Applied by the engine; out-of-scope requests are refused.
- Fixed result shape. A query and its components release together.
How one gets approved
- Proposed as code.
- Reviewed by the data owner against the firm’s metric definition.
- Tested against ledger totals, including a scope test that must fail.
- Released with a version; every call is logged.
The demo implements definition, scope and logging. Review and release are your existing change process.
The 10 queries in this demo
Each is a TypeScript function over the ledger and runs in your browser. In a firm the same contract sits on a semantic layer, certified views or a Power BI model.
kpiOne metric, one periodThe headline: how large is the number and how far from plan.breakdownA metric split by a dimensionTo locate a variance: which entity, line, account or month.trendA metric month by monthTo show when something happened and how the forecast compares.bridgeFrom plan to actual, step by stepTo explain a gap as a sum of its largest contributors.attainmentActual as a share of budgetTo rank entities or lines by how much of their budget they reached.heatmapWhere and when variances aroseTo spot a pattern across entities and months in one view.pl_flowFrom net sales to operating profitFor a “where does the money go” picture.statementThe income statementWhen the reader wants the full P&L, not one metric.trend_byA monthly series per entityTo compare shapes across entities side by side.pairTwo metrics per entityTo see size and profitability together.
Contact
Questions, ideas or a conversation?
I’m always glad to hear from people working on AI, product strategy, transformation or software.