From prompts to loops: how AI entered every stage of my data journalism

AI now sits inside every stage of my pipeline when creating a project. Instead of a hands-on builder, I feel more like an orchestra conductor, writes Jacopo Ottaviani
Side-by-side maps of Italy showing landslide-hazard areas in brown and yellow and flood-hazard exposure by province in blue.

Maps of Italy from Italia Fragile showing landslide-hazard areas in brown and yellow and flood-hazard exposure in blue.

I typed one line and let the model do its work. A few hours and just over ten iterations later, I had Italia Fragile: a searchable map of all Italian municipalities showing what the state’s own data says about the ground each one stands on, with a solid set of maps and charts. I wrote none of its code.

In my previous article for the Reuters Institute, I told the story of rebuilding two data journalism projects with AI: Patrie Galere, a map of deaths in Italian prisons I first made in 2012, and Strade Mortali, a portal on road accidents in Rome built in a two-day sprint. That piece posed a key question: can an AI model do the building? The answer is clear: it can.

This piece poses the next questions: what does AI change at each stage of the method (ideation, research, design, data acquisition, maintenance)? And what does it leave untouched?

One thing was fundamentally different in how I worked on this new project: Claude’s “/goal” and “/loop” commands, which replace the one-off prompt with a standing objective the LLM pursues (goal), or a task it repeats on a schedule (loop). A large language model (LLM) is an AI system that turns plain-language instructions into text. In this case, it turns any instructions into working computer code. Claude is an AI assistant built by Anthropic, one of the US companies developing AI models.

Boris Cherny, the creator of Anthropic’s coding tool Claude Code, and his colleagues argue that loops are what come after prompting in the era of agentic AI. Here’s what they mean: AI that will act, check its own work and iterate rather than simply answer to a human request. I used both goal and loop commands throughout the development of my new project.

In this piece I will walk you through the five stages of building Italia Fragile: ideation, research/analysis, design, data acquisition and maintenance. At each stage I set a goal, ran a loop or did both. Goals handled the thinking, with the model pursuing an objective I had set and correcting its own course until it was met, while loops handled what had to keep running afterwards, as scheduled agents that watch for new data and rebuild the atlas without me.

Italia Fragile is an atlas of geological risk in Italy, built end-to-end with Fable 5, one of the new generation of frontier models, the industry’s term for the most capable AI systems of the moment. I tested Fable for two days in June before US authorities suspended access for foreign nationals on security grounds. I returned to it once access was restored.

A screenshot showing the landing page for Italia Fragile

The project in a nutshell

Italy is a naturally fragile country, as the state’s own figures attest. In its 2024 report on hydrogeological instability, the national institute for environmental protection and research (ISPRA) found that 94.5% of Italian municipalities are at risk from landslides, floods, coastal erosion or avalanches. Around 5.7 million people live in areas at risk of landslides, 1.28 million of them in the two highest hazard classes. Italy has recorded more than 636,000 mapped landslides, among the highest counts in Europe, and landslide hazard zones cover almost a quarter of the national territory, a 15% increase since 2021.

These figures resurface every time a hillside collapses or a river breaks its banks, then fade away until the next disaster. Italia Fragile, a working prototype, is an attempt to keep them permanently visible and up-to-date. It’s an atlas combining ISPRA’s hazard data, which shows where landslides and floods are likely, with data from the national statistics institute (ISTAT) on the people and buildings exposed to them. Anyone can look up a municipality and see the state’s own data about the ground it stands on.

The atlas also puts a price on inaction. Beyond the lives at stake, it looks at what prevention would save. Spending on repairing flood and landslide damage has tripled since 2009, from a post-war average of around €1 billion a year to €3.3 billion, according to the builders’ association ANCE and the research centre CRESME. Prevention has not kept pace: a dedicated register records 25,539 projects funded since 1999, worth €19.2 billion, but only 27% of that money corresponds to works that have actually been completed. Long-term investment in hydrogeological safety costs a fraction of perpetual emergency management, an argument valid for any country built on similar geology.

Here is how AI entered each of the five stages of building the atlas.

Interactive map of Italy showing the percentage of land in flood-hazard areas by province, with darker and lighter blue shading indicating different levels of exposure.

1. How AI helped me ideate the project

Every data journalism project starts with a question, and this stage is the one AI changes the least. I used the model as a sparring partner: I described the idea of an atlas of fragility and asked it to interrogate the concept. What should such an atlas actually show? Should it just show hazard (the probability that something happens)? Or maybe also exposure (the people and buildings in harm’s way)? Should it show risk (the combination of the two)?

This wasn’t a free-flowing chat. First, I used the “/goal” command, which lets the user set a standing objective that the model works towards in a loop, to kickstart the project.

