
FOIAbot: building an AI assistant for public records requests
A few months ago, during one of those classic evenings in Varese at the Glocal Festival – an essential event in the Italian calendar for journalism – I found myself at dinner discussing artificial intelligence tools for journalism with other colleagues. At one point, Riccardo Saporiti said: “Wouldn’t it be cool to build a chatbot for FOIA requests?”
Why FOIA needs a bot: the problem we’re solving
Although access to public information is a right formally guaranteed by law, in practice it often feels like a privilege reserved for insiders. In Italy, many people don’t even know what a FOIA is, how to file one, or under which laws it operates. The Italian FOIA system is relatively recent, introduced with Decreto Legislativo n. 97 del 2016, which amended the Decreto Legislativo n. 33 del 2013 (the so-called decreto trasparenza, that in English sounds like “transparency act”), establishing what the official website calls "accesso civico generalizzato”, general civic access to promote citizen participation and enable widespread oversight of public administration.
If you are not familiar with legal procedures or bureaucratic language, filing a FOIA request can feel like navigating a labyrinth. Even more daunting is dealing with the responses from public institutions and knowing how to manage them. Riccardo’s idea struck me as not just good, but necessary, also to show how to properly use AIs in the newsroom.
That’s why I started working on FOIAbot, using ChatGPT, envisioning how a chatbot should work to assist journalists through this complex process. FOIAbot is not meant to replace journalists or legal experts. It doesn’t remove the need for professional support in complex cases. Instead, it aims to democratise what I call the “first mile”: the critical moment when someone moves from curiosity – “I wonder if I can get this information” – to action – “I’m going to file a FOIA request.”
From conversation to prototype
Some days after that dinner, I opened ChatGPT and started a new project. I didn’t just upload the main legislative texts but also included their implementation guidelines and the standard templates officially used across Italian public administration. I based the initial knowledge on all the documents available on foia.gov.it.
However, my goal wasn’t simply to create a bot capable of quoting laws. I wanted FOIAbot to reason, to understand the context of different requests, and to adapt its language and support depending on the user’s experience level. It needed to assist both absolute beginners and experienced journalists, handle tricky scenarios like denied requests requiring escalation, and offer anonymity options while admitted by the law, for example in the presence of third-party interests (in Italian, controinteressati).
After the first rough draft, I shared it with Riccardo. He responded enthusiastically, sending examples of his successful FOIA requests. I added mine, and together we refined the chatbot's behaviour, enriching it with real-world conversational cases.
On the technical side, I used ChatGPT to condense all the legal documents and samples into a CSV file and then converted it into a JSON structure. This file was then uploaded into the bot’s knowledge base, alongside templates and examples. Finally, I wrote the rules of the chatbot, based on the law, the samples and my experience.
After my test, it was then time to open FOIAbot to alpha testers.
Alpha testing: a rigorous form and real-world lessons
Alpha testing is an essential phase for any AI project, yet often underestimated.
I designed a highly detailed Google Form to collect structured feedback from testers, which you can view here. Testers were asked about their previous experience with FOIA requests, the clarity of the bot’s guidance, its ability to collect necessary information, its usefulness, and the accuracy of its answers. They were invited to share the full chat transcript, describe any difficulties they encountered, highlight any incorrect information provided, and evaluate the quality and completeness of the generated request documents.
The form wasn't anonymous because we involved people we knew – some skilled in FOIA procedures and AI tools, others completely new to both fields. This allowed us to cross-reference technical feedback with different experience levels.
Some testers simulated real investigations, others reused old FOIA cases, while a few deliberately posed vague or confusing questions to test the bot’s resilience.
By analysing the submitted conversations, I identified pain points and improved FOIAbot iteratively. Encouragingly, 15 out of 15 testers found the bot useful. Only in one case did the bot give incorrect information, but it was based on a fictitious situation deliberately posed by the tester.
All the feedback collected was used to refine the bot, always working in the same original ChatGPT session where I had started the project. This continuity allowed me to keep improving the internal logic, step by step.
A bot that works like a good assistant
FOIAbot was developed using OpenAI’s GPT infrastructure, but its real strength lies in its editorial logic, not in its technical foundation.
The bot doesn’t just deliver a standardised form. It begins every conversation by asking users what they are looking for, adapting its guidance to the user's knowledge level. For beginners, it offers detailed support. For experienced users, it refines and polishes the request quickly.
Outputs produced by FOIAbot are not final and immutable. I deliberately designed it so that the journalist must review, clean, and adapt the text before submission – because full editorial control must always remain in human hands.
At one point, a journalist and alpha tester, Ilaria Sesana, shared feedback that convinced me we were ready for the next phase.
Ilaria used FOIAbot during a real investigation involving several access-to-documents requests – and she received her first positive response. In her words, FOIAbot helped her in three crucial ways: by assisting in online press review on the phenomenon she was investigating; by identifying the correct institution to send the request to (after a double-check with an expert, just to be sure); and, perhaps most importantly, by recovering the official email addresses needed to send the request, saving significant time on a notoriously frustrating step.
Now in beta and open for everyone
FOIAbot is now publicly available in beta and it has been used for 272 conversations. Of course, we cannot see how users are using it, but we are encouraging testers and journalists to share their experiences, and continuing to refine the tool.
Looking ahead, I plan to document and publish not only the logic as I did here for The Fix, but also data and structure behind FOIAbot, so that others can replicate or adapt it using different models, including open-source alternatives.
Naturally, the ambition doesn't stop at Italy. I hope FOIAbot will be translated into other languages and adapted for different transparency rights across the world.
Journalism needs these kinds of AI tools
FOIAbot is just one example of how automation and generative AI can empower journalism rather than replace it.
It doesn’t substitute the critical thinking, persistence, or human judgment that good reporting demands. What it does is remove the unnecessary bureaucratic friction that often blocks freelancers, small newsrooms, and even ordinary citizens from exercising their right to information. FOIAbot can also empower those who don't even know they have this right, communicating it clearly and accessibly.
In a world where time and resources are increasingly scarce, tools like FOIAbot help reclaim space for what matters most: investigating, questioning, and telling stories that hold power to account.
Because journalism doesn’t start with a form. It starts with a question.
[subscribeform]