Inspiration

Australian electricity retailers process large volumes of settlement data from the Australian Energy Market Operator (AEMO). This data determines wholesale costs, payment timing, settlement revisions, unbilled revenue, and ultimately cash flow.

Yet much of the work is still performed through spreadsheets, manual downloads, copy-and-paste processes, and specialist knowledge held by a small number of employees.

After years of building and operating settlement data systems for an Australian energy retailer, we repeatedly saw the same problems as below:

  • A single AEMO file contains multiple record types and schemas.
  • Settlement files, interval meter data, specialised XML reports, and reference data all require different parsers.
  • Teams have to track initial settlement results and later revision stages manually.
  • Missing files were often discovered only when a report failed.
  • Analysts spend more time preparing data than analysing it.
  • Spreadsheet errors flow into cash-flow forecasts, financial reporting, and audit adjustments.

During OpenAI Build Week, we asked:

What if an energy retailer could operate its settlement pipeline through conversation, while every result remained deterministic, auditable, and traceable to its source?

That question became NEMwise.

Our goal was not to create another generic “chat with your CSV” application. We build an AI operating layer for a real, specialised financial workflow—one where AI makes complex systems easier to use without becoming an unverified source of truth.

What it does

NEMwise is a chat-first settlement workspace for Australian energy retailers. Users can upload settlement files and ask operational questions in natural language, such as:

“What is our Queensland settlement exposure this week?”

“Why did the latest settlement revision differ from the initial result?”

“Which files are missing before the next cash-flow report can be generated?”

NEMwise can:

  • Detect and parse settlement transaction files, interval meter data, specialised XML reports, ZIP archives, CSVs, Excel workbooks, and reference data.
  • Load validated data into an isolated database workspace.
  • Match unfamiliar files against hundreds of packaged AEMO table schemas.
  • Learn reusable mappings for retailer-specific spreadsheet layouts.
  • Answer natural-language questions using AI tool calling and read-only SQL.
  • Generate result tables, charts, reports, and drill-through analysis.
  • Track readiness across every scheduled settlement stage.
  • Connect settlement weeks, billing periods, and payment dates using the National Electricity Market settlement calendar.
  • Explain exactly which files or settlement stages are blocking cash-flow generation.
  • Produce revision-aware wholesale cash-flow exports.
  • Generate clean-room synthetic market data for demonstrations and testing.

Instead of returning only a conversational answer, NEMwise can show the underlying SQL results, charts, source tables, and loaded files. This gives users a path from a high-level answer back to the evidence behind it.

How we built it

We designed NEMwise as a combination of AI reasoning and deterministic domain tools:

User question or uploaded file

OpenAI-powered agent orchestrator

Controlled tools and layered file detection

Staging, schema validation, and typed conversion

Isolated Database settlement workspace

Tables, charts, readiness checks, and cash-flow reports

The conversational agent uses the OpenAI Python SDK with tool calling. It receives the available database schemas, uploaded-file context, recent conversation history, and a controlled set of settlement tools.

The model can decide to:

  • inspect a table schema;
  • execute a read-only database query;
  • compare settlement versions;
  • perform cross-table analysis;
  • generate a chart; or
  • explain missing cash-flow prerequisites.

The tool result is returned to the model, which translates it into a clear, domain-aware response.

We deliberately separated AI reasoning from financial computation. File parsing, schema validation, settlement calculations, and cash-flow generation remain deterministic. AI helps interpret intent, choose tools, generate safe analytical queries, and explain the results.

For file ingestion, we created a layered detection system:

  • Match known file signatures and structural patterns.
  • Probe the file using specialised parsers.
  • Compare its columns with packaged AEMO schemas.
  • Ask the user for guidance when confidence remains low.

When a retailer has a custom spreadsheet layout, NEMwise can save a confirmed source-to-target column mapping as a retailer-specific ingestion profile. Future files with the same structure can then be loaded automatically.

Every uploaded file passes through a staging and validation process before reaching the typed database. NEMwise checks required columns, performs safe type conversions, and reports the exact row and column when a value is invalid.

The SQL tool is similarly constrained: only conservative SELECT and WITH queries are allowed. The AI can analyse settlement data, but it cannot silently alter the underlying records.

We also encoded version-aware cash-flow logic. If \(C_v\) represents the calculated cash flow for settlement version (v), the exported adjustments are:

\[ \Delta_{\text{first revision}} = C_{\text{first revision}} - C_{\text{initial}} \]

\[ \Delta_{\text{later revision}} = C_{\text{later revision}} - C_{\text{first revision}} \]

At a simplified regional level:

\[ C = \text{Settlement Amount} + \text{Reallocation Amount} \]

Calculations retain high decimal precision internally, with explicit rounding applied only when producing the final report.

Under the hood, NEMwise still supports the exact official AEMO formats and stage identifiers—including NEM12, RM16/RM27, FINAL, REV20, and REV30—while presenting them to users in understandable business language.