My prompt was: “/goal make a mobile-friendly, interactive open data site (aka atlas) based on ISPRA and ISTAT datasets to map and visualise geological risk in Italy, including floods and landslides, over time and on different geographic levels, such as municipalities, provinces and regions”.

Then I set a second goal to check its output against the first goal and correct the course until the objective is met: “/goal stress-test the atlas concept until hazard, exposure and risk are clearly separated, and until the atlas answers one question a reader would care about”.

This is the real difference between this generation of models and the chatbots that preceded them: given a goal, they keep pursuing it rather than answering once and stopping. Every later stage of this project, from scrapers to scheduled updates, revolves around that shift. You can still prompt the system to iterate on the results.

Fable made a good sparring partner. It laid out the distinctions, listed comparable projects, and flagged questions I had not considered, such as how to handle municipalities where hazard is high but exposure is near zero. What it cannot supply is the ultimate judgement on whether this issue matters now for my intended audience, or the editorial nose for what makes the data a story rather than a database. Despite this limitation, it produced good suggestions.

Interactive map of Italy showing the percentage of land exposed to high or very high landslide hazard by municipality, using shades of brown and yellow to indicate different levels of exposure.

2. How AI helped me with research and analysis

ISPRA publishes its findings in dense technical reports built on the hazard maps of Italy’s river basin authorities. The 2024 edition runs to hundreds of pages, with hazard classes (P3 and P4 denote the highest landslide danger) that take effort to decode.

A single goal did the work of days of reading in less than one hour: “Read the ISPRA report and its methodological notes; explain the classification system in plain language; summarise what changed since the previous edition; and flag which indicators are comparable across years”.

The same capability democratises access to the data itself: any citizen, local journalist or councillor can now interrogate a report like ISPRA’s without specialist training.

Then comes analysis: ranking municipalities, combining hazard with exposure, deciding what counts as “most fragile”. Another simple goal got the analysis done, with at most three rounds of back and forth to refine the results. Fable wrote the code and, unprompted, proposed composite indicators, single scores built from several variables.

As usual, a plausible number and a correct number are not the same thing. Every figure that reaches the interface must trace back to a source cell in the original data, so I encoded that rule as a goal of its own.

Every figure displayed on the site must trace back to a record of our source files; keep checking until none is left untracked”, I typed, and let the model audit its own output against the sources. Whether the audit itself can be trusted remains the journalist’s call, but they can also deploy separate agents to check the outputs with fresh eyes and stress-test the approach.

Agents can also work against the data rather than just with it. They can stress-test it for inconsistencies and generate the questions it raises but cannot answer. A journalist can then ask these questions to politicians, researchers and decision-makers. For example, why has barely a quarter of the prevention money been spent?

Interactive landslide-hazard map of Perugia, Italy, showing that 4.6% of the municipality’s land is in high or very high hazard areas, with coloured patches indicating local risk levels.

3. How AI helped me with design and prototyping 

Budget-wise, this stage used to be the most expensive. An interactive atlas needs an interface: a map of Italy’s roughly 7,900 municipalities coloured by risk level (a choropleth map, as experts call it), plus search, municipal profile pages, legends and a visual identity that signals seriousness rather than alarm.

With Fable, you can cross the distance between a description and a working prototype in just hours. I described the atlas in words, and it produced a functioning first version, built on LeafletJS, the free, open-source mapping library that also powers my similar earlier projects. The colour scheme and typography were chosen by the agent itself. 

Design remains the model’s most visible leap: it makes reasonable aesthetic decisions without being asked, and course-corrects from feedback as loose as “the risk colours read as decorative rather than serious”. 

Prototyping this quickly and cheaply changes the whole game. A Claude Pro subscription currently costs about £15 per month. This was enough to do what I describe in this piece. When a prototype takes months, you tend to commit to your first idea; when it takes a few hours, you can build three versions of the atlas, put them side by side and keep the best one.

Bubble chart showing the cost of landslide and flood prevention versus repairs in Italy: €5.1 billion spent on prevention since 1999, compared with €46 billion in repairs since 2010 and €112 billion since 1944.

4. How AI helped me scrape the data

Data acquisition is another laborious stage where AI can come in handy. ISPRA distributes data through IdroGEO, its open platform on hydrogeological instability. ISTAT publishes exposure and population data separately. Getting a unified dataset means scraping (writing small scripts that read data from websites or PDFs automatically) and then joining sources that were never designed to meet.

Fable wrote the scrapers from a description of the target pages. More usefully, it handled the joins: matching thousands of municipal records across ISPRA and ISTAT datasets using ISTAT’s municipal codes. Anyone who has worked with Italian administrative data knows the trap hiding there: municipalities merge and rename every now and then, so the codes drift between editions of different datasets. A join can look successful while dropping or duplicating municipalities behind the scenes.

Luckily, LLMs are good at this kind of work: recognising near matches and helping harmonise fragmented data. When necessary, they can also search online for how an administrative unit has been renamed since the last edition of a dataset, something that used to be done by hand, one municipality at a time.

