DEV Community

Cover image for I Built an AI That Roasts You (But Actually Cares)
Kanchan Ghosh
Kanchan Ghosh

Posted on

I Built an AI That Roasts You (But Actually Cares)

April Fools Challenge Submission ☕️🤡

This is a submission for the DEV April Fools Challenge

What I Built

MATE — Mostly Annoying, Technically Empathetic.
A voicebot that roasts everything you say. Makes terrible puns. Talks absolute nonsense. Occasionally shares fake facts about otters.
But here's the thing nobody asked for: it actually cares about you.
If you mention you're stressed, tired, struggling, or having a bad day — MATE will still roast you for it. Obviously. But the punchline lands somewhere warm. You won't see it coming, which is exactly the point.
It's a wellness check disguised as a chaos bot. A therapist that would be struck off immediately. A best mate who takes the mick but never lets you drown.
Zero real-world value. Possibly the most useful thing I've built.

Demo

🔗 [Live on Cloud Run] https://mate-451954006366.europe-west1.run.app/

Heads up: requires Chrome on desktop or Android — Web Speech API isn't supported in Firefox or Safari. If it works in your browser, great. If it doesn't, MATE would like you to know that's entirely your fault.

Code

Directly deployed using GCloud CLI

Core files:

app.py — Flask server, Gemini API integration, the system prompt that does all the actual work
templates/index.html — Frontend: Web Speech API, animated face states, SpeechSynthesis output
Dockerfile — Cloud Run deployment

How I Built It
Stack:

Gemini 2.0 Flash via the Gemini API — handles the roasting and the hidden empathy
Google Cloud Run — deployed the Flask app as a container
Web Speech API — browser-native speech recognition, no third-party STT needed
SpeechSynthesis API — browser-native TTS, prefers UK English voice if available
Flask — lightweight backend that proxies requests to Gemini and keeps the API key server-side

The interesting bit is the system prompt.
MATE has two layers baked into a single prompt. On the surface: roast mode. Terrible puns, absurd non-sequiturs, fake facts, chaos. Underneath: a detection layer. If the user's words contain stress, sadness, failure, loneliness, or burnout — MATE still roasts it — but the response ends somewhere genuinely warm, hidden inside the absurdity.
The model never announces the switch. It just does it.
Example:

You: "I'm really stressed about everything"
MATE: "Stressed? Your body's basically LARPing as a disaster. But here's the thing — you've survived every hard day that's come at you so far. That's a flawless record. Suspicious, given your choices, but there it is."

That's Gemini 2.0 Flash. One call. No fine-tuning. Just a system prompt that takes the joke seriously.

Prize Category

Best Google AI Usage

Gemini 2.0 Flash runs the entire conversation layer. The model handles both the comedy and the emotional intelligence in a single inference — there's no separate sentiment classifier, no second API call, no post-processing. The dual-layer personality (chaotic surface, genuine care underneath) is entirely prompt-engineered, which I think is an underrated use of what Gemini can actually do.
Deployed on Cloud Run with the API key as an env var, so nothing sensitive touches the frontend.
The Google AI Studio was used during development to iterate on the system prompt — testing how the model handled different emotional inputs before locking it in.

Built in a day. Submitted before the deadline. MATE would say that's the least impressive thing about you. And then check you're alright.

Top comments (0)