8
minutes
Floris Schoenmakers

How I built an AI news agent with nothing but prompts

Many impressive new tools are launched each week. To experience the progress of AI tools, I set out to create my own web application using an AI coding platform. The way everything ties together is quite impressive, and these tools are undoubtedly going to impact - and contribute to - the software industry.

Software development is undergoing major changes. Workflow automation has long been possible with platforms like Make and Zapier. Generative AI excels with text and images. Now, applications can be built through prompting. While it's great for MVPs and simple products, it's not enterprise-grade yet. However, progress is happening quickly.

01
Create a Custom AI RAG from your Google Sheet

Imagine you want to build AI applications using your own data but lack expertise in databases, APIs, or large language models (LLMs). This could be a solution

In this blog, I demonstrate how I created a personal AI news agent that delivers relevant headlines from selected industries and topics via email. The application includes a front-end, database, workflow automation, and email functionality. All custom code was generated by AI.

To be honest, it took quite a few hours to understand how the different tools function. I realized that when creating an application through prompting, significant effort should go into preparing the architecture and crafting the prompt itself. For the architecture, this means having a solid understanding of each tool's function and how they need to communicate to achieve the end goal. Secondly, while Bolt is great at bug fixing, it sometimes gets stuck. When that happens, you’re basically screwed with no choice but to start over.

The result of this experiment is the application below. You can set up a news agent by selecting one or more industries and topics of interest. The news agent searches for new relevant headlines every 24 hours.

In this example the main tools used are:

  • Bolt.new (paid): A tool that can write code and fix errors based on user prompts.
  • Supabase + Cron-job (free): A UI-friendly database that connects directly with Bolt. The cron-job extension in the database triggers the sending of new emails.
  • Zapier (paid): Handles the workflow once a news agent is activated to collect news.
  • Open AI API (paid): Based on the news agent's settings, it builds a query, which is analyzed by GPT to generate an output.
  • Sendgrid (free): Handles the email delivery to users.

For most of these tools, a paid subscription is useful or required; a small price to pay for someone who doesn’t code.

Step 1: Building the application

The initial query could probably be improved, but I wrote something along the lines of:

“You are building a news monitoring application called 'Raidar' that acts as an AI news agent. It automatically fetches and delivers personalized news updates to users based on their specified interests and industries.”

Then, I added a couple of user stories to make the requirements more specific, covering details such as: user sign-up/login, configuring news preferences, creating news monitoring tasks, and receiving news updates via email. Within a few minutes, I had my first version. But then the real work began.

Here you can see Bolt in action

The most challenging part of the application was getting the cron-job to work. This function in the database triggers events based on time. After a lot of trial and error, I finally got it working.

Another interesting challenge was Bolt’s tendency to build everything typed in the input field immediately. It just takes off. A useful trick was adding “only analyze the question and tell me how you can solve it, don’t build it yet” to every input line.

Lastly, I had a rough idea of how to extract data from the application to OpenAI, but I hadn’t done it before. After some Q&A with Bolt, we determined that sending the data to a Zapier webhook was the best approach. The webhook catches the data, allowing further processing within a workflow. All I had to do was provide Bolt with the Zapier webhook URL it needed to call. Hats off to the developers at Bolt for making this process so easy.

Step 2: Building the workflow in Zapier


Once the webhook is triggered, the data flows into Zapier, and through its UI, processing it step-by-step is effortless. The OpenAI and Sendgrid Zaps integrate seamlessly, with no need for additional configuration.


Step 3: Deploying and testing

With the push of a button, the application is deployed. By visiting the URL, external users can access the service. The application has proven to be stable, running smoothly for over a week without errors. I consider it a success.

Concluding

For testing purposes, this was a great experience. However, I realized far too late in the process of building the app that the OpenAI API lacks internet search capabilities, meaning the generated headlines are essentially hallucinations. There are two ways to address this:

  1. Use a model that has internet access, such as Perplexity.
  2. Use a standard search engine to retrieve results and process the data with an LLM like GPT.

Overall, this approach works well for building prototypes and MVPs quickly and efficiently. While integrating with legacy systems and developing scalable enterprise applications or SaaS platforms isn't quite there yet, we have Eli5 for that.

Live demo: The Raidar app

Floris Schoenmakers
Chief Venture and Growth Officer
current