Finally, because real settlement information is commercially sensitive, we built a deterministic clean-room data simulator. It produces correlated market-style calendar, price, demand, settlement, meter, reallocation, reference, and report files without reading or sampling customer data.

Challenges we ran into

The biggest challenge was deciding where AI should—and should not—be trusted.

Language models are excellent at interpreting questions, selecting tools, producing analytical SQL, and explaining results. However, a financial settlement platform cannot rely on a model to invent calculations or silently interpret malformed data.

We addressed this by using AI as the orchestration and explanation layer, while deterministic, testable code remains the calculation layer.

File diversity was another major challenge. AEMO data spans legacy and newer market formats, multi-section text files, XML documents, ZIP archives, and hundreds of table schemas. Retailers also maintain their own spreadsheet layouts. No single parser could safely handle every possible input.

This led us to build layered detection, confidence scoring, parser probing, AEMO schema matching, and reusable ingestion profiles.

Settlement-calendar logic was also more complicated than it initially appeared. Settlement weeks, billing periods, payment dates, and revision dates are connected but not interchangeable. The application also needs to use Melbourne business time and understand when different settlement stages become relevant.

Another challenge was designing for trust. A message saying “cash flow is not ready” is not useful enough. Users need to know which settlement week is affected, which version is missing, which source file is expected, and how to resolve the problem.

That challenge shaped much of the interface: readiness cards, blocking checklists, detailed validation messages, ingestion provenance, and drill-through from an AI answer to its underlying rows.

Accomplishments that we're proud of

We are proud that NEMwise grew beyond a proof-of-concept chatbot into a working end-to-end settlement platform.

Some of our favourite accomplishments include:

  • Building a domain-specific AI agent that can reason over real settlement schemas and choose controlled analytical tools.
  • Supporting complex AEMO settlement, interval-meter, report, and XML formats.
  • Making deterministic ingestion work even when no AI API key is configured.
  • Creating a learning workflow for unfamiliar client files instead of silently guessing their format.
  • Providing detailed row-level and column-level validation errors.
  • Implementing cash-flow calculations that understand initial results and later settlement revisions.
  • Connecting cash-flow readiness to the actual market calendar and required settlement stages.
  • Adding isolated retailer workspaces, authentication, ingestion auditing, and read-only AI SQL controls.
  • Building versioned parser skills with evaluations and a human approval gate for AI-proposed improvements.
  • Producing a clean-room synthetic data generator with baseline, high-demand, price-spike, and negative-price scenarios.
  • Delivering the project as a full-stack application with a React/TanStack website, authenticated Streamlit cockpit, optional FastAPI worker, Docker deployment, and automated tests.

Most importantly, every AI-generated insight can be connected back to deterministic tools and validated source data.

What we learned

The most important lesson was that trustworthy industry AI is a systems-design problem, not simply a prompting problem.

We learned that:

  • AI works best as a reasoning interface over reliable domain tools.
  • Deterministic calculations make conversational analysis more valuable because users can trust and reproduce the result.
  • Domain schemas, business rules, and carefully designed tools matter more than an oversized system prompt.
  • Confidence must be visible when classifying unfamiliar files.
  • A useful financial AI product must explain its evidence, not only its conclusion.
  • Human corrections can become durable product knowledge through reusable ingestion profiles.
  • AI-generated code should be treated as a candidate, evaluated automatically, and approved by a human before promotion.
  • Synthetic data is essential for safely developing and demonstrating AI products in confidential industries.
  • Trust is part of the user experience: provenance, validation, readiness checks, and clear failure messages are product features, not implementation details.

We also learned that the best role for AI is not to replace specialised industry knowledge. It is to make that knowledge accessible, repeatable, and easier to operate.

What's next for NEMwise - An AI Settlement Copilot for Energy Retailers

Our next step is to take NEMwise from a working prototype into a production-ready settlement operations platform.

We plan to:

  • Add direct, scheduled ingestion from approved AEMO data sources.
  • Expand ingestion profiles with transformations, multi-sheet Excel support, and version rollback.
  • Provide richer explanations of changes between initial settlement results and later revisions.
  • Add proactive alerts for missing files, unusual settlement movements, and approaching payment dates.
  • Introduce approval workflows for finance and settlement teams.
  • Strengthen data lineage from every chart and answer back to its source file and parser version.
  • Expand unbilled-revenue and wholesale-exposure forecasting.
  • Add more versioned skills for additional AEMO and retailer workflows.
  • Support secure enterprise deployment and integration with existing data warehouses.
  • Pilot NEMwise with Australian energy retailers using their own approved file layouts and operating processes.

Our broader vision is for NEMwise to become the conversational operating layer for energy settlement teams:

Upload once, ask naturally, understand every number, and know exactly what must happen next.

NEMwise demonstrates that specialised business software does not need to choose between AI usability and financial control. With the right architecture, it can provide both.

Built With

Share this project:

Updates