Interactive flood-hazard map highlighting Emilia-Romagna, where 45.5% of land is shown as being within flood-hazard areas.

5. How AI helped me with maintenance and updates

Maintenance is the stage journalism has historically failed at. Interactive projects are funded to launch, not to live: the grant ends, the developer moves on, the data ages, and eventually the project dies, as my own 2012 prison map did when the service hosting it went dark.

Automation changes the economics of data journalism projects. Where “/goal” gives the model an objective, “/loop” and “/schedule” give it a rhythm. It sets up a scheduled agent, meaning a program that runs on a timer with a language model’s judgement attached.

For Italia Fragile it reads: “/schedule monthly: check IdroGEO for new data editions; if found, re-run the scrapers and joins, rebuild the atlas and report what changed”, with anything anomalous flagged for human review. The timer follows the source and can run monthly, every two months or yearly, depending on how often new data is released. None of this replaces editorial oversight, but it makes it cheaper and easier.

The deeper change is in the nature of the project itself: a live service rather than an artefact. Italia Fragile is designed to be a standing observatory, not a one-off publication timed to a disaster.

Bar chart comparing landslide and flood costs in Italy: €5.1 billion spent on prevention since 1999, more than €26 billion estimated to secure the country, and repair costs of €46 billion since 2010 and €112 billion since 1944.

A ladder for data desks: from loops to graphs

In July 2026, Anthropic’s Cherny published a short framework called Steps of AI Adoption, describing how software teams move from banning AI to being run on it. His rule of thumb is the number of agents a single person can keep busy: none, then one, then ten, then a hundred, then a thousand or more. Translated into journalism, it looks like this.

  • Step 0: Locked out. No policy, or a policy of “no”. AI happens anyway, on personal accounts, unaccountably. Journalists and editors use AI randomly, without a clear vision.

  • Step 1: The assistant. One journalist, one AI, working side by side, everything checked before use. Most data journalists sit here today, and use their LLMs as chatbots.

  • Step 2: Parallel agents. Several tasks run at once, in my case with one agent on the scraper, a second one on the map, and a third one on the profile pages. This is the rung where Italia Fragile was built, through the use of loops and goals, though it is designed to be easily transferred into Step 3.

  • Step 3: Supervised autonomy. Agents work when you are not there. Italia Fragile’s maintenance is designed to live here: one scheduled agent checking for new data, another one auditing figures against the source, the journalist reviewing exceptions and anomalies rather than everything. 

  • Step 4: Steering by intent. You set the objective, not the task: “keep this atlas current”, or even “keep our data portfolio updated”, as a standing workflow rather than a one-off project.

Cherny’s point is that moving up the ladder is not a matter of using AI more, but putting the right checks in place first. Each step gives the agents more room to work unsupervised, so each step needs a way of catching what they get wrong: a rule that every figure must trace back to its source, a validation script that compares record counts before and after a join, a human sign-off at the point of publication.

Without those checks, a desk that moves up the ladder is simply producing unverified work more quickly, increasing the risk of a public failure that discredits the use of AI altogether.

Diagram of a Claude workflow in which an evaluator repeatedly checks Claude’s work and sends it back for another attempt until the goal is met or the attempt limit is reached.

Beyond this ladder there is an idea that’s not part of Cherny’s framework and that’s still being argued over among AI practitioners: graph engineering. If a “loop” is one agent working towards a single goal, a “graph” describes how several loops relate to one another.

It has three parts. “Nodes” are the individual units of work, such as a scraper, a translation step or a checking agent. “Edges” are the rules that decide what runs next, what can run at the same time and what has to wait. “State” is the information passed along from one node to the next. Journalists will recognise the shape: reporter, editor, fact-checker, sign-off.

What remains is a role much like that of an orchestra conductor. On Italia Fragile I wrote no scraper, built no map, designed no page. I collaborated with AI and coordinated my agents to choose the questions, break them into parts, and check everything against the sources.

This human coordination is a skill in its own right. A loop will pursue whatever goal it is given and never determine whether that was the right goal, whether the data deserved the attention, or whether anyone needed the atlas at all. Those questions and their ultimate answers stay with the journalist, who decides whether the work is worth it to serve their audiences.

Join our free newsletter on the future of journalism

In every email we send you'll find original reporting, evidence-based insights, online seminars and readings curated from 100s of sources - all in 5 minutes.

  • Twice a week
  • More than 20,000 people receive it
  • Unsubscribe any time

signup block

Meet the authors

Jacopo Ottaviani

Jacopo Ottaviani is a computer scientist and data journalist who combines code and data with storytelling to investigate urgent social issues through data, satellite imagery, and interactive visualisations.He currently serves as senior strategist at Code... Read more about Jacopo Ottaviani