Skip to content

Sar-Go/RedFlagger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 

Repository files navigation

๐Ÿง  RedFlagger โ€” Emotional Intelligence for Your WhatsApp Chats

Python LangChain OpenAI Streamlit License: MIT

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.


๐Ÿš€ Features

  • โœ… 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

MVP System Design

  • ๐Ÿงพ 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

Prompts LLM to find:

  • Gaslighting
  • Breadcrumbing
  • Guilt-tripping
  • Blame-shifting
  • Love bombing
  • Silent treatment
  • Output: Flag + explanation + message reference.

๐Ÿ“Š Frontend (optional MVP interface):

  • Simple Streamlit UI: Upload chat Run analysis Visual output: flags, charts, downloadable report

๐Ÿ›  Tech Stack

  • Python
  • LangChain
  • OpenAI GPT (gpt-4o-turbo) (or configurable)
  • Streamlit
  • Matplotlib / Seaborn
  • Pandas

๐Ÿ“‚ How to Use

  1. Export your WhatsApp chat as .txt file (without media).
  2. Launch the Streamlit app:
    streamlit run main.py
  3. Upload chat file, view timeline, red flags, and insights.

โš ๏ธ Media placeholders (like "<Media omitted>") are intelligently handled.


๐Ÿค– Future features

  • Relationship Health Score
  • Toxicity Detection
  • Persona-Based Behavior Summaries
  • Support for multiple chat formats

๐Ÿ“„ License

MIT License. Open for contributions!

About

Find Red Flags in a WA conversation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published