A private WhatsApp bot my family forwards suspicious messages, images and videos to. It replies in Hinglish with what is true, what is twisted, and why.
The problem
Family WhatsApp groups run on forwards. Some are true, many are half true, and the half-true ones are the hard part. My parents wanted a way to check a message without me being the one who says "that's fake" every time.
What I built
A WhatsApp number they can forward anything to as a direct message: text, an image, or a video. The bot reacts with a magnifying glass so they know it's working, then replies with a short verdict in Hinglish that separates what's real from what's been bent.
How it works
One async FastAPI service. No queues. The webhook checks the Meta HMAC signature, an allow-list of numbers, and message-ID idempotency, then returns 200 fast and runs the pipeline in the background.
The pipeline:
- Media dedup: perceptual hash for images, video hash for videos.
- Claim extraction with a small Gemini model into JSON. If nothing is checkable, it says so and stops.
- Semantic dedup against past claims with Atlas Vector Search.
- For images, a provenance lookup through Google's Fact Check Tools API.
- A verdict from a model grounded on live Google Search.
- The Hinglish reply, then the claim, embedding and media hash are stored.
Cache hits never return automatically. An LLM equivalence gate, including a polarity check, has to agree the new claim is the same claim. Thin or unverified verdicts expire after 48 hours and get re-checked.
Signature checks fail closed, sender numbers are masked in logs, and every request carries a correlation ID through the background task so one fact-check can be traced end to end.
Outcome
Running for a handful of family members, deployed with Docker Compose.
Need something like this built? contact@akhilsingh.in