How I Built a Cheap AI Support Agent for BioRift (Without Going Broke)

The Problem:  Running a nonprofit is tough because you feel like you keep running out of money. BioRift sells biodegradable bags, which might sound simple but there are so many customer facing questions. Questions like “Can I compost this in my backyard?” or “Will this melt in the rain?”

I used to answer these emails myself late at night, but it got to be too much. I needed a bot to do it. The problem is that most AI tools are super expensive, and I didn’t want to pay monthly fees for something I could build myself. So I decided to build a “RAG” (Retrieval-Augmented Generation) agent on AWS.

Here is how I did it for less than $15 a month.

The Setup (My Stack) I wanted to keep things “serverless” so I only pay when someone actually uses it. If nobody asks a question, I pay zero dollars.

Step 1: Reading the PDFs The hardest part was getting the AI to read BioRift’s technical documents. I have a bunch of PDF files with scientific data about our bags. I couldn’t just paste them into ChatGPT because they are too long. This is when I put my “thinking cap” on to figure out a solution.

I wrote a Python script in an AWS Lambda function. Whenever I upload a PDF to an S3 bucket, this script wakes up. It chops the PDF into small chunks and turns them into number lists called “vectors.” It sends these vectors to OpenSearch.

Honestly, this part was annoying to debug. I kept getting errors because my chunks were too big, and the embedding model would just crash. I had to trial and error the chunk size until I found that 500 characters was the sweet spot. You can see the start of the code and the S3 bucket below when I first set everything up.

 

Step 2: The Hallucination Nightmare The first version of this bot kept lying (Also called hallucinating). I asked it “Is this bag marine degradable?” and it confidently said “Yes, the bag looks biodegradable” even though our documents clearly say “No.” The bot didnt even have a reference.. That is dangerous for customers and us.

I realized I needed to be stricter with the “System Prompt.” This is basically the instructions you give the AI before it starts talking.

I changed the prompt to say: “You are a helpful assistant for BioRift. If you do not see the answer in the text provided, you must say ‘I don’t know.’ Do not make things up.”

It sounds simple, but it worked. Once I added that rule, the bot stopped lying. It was a huge relief. You can see the inital prompt where the bot was hallucinating.

 

Step 3: Keeping it Cheap I was worried about the bill. OpenSearch can get expensive if you leave it running at full power. I found out you have to be careful with “OCUs” (the capacity units). I made sure to use the absolute minimum settings everywhere possible.

In the end, my AWS bill for this project is tiny. The Lambda function costs pennies, and Bedrock is very cheap for the amount of text we process.

 

Conclusion You don’t need a huge team to build cool AI stuff. It took me a few weekends of frustration and reading documentation, but now we have a bot that answers customer questions 24/7. It saves me hours of work every week, and I learned a ton about how vector databases work.

 

 

Written as part of my personal volunteer work for sustainable tech.

Written by: Joshua Hackett 

Email: info@biorift.com 

Website: https://biorift.com/

Date Written: November 3, 2025