All projects
NLP / Data Analysisactive

Group Chat Analyser

Temporal social graph analyser for group chats tracks evolving relationship dynamics, detects influence patterns, and applies LLM summarisation to surface latent themes across thousands of messages.

PythonTkinterTransformersMatplotlibNLTK

Skills involved

PythonLLMs

What This Is

A social dynamics analyser for group chat data treating a chat export not as a log of messages, but as an evolving social graph with detectable structure: influence hierarchies, coalition formation, topic ownership, and drift over time.

Computational social science has produced rich theory about online group dynamics. This project is an applied implementation: take that theory and make it legible from a WhatsApp or Telegram export.

The Social Graph Model

We represent the chat as a temporal directed graph: nodes are participants, edges are response relationships (A messages B, B responds to A). Edge weights evolve over time. From this graph we compute:

  • Centrality metrics: who drives conversation? PageRank on the response graph identifies influence nodes.
  • Clustering: subgroups that consistently converse with each other more than with others detected via community detection (Louvain or Leiden algorithm)
  • Temporal drift: how do coalitions shift over months? Who gains or loses social influence?

LLM-Powered Theme Extraction

Beyond structure, we want content what are people actually talking about, and how does topic ownership distribute? We use an LLM to:

  1. Cluster messages by topic using embedding similarity (BERTopic-style approach)
  2. Identify per-topic "experts" who gets the most substantive replies on a given topic?
  3. Detect conversation dominance patterns: who changes the subject, and who follows?

Sentiment and Tone

Sentiment at the message level is standard. The interesting analysis is at the thread level: does sentiment escalate or de-escalate in argument threads? Who tends to defuse conflict vs. escalate it? We model this as a sentiment trajectory over reply chains.

What We're Learning

  • Whether LLM-based topic clustering outperforms LDA/BERTopic on conversational text
  • How to handle the noise of informal language (abbreviations, slang, code-switching)
  • Privacy-preserving analysis: what can we learn without storing raw messages?

What's Next

  • Support WhatsApp, Telegram, Discord, and iMessage export formats
  • Interactive visualisation: D3.js social graph with timeline scrubbing
  • Anomaly detection: flag significant social dynamic changes

Last updated Oct 14, 2024

← Back to all projects