Automating Climate Narrative Analysis with chatGPT (Part 1)
We're building an autonomous AI swarm to retrieve, analyze, and write about climate narrative shift.
Look, I’ll be honest — we’re not copywriters over here.
We understand the utility, and we respect the craft. But for us, writing is a means to an end. It’s a microphone for our analysis of the shape, direction, and nuance of climate narratives.
Because climate change is a threat to our survival, the threat is imminent, and we need to start shifting the narratives around climate change ASAP.
So how do we inform and inspire, quickly and frequently?
Bonus goal — can we make these posts more interesting?
Generative AI has entered the chat
For the past month, I’ve been taking a Prompt Engineering class at The Multiverse School (next cohort starts July 15).
This class is B O N K E R S. We’re jailbreaking complex prompts and building “swarms” of autonomous AI agents. I’ve also met some absolutely brilliant people, from Liz to gene to Roan – people who are on the cutting edge of generative AI research and development.
And let me be clear – I am NOT a developer. When I first started learning Python, I tried to write the code directly into the Terminal 😂
But with chatGPT, if I can describe my goal, I can write the code to do the thing.
And now, just 5 weeks later, I’m connecting to the RepublicOfData.io API using a Python script written by chatGPT, running the script in the Terminal, and writing the data to a local file.
The knowledge economy is officially democratized, and we can now start automating our workload.
Just like people, generative AI benefits from community
So what tf is an “agent swarm”?
Well, think about how humans accomplish work.
When a project is too big or complex for one person, we bring together a team. Each person on the team has their own strengths and specialties, and by working together, we can achieve something greater than any one of us could do alone.
This is the basic idea behind "agent swarms". It’s a team of autonomous AI agents, each with its own specific task or expertise, working together to accomplish a larger goal.
How will an agent swarm help us here?
Our goal is to automate the creation of these blog posts. Here’s how it could work:
Data Analysis: A set of agents retrieve, clean, and analyze the latest news and social media data, in order to find trending topics about climate change.
Content Structuring: Another agent organizes the gathered information into a coherent structure, ensuring the post flows logically.
Writing: Different agents could draft different sections of the post, each one focusing on a specific aspect like introduction, main content, and conclusion.
Editing: Another set of agents could review the drafts, checking for grammar, clarity, and style consistency.
Publishing: Finally, an agent sends us the final draft, so that we can double check it before publication.
By dividing the work among specialized agents, we speed up the process while still maintaining a high quality of content.
Meet the Agents
To start, I needed some help from a few specialized agents.
Let me introduce you to the team:
The System Prompt Writer
First up is the Precision Prompter GPT, because writing system prompts is a task that I’m happy to delegate.
What the heck is a system prompt, you ask???
A system prompt is a set of detailed instructions. It provides context and guidelines to help the AI generate the desired output. It's like giving the AI a map and a compass, ensuring it knows exactly where to go and how to get there. But not just any map — one that is specific to YOUR goal and YOUR context.
To extend the metaphor, the Precision Prompter is therefore a wilderness guide for other GPTs – it crafts detailed and effective prompts (so that I don’t have to).
The Data Analysis Agent
Next, we have the Data Analysis Agent.
This agent is the workhorse of our operation. Here’s what it does:
Data Ingestion: It ingests a JSON file of text-based data — both news articles and tweets.
Data Transformation: It transforms this data into a pandas DataFrame, a powerful tool for data manipulation and analysis.
Simple Analysis: Once the data is in the right format, the agent performs basic analyses like generating word clouds to visualize common terms and conducting average sentiment analysis to gauge the overall mood of the data.
Here’s a video of the agent in action:
The Stop Words Remover
While chatting with my Data Analyst agent, I realized that my word clouds were cluttered with common, non-informative words—stop words like "the," "is," and "and." To clean this up, I built the Stop Words Remover.
This agent pre-processes the JSON file to strip out these stop words, making the word clouds much more meaningful and focused.
Again, it’s important for each agent in your swarm to have a small and clear goal — breaking this task out to a specialized agent means that my data analyst can focus on more high-level analysis.
Together, they form a proto-swarm
We aren’t autonomous yet — there’s still a human interacting with each of these agents. But it is a nascent, coordinated group of agents where each is performing specific tasks that contribute to the overall objective.
Here’s a visual of these interactions:
And we’re only just getting started…
We have many more agents to build into this swarm.
Next up, we need a “critic” agent. Critic agents act as quality control within the swarm, evaluating the outputs of other agents to ensure accuracy and coherence. They provide feedback and suggest improvements, much like an editor reviewing a draft.
For right now, I’m acting as the critic agent – but eventually, I’d like to transition out of this role.
What would you do with your own agent swarm?
With the right prompts and a bit of guidance, you too can automate tedious tasks, freeing up your time for creativity and strategic thinking.
Picture the possibilities: more time to innovate, more resources to execute, and more insights to drive your decisions.
The question is, what would you accomplish with your own team of AI agents at your side? The future of work is here, and it’s time to harness the power of generative AI to achieve your goals.
Stay tuned for Part 2…
I promise, we actually have some climate change analysis in the works. It’s just too much information for a single blog post.
So stay tuned for our very first analysis using our proto-swarm of AI agents!
About Us
RepublicOfData.io is a consortium of data professionals who are concerned about climate change. We're also deeply curious about climate change narratives, because as David Attenborough has said, "Saving the planet is now a communications challenge."
Our mission is to capture and analyze climate change narratives, in order to provide researchers, policymakers, journalists, activists, and other stakeholders with unique insights into climate narrative shifts.
We are currently building a prototype of our proprietary data platform, which gathers and enriches data from traditional and social media sources, starting with the New York Times and Twitter/X. To that end, we're connecting with climate actors who might benefit from our data, or who could help us further our mission.
If this project sounds useful or interesting, we'd love to connect.


