Skip to content

rajesh1804/ThreadNavigatorAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

title emoji colorFrom colorTo sdk sdk_version app_file pinned
ThreadNavigatorAI
🧡
gray
indigo
streamlit
1.33.0
app.py
true

🧡 ThreadNavigatorAI β€” Reddit-style Summarizer, Moderator & Reply Assistant (Agentic RAG)

Built with Streamlit
Agentic RAG via LangGraph
Deployed on Hugging Face
License: MIT

πŸ” ThreadNavigatorAI is an intelligent Reddit-style assistant that summarizes threads, detects moderation issues, and suggests replies β€” powered by LangGraph-based Agent Orchestration + RAG.

🎯 Built for Reddit, Discord, and social platforms that need smart thread navigation at scale.
πŸ› οΈ Uses only free-tier tools (OpenRouter, Weaviate, Streamlit, Hugging Face).


🧠 What It Solves

"This thread is messy β€” what’s the summary, what’s toxic, and how should I respond?"

Online communities face:

  • Too many replies, not enough signal
  • Toxic or biased comments
  • New users unsure how to engage

ThreadNavigatorAI solves this by:

  • πŸ“ Summarizing the core thread
  • πŸ›‘οΈ Detecting moderation concerns (bias, sarcasm, trolling)
  • πŸ’¬ Generating helpful replies

πŸ”§ Key Features

βœ… Multi-agent workflow (Summarizer, Moderator, Reply Assistant)
βœ… LangGraph orchestration with stateful memory and retry logic
βœ… Vector-based RAG using Weaviate + Sentence-BERT
βœ… Manual Evaluation Framework for recruiters + QA
βœ… Live LLM Latency Tracking in UI
βœ… Streamlit UI with branding, sample queries, and visual appeal
βœ… Free-tier deployable on Hugging Face


🧠 Agent Workflow Breakdown

Each user query activates a 3-stage Agentic RAG pipeline orchestrated via LangGraph.

Agent Role
πŸ“ Summarizer Uses RAG to summarize key takeaways across the entire thread
πŸ›‘οΈ Moderator Flags sarcasm, trolling, biased or off-topic replies
πŸ’¬ Reply Assistant Crafts helpful, polite, and context-aware replies for the user

All agents share memory via LangGraph's StateGraph β€” allowing responses to influence downstream decisions.


πŸ–ΌοΈ Architecture Overview

Architecture Overview

User Query β†’ [LangGraph Agentic Workflow]
              β”œβ”€β”€> Summarizer Agent (RAG over thread)
              β”œβ”€β”€> Moderator Agent (LLM + heuristics)
              └──> Reply Assistant Agent (LLM response suggestion)

              ↳ Shared Memory + Retry Handling via LangGraph

All backed by:
- Weaviate Vector DB (cloud-hosted)
- Sentence-BERT embeddings
- Mistral-7B (OpenRouter, free-tier)

πŸ§ͺ Example Flow

A walkthrough for one simulated thread

🧡 Thread 002 – Gemini vs ChatGPT

Query:

"Summarize this thread and point out any sarcasm or trolling."

Agent Flow Output:

  • πŸ“ Summary:
    Debate between Google’s Gemini and OpenAI’s ChatGPT. Highlights bias and opinions.
  • πŸ›‘οΈ Moderation Report:
    Detects sarcastic "toaster" comment and subtle trolling in LLM vs AGI debate.
  • πŸ’¬ Suggested Reply:
    "Both models have strengths. Let’s stay focused on the facts instead of throwing shade."

⏱️ Latency: 3.2 seconds (displayed in UI)


🧭 Manual Evaluation Samples

Manually curated QA pairs for demo/testing/evaluation. Integrated directly into the Streamlit UI.

Thread ID Scenario Agent Task
thread_001 Apple M4 chip launch Sentiment + Summary
thread_002 Gemini vs ChatGPT Detect sarcasm/trolling
thread_003 Student loan forgiveness Highlight bias/emotion
thread_004 Apple Vision Pro Off-topic derailment detection

Used in UI to demo RAG + LLM + moderation workflows under realistic edge cases.


πŸ§ͺ Live Demo

🎯 Try the full agentic flow now on Hugging Face:
πŸ‘‰ ThreadNavigatorAI Demo

Demo GIF


πŸ“ Project Structure

ThreadNavigatorAI/
β”œβ”€β”€ app.py                         # Streamlit UI
β”œβ”€β”€ eval_samples.py                # Manual eval dataset
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ thread_uploader.py         # Uploads simulated Reddit threads to Weaviate
β”‚   β”œβ”€β”€ summarizer_agent.py        # Summarizer agent logic
β”‚   β”œβ”€β”€ moderator_agent.py         # Moderator agent logic
β”‚   β”œβ”€β”€ reply_agent.py             # Reply generator logic
β”‚   └── agent_graph.py             # LangGraph agent orchestration
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ threadnavigatorai-architecture.png
β”‚   └── threadnavigatorai-demo.gif
β”œβ”€β”€ requirements.txt
└── README.md

πŸ’Ό Why This Project Stands Out

βœ… Agentic RAG + LangGraph orchestration
βœ… Evaluation-ready UI with real data
βœ… Built like an internal tool for Reddit or Discord moderators
βœ… No OpenAI costs β€” uses OpenRouter free-tier only
βœ… Latency, UX, eval β€” all production-quality
βœ… Demonstrates end-to-end agent reasoning + vector retrieval

🎯 Built to impress top-tier AI/ML recruiters, not just LLM hobbyists.


🧱 CHeckout My Other Projects

Project Description Skills Showcased GitHub Repo
πŸ›’ GroceryGPT+ AI-powered grocery search engine with vector DB, reranking, and typo-tolerant recall Semantic search, LLM reranking, Weaviate, Sentence-BERT, OpenRouter πŸ”— Repo
πŸš• RideCastAI Predicts ride fare & ETA with dynamic spatial heatmaps and real-time latency visualization Spatio-temporal ML, regression, simulated demand mapping, latency-aware UI πŸ”— Repo
🎬 StreamWiseAI Netflix-style movie recommender with a Retention Coach agent and session-aware personalization Recommender systems, RAG agent, session memory, fuzzy search, real-time LLM retry handling πŸ”— Repo

πŸš€ Getting Started

git clone https://github.com/rajesh1804/ThreadNavigatorAI.git
cd ThreadNavigatorAI
pip install -r requirements.txt

Create a .env file with:

WEAVIATE_URL=your_cluster_url
WEAVIATE_API_KEY=your_api_key
OPENROUTER_API_KEY=your_openrouter_key

Then:

streamlit run app.py

πŸ’‘ Skills Demonstrated

βœ… LangGraph agent orchestration
βœ… Modular agent design (summarization, moderation, replies)
βœ… Free-tier LLM usage (OpenRouter)
βœ… Weaviate cloud vector DB + RAG over Reddit-style threads
βœ… Manual eval integration in UI
βœ… Latency tracking and real-time feedback
βœ… Streamlit UI with product thinking and branding
βœ… Fully deployable on Hugging Face Spaces


πŸ§‘β€πŸ’Ό About Me

Built by Rajesh Marudhachalam


πŸ™Œ Acknowledgments


⭐️ Star this repo if it impressed you. Follow for more elite-level ML + LLM product builds.

About

πŸš€ Built a full-stack AI product that simulates Reddit-style thread summarization, moderation, and reply generation using Agentic RAG and orchestrated LLM agents. https://medium.com/@rajesh1804/threadnavigatorai-reddit-style-thread-summarizer-moderator-reply-assistant-powered-by-b4d52126c454

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages