Floemdata
AI

Preparing ERP data for AI

Why letting a model query production directly is risky, and the pattern where AI fills in report definitions instead of writing SQL or doing arithmetic.

Floemdata · · 7 min read

Using AI with business data comes down to two questions: how does the model reach the data, and can you trust the number it produces?

Why pointing a model at the ERP is risky

  • Free-form SQL against production removes both performance and security control
  • The same question can produce different SQL — and therefore different numbers — twice in a row
  • Row-level access (which user may see which company) becomes unenforceable
  • When something is wrong, there is no trace: which query, which definition, which version?

The safer pattern: the model fills a definition

The user asks in natural language. The model produces not raw SQL but a report definition from a fixed catalogue: which measure, which breakdown, which filter. A validator checks it, deterministic code does the arithmetic, and the model only interprets the result.

Three consequences: inventing a metric becomes structurally impossible, the same question always returns the same number, and the dashboard and the assistant can never disagree.

Where AI helps in practice

  • Natural-language questions over reconciled data
  • Month-end summaries: what deserves attention this period
  • Anomaly narration: rules detect, the model explains
  • Assistant integration through the warehouse API

Data first, model second

An assistant is only as good as the data under it. Built on an unreconciled warehouse, it states wrong numbers more fluently. The order is: move the data, reconcile it, then open it to the model.

Floemdata's calculation layer is built for this: all arithmetic is deterministic and the dashboard and assistant share one compiler. The assistant interface is on the roadmap; the data and reconciliation layer works today.

← All guides