CNE: electrical regulation indexed for AI agents
Day 54 / 60 — 90% completed
In previous posts I talked about Infotécnica and Open Access and how D.N. can extract information from these sites to better understand the state of the Chilean electrical system. But Infotécnica and Open Access aren't enough. For an AI agent to truly understand the Chilean electrical system, it needs to know what works are planned, which are urgent, and how the transmission system expansion is structured.
That's where the CNE (National Energy Commission) comes in.

CNE website
Why is the CNE relevant for D.N.?
When an electrical engineer does a connection study, it's not enough to look at the current state of the grid. They need to know what works are planned, which are under construction, and what urgent projects could change the grid topology in the coming years. Without that information, a connection study can become obsolete before it's even finished.
The CNE publishes extensive documentation on two key processes:
- Transmission Expansion Plan (PET) — The annual process where expansion works for the national and zonal transmission system are defined.
- Necessary and Urgent Works (Art. 91° bis LGSE) — A mechanism introduced by the Energy Transition Law 21.721 that allows excluding works from the annual planning process when they are urgent to ensure supply or system security. The 2025 process approved 8 projects for US$90.2 million, including expansions and new substations in regions like Ñuble, Maule, and La Araucanía.
An engineer who wants to connect a project in the Ñuble area, for example, needs to know that the new S/E Punilla, new S/E Quinchamalí, and new S/E Raluncoyán with a 2×66 kV line to Temuco are coming. That completely changes where and how they can connect.
RAG on CNE documents
Unlike Infotécnica, where I built a scraper that navigates the site in real time, with the CNE I took a different approach: I indexed the documents directly to Pinecone for RAG (Retrieval-Augmented Generation).
Why? The CNE documents are dense PDFs of hundreds of pages: preliminary proposals, final proposals, technical reports, resolutions. It doesn't make sense to scrape a site when what you need is for the agent to ask intelligent questions to a set of regulatory documents.
The pipeline works like this:

CNE documents RAG pipeline
Each chunk has metadata that includes: document type (PET, ONyU, resolution), process year, geographic zone of the system, and type of work (national/zonal, new/expansion). This allows filtered queries that drastically reduce noise.
Examples of what the agent can ask
This is where it gets interesting. With the CNE documents indexed, D.N. can answer questions that would normally take an engineer hours of reviewing PDFs:
About the Expansion Plan:
- "What transmission works are planned in the zone between Diego de Almagro and Quillota for the next 5 years?"
- "What is the total investment in national works of PET 2025 and what substations are involved?"
- "Are there deserted works in the southern zone that have been re-tendered? What is their current status?"
- "What PET 2024 works have not yet been awarded and could affect transmission capacity in the Metropolitan Region?"
About Urgent Works (Art. 91° bis):
- "What necessary and urgent works were approved for the Ñuble region and what is their progress status?"
- "What is the budget limit for urgent works this year according to Art. 91° bis?"
- "What substations in the 2025 urgent works process include energy storage systems?"
- "Is there any urgent work that affects the zone where I want to connect my solar project in the Atacama Region?"
Cross-referencing questions:
- "If I want to connect a 100 MW wind farm near Temuco, what planned and urgent works should I consider in my connection study?"
- "What zones of the SEN have the most planned works that could free up transmission capacity in the next 3 years?"
- "Are there discrepancies filed with the Panel of Experts that could modify planned works in the northern zone?"
That last type of question is where RAG becomes really useful. Cross-referencing information between the PET, urgent works, and Panel of Experts discrepancies is something that manually requires opening multiple PDFs, searching for cross-references, and maintaining context.
First test: Transmission Expansion Plan study
With all this in context, I asked D.N. to do a study of the projects projected for construction since 2021. The result still doesn't convince me, I still think the agent could write better reports, and I'll work on that next week.
View Transmission Expansion Plan study
5.0m total | 20 tools | $0.3128 LLM | 565,004 tokens | Gemini 3 Flash for each part of the process.
Diagram: D.N. data sources

D.N. data sources
Each source contributes a different type of knowledge. Infotécnica gives the current state of the system. The CNE gives the regulatory and planning context. PowerFactory allows simulation and validation. Open Access provides information about projects in the connection process and the state of the SEN. Together, they give the agent a fairly complete picture for doing connection studies.
What's next
Having the CNE documents indexed opens up interesting possibilities. The next iteration is connecting the RAG responses with PowerFactory simulations. Imagine D.N. identifies via RAG that there's a new substation planned in your zone of interest and automatically adjusts the simulation model to consider that future work in the connection study.
I'm entering the final days of the challenge, the last 10%. Now I'm going to start closing my pending list and giving the agent agentic abilities so it starts feeling like part of a team: memory, autonomy, the ability to work for hours and be proactive. I'm entering the most interesting part of the project.
If you want to get an email when I publish new content, subscribe below.