🤖 Trump Speeches NLP Chatbot

An NLP playground built on 35 Trump rally speeches — ask questions, analyse sentiment, extract topics, or dig into the dataset. The AI Chatbot is where the real action is.

Ask the AI Chatbot

Ask anything about 35+ Trump rally speeches — powered by a 10-stage RAG pipeline built from scratch: query rewriting, hybrid semantic search, cross-encoder re-ranking, grounded answer generation, and multi-factor confidence scoring. Three ML models under the hood. Zero LangChain.

Quick test on these topics:

🗣️ On Joe Biden 📺 Views on the media 💰 Economy & jobs 🌎 Immigration stance
🔍 Searching knowledge base and generating answer...
✨ AI-Generated Answer
📄 Sources
📚 Supporting Context — click to expand retrieved passages

🎭 Sentiment Analysis

Drop in any text and get a three-model breakdown — FinBERT scores the sentiment, RoBERTa maps the emotions, and an LLM ties it together with a plain-English interpretation. Speeches, news articles, tweets, whatever.

🎭 Analyzing sentiment...
✨ AI Sentiment Interpretation
📊 Sentiment Breakdown
🎭 Top Emotions

🏷️ Topic Extraction

Drop in any substantial text and get it broken down into meaningful themes — keywords grouped by semantic similarity, real examples pulled from the source with highlighting, and an LLM summary tying it all together. Under the hood: DBSCAN clustering with sentence-transformers.

🏷️ Analyzing topics with AI...
🔍 Topic Clusters

📊 The Dataset

35 Trump rally speeches (2019–2020) chunked into ~2,354 semantic segments, embedded as 768-dimensional MPNet vectors, and indexed in ChromaDB — the knowledge base the RAG chatbot searches. Load the stats to see speech lengths, word counts, and corpus-wide breakdowns.

Loading statistics...