RedFlagger is an emotionally intelligent AI-powered analyzer for WhatsApp chats. It goes beyond generic sentiment analysis by identifying manipulation patterns, sudden emotional spikes, and potential red flags in day-to-day conversations.
Built with LangChain
, OpenAI- GPT-4o
, and Streamlit
, it transforms raw exported .txt
WhatsApp files into insightful, color-coded visualizations that surface the emotional truth beneath the surface of your chats.
- โ WhatsApp Chat Loader & Cleaner (media-aware)
- ๐ง LLM-powered Sentiment Analyzer (with fine-grained classification)
- ๐ Sentiment Timeline Chart (track emotional fluctuations)
- ๐ฉ๏ธ Spike Detection & Red Flag Alerts
- โ๏ธ Color-coded Message Cloud
- ๐งช Ready for Agentic workflows and RAG-based enhancements
- ๐งพ Input Module: User uploads .txt export of WhatsApp chat. Parser splits messages: sender, timestamp, content.
- ๐งฎ Preprocessing & Chunking: Clean metadata, remove system messages. Chunk into: Per day / week Per topic turn (based on shifts in conversation)
- ๐งฐ Analysis Engines (Chains) ๐ด Red Flag Detector
- Gaslighting
- Breadcrumbing
- Guilt-tripping
- Blame-shifting
- Love bombing
- Silent treatment
- Output: Flag + explanation + message reference.
- Simple Streamlit UI: Upload chat Run analysis Visual output: flags, charts, downloadable report
Python
LangChain
OpenAI GPT (gpt-4o-turbo)
(or configurable)Streamlit
Matplotlib / Seaborn
Pandas
- Export your WhatsApp chat as
.txt
file (without media). - Launch the Streamlit app:
streamlit run main.py
- Upload chat file, view timeline, red flags, and insights.
โ ๏ธ Media placeholders (like"<Media omitted>"
) are intelligently handled.
- Relationship Health Score
- Toxicity Detection
- Persona-Based Behavior Summaries
- Support for multiple chat formats
MIT License. Open for contributions!