Every investment a regulated energy network makes has to be justified to the regulator in a detailed document, and a single business plan needs hundreds of them. We built an AI agent that drafts these documents from each project's own evidence, and this article walks through the five stages that make its drafts worth trusting. The second blog in this series explains how we measured whether each change to the agent actually made the drafts better.
The job
An energy network operator asked us to help with its regulatory business plan, the submission that sets out what the company intends to invest in over the next price control period. Each project in that plan needs its own justification document, explaining why the work is needed, which options were weighed, which one was chosen and why it is good value for customers. There are hundreds of these documents, each built on a long template, and the regulator reads every one of them closely.
The authors who write them already have the evidence, spread across cost-benefit analyses, engineering papers, strategy documents and earlier submissions, but they rarely have the time to turn it into hundreds of long documents. Our task was to give them a first draft they could trust, correct and own, in far less time than it takes to start from a blank template.
Where we started
The first version did what most tools of this kind do. For each section of the template it searched the project's documents, took the passages that looked most relevant and asked a model to write. In a demonstration it looked impressive, but in practice it went wrong in ways that matter.
It quoted figures from older versions of a cost-benefit analysis, because the old file matched the search just as well as the new one.
It once cited the regulator's own checklist as the source of figures the checklist does not contain, because the checklist sat in the same index and anything in the index looked like evidence.
Sections that each read well on their own repeated one another.
The document could ask for one amount of money in one place and a different amount in another.
Where an author had already written a careful paragraph, the tool would rewrite it without hesitation.
Better prose would not have fixed any of these. The tool needed to know which evidence counts, when to use it and what it must never change, and building that knowledge in is what turned a search-and-write tool into an agent that plans its work, checks it and explains it. By agent we mean a chain of narrow AI tasks, each with a single job, in which ordinary code decides the order and checks every result.
Figure 1. The stages the agent works through for every document, from identifying the project to delivering a draft with its gaps listed. Each stage hands the next a narrower and better-supported task, and the list of missing evidence at the end becomes the starting point for the next run.
1. Understand the project
Before writing anything, the agent works out what kind of project it is dealing with. It looks the project up in the client's own reference data to learn which business strategies and customer outcomes the project serves, and it reads the cost-benefit workbook to find the option that was actually chosen. If it cannot identify the project, it stops at that point, before any AI model is called, so an unrecognised project costs nothing to turn away, and the author can then set the project type by hand and run it again.
The agent also needs to know what the regulator and the client expect of each document. After the first version cited the regulator's checklist as evidence, guidance and checklists were moved out of the search index and are now kept as structured reference data that the agent looks up exactly, so they shape what it writes without ever being quoted back as a source.
2. Plan the argument
Once the project is identified, the agent plans the argument for the whole document before it drafts a single section. A document written one section at a time can easily argue slightly different cases in different places, so the need for the investment and the customer outcome it serves are settled once for the whole document, and every section works from them. Each business strategy is placed in the sections where it belongs. The summaries and the conclusion are written in a later pass, and the introduction after the main body, from what the other sections actually say, which is how a person would approach it.
3. Gather the right evidence
With the argument planned, the agent gathers evidence for each section, and every section takes one of two paths. A blank section is searched for by its subject and written from the evidence the search finds. A section the author has already written is searched for by its own words, because the claims already on the page are what need supporting, and the author's text stays unless the evidence contradicts it.
Not everything the search returns should reach the writer. Each of the rules below exists because of a failure in the first version.
A passage taken from the section being written is removed, so the document never cites itself.
A newer revision of a document replaces an older one, and figures from the previous regulatory period are ranked lower, so an old cost-benefit analysis can no longer stand in for the current one.
The cost of the chosen option is read from the cost-benefit workbook before any writing starts, and each rewriting stage rejects a rewrite that changes the headline amount, so the sum requested stays the same from the first page to the last.
Business strategies are searched separately, as a source of language and direction, so they never crowd out the evidence a section needs.
Figure 2. Each passage the search returns meets these rules in turn, and is admitted, ranked lower or dropped before the writer sees it.
4. Review the draft
Once a first draft exists, a panel of automated reviewers reads it. One checks every passage against the evidence it cites, and the others read it as the regulator, a regulatory specialist, a lawyer and a customer advocate would. Each finding is pinned to the exact words it is about.
Rewriting then happens in stages. Serious findings are fixed first and every section is improved, after which one reader looks at the whole document for repetition, contradiction and promises that one section makes and another does not keep. A final editor then works through the sections with the whole document in view, because some problems cannot be seen one section at a time. In one early run every section looked a reasonable length, yet the whole draft ran to 17,654 words against a 14,500-word budget, and the conclusion asked for investment without stating a figure. Neither problem shows up when a section is read on its own, so both are now checked across the whole document, and the finished length is measured against the budget and reported to the author.
Figure 3. The dial shows the word count of the whole draft against its 14,500-word limit. No single section is too long, yet the total is, and the overrun is reported alongside the draft rather than left for the reader to discover.
Every rewrite also has to pass a set of rule-based checks before it is accepted. These checks are written in code rather than asked of a model, so a persuasive rewrite cannot talk its way past them. A rewrite that drops a figure or fact the author wrote, or that states a different headline amount, is rejected, and the section keeps the text it had before. In the improvement stage, a section that was given compliance findings gets one more attempt, with a note listing exactly what the first attempt dropped, and if that attempt fails as well, the earlier text stays and the reason is recorded in the run report. When the editor tightens a section, words may go but every figure has to survive exactly. Where the author's own wording could be better, the agent suggests the change as a comment in the margin and leaves their words on the page.
Figure 4. A rewrite works like a key in a lock. Each pin is a figure or fact from the original text, and the rewrite is accepted only when every pin lines up. Here the first attempt drops a figure and is refused, and the second attempt, told what it dropped, keeps all seven.
5. Check the finished document
Before anything is delivered, a set of plain, rule-based checks runs over the finished document. They compare totals and units, the price base, the figures in the prose against the tables beneath them, and any source that has since been superseded. The document is then assessed against the client's checklist for its document type, against the regulator's requirements and against the customer value argument that should run through the whole of it. Finally, it is placed on a ladder of quality levels, which our second article will describe in more detail.
What the author receives
The author receives a Word document that shows its working. Text written from the evidence, the author's own text that the run improved, passages with thin evidence and passages with no evidence at all are each shaded a different colour, and the reviewers' comments sit in the margin. Wherever no source answers a question, the draft says so with a marked gap rather than inventing an answer.
Alongside the draft comes a workbook listing actions, figures to confirm and missing data sources, and that list is what turns the tool into a loop. The team finds or commissions the missing evidence, adds it to the project and runs the draft again, and each run is better grounded than the last. A readiness check can also be run on any project before drafting begins. It rates the project as ready, as having gaps or as blocked, and lists what is missing, so that the evidence can be gathered before the first draft rather than after it.
One agent, many projects
The same agent covers more than 170 projects in the client's reference data, across four document templates. The differences between project types are handled through settings and reference data rather than separate copies of the code, so an improvement made for one kind of project reaches all of them.
Why this matters
Regulated companies are being asked for more evidence-heavy documents without larger teams to write them, and a general-purpose AI writer produces drafts that take almost as long to check as they would to write. The same problem faces anyone responsible for regulatory submissions, investment cases or any document where one wrong figure has real consequences, and it becomes more pressing as the next price control submission draws closer.
The agent does not replace the authors who sign these documents. It gives them a first draft that is honest about what it knows, consistent in what it argues and clear about what is still missing. If you are thinking about using AI for documents like these, start by writing down which sources are authoritative for which facts and what must never change, because in our experience those rules mattered more than the choice of model.










