Members-Only
Recent Talks & Demos are for members only
You must be an AI Tinkerers active member to view these talks and demos.
Gemini filters WhatsApp memories
Learn how to extract, rank, and store the most memorable WhatsApp messages using a Python script, Gemini 2.5 Flash, FastAPI, and Next.js.
A whatsapp clone with only the best messages between you and a loved one.
A python script uses an LLM (Gemini 2.5 Flash) to sort through the messages until only the best ones are left. You can then reread the best messages in the UI and have enjoy a bit of nostalgia :-)
The talk will consist of a presentation of the functionality first before diving into the code and the decisions that I made during development.
Technical Details:
The python script does the following:
- Read the exported Whatsapp chat history.
- Split the chat history into chunks, one per day.
- For each chunk, extract the messages and the metadata (date, time, sender).
- Send each chunk to the LLM to filter out the messages that are memorable according to a prompt. Extraction is done with structured output.
- Save memories to a database.
The web app constisting of fastapi and nextjs reads the database and shows the messages it in the UI. The web app has basic CRUD capabilities to further curate the messages.
Challenges:
It was challenging to find an LLM with the right balance of intelligence, speed and cost. After some experimentation I settled on Gemini 2.5 Flash because of it’s exceptional value for money. It’s reasoning is powerful enough to extract meaningful messages while being cheap and fast even when processing an extensive message history.
Another challenge during development was to teach the model exactly what constitutes a memorable message vs. a merely cute one. I’ve used prompt engineering with few shot examples to increase the quality. I tested the quality by vibe checking only. In a more serious project I would have created a data set and used automated evaluation to test the quality reliably.