How ayushshahir/youtube-rag-chatbot works
This is a YouTube transcript RAG chatbot. A user loads a video, the backend retrieves and chunks its transcript, indexes it for semantic search, and answers questions with Gemini; the interface presents timestamp-linked answers and supports conversation memory. The README also documents Hindi and Marathi translation. The graph reflects the excerpts and README; unsampled frontend and backend details limit some interaction links.
Main entry points: app.py Flask API · script.js Chat interface · index.html Chat page
Components 16
Chat interface
- Chat interface
static/script.js - Chat page
templates/index.html - Answer translation
static/script.js
Video ingestion
- Flask API
backend/app.py - Transcript fetch
backend/app.py - Timestamped chunks
backend/app.py - Text embeddings
backend/app.py - Vector store
backend/app.py
Retrieval and answers
- Semantic retrieval
backend/app.py - RAG chain
backend/app.py
Conversation and links
- Conversation memory
backend/app.py - Timestamp links
backend/app.py
Other components
- Video viewer
- YouTube transcript service
- Gemini model
- YouTube player
Connections 16
- Video viewer → Chat interface: uses
- Flask API → Chat page: renders
backend/app.py - Chat interface → Flask API: processes video
static/script.js - Flask API → Transcript fetch: fetches
backend/app.py - Transcript fetch → YouTube transcript service: requests transcript
backend/app.py - Flask API → Timestamped chunks: chunks transcript
backend/app.py - Flask API → Vector store: creates store
backend/app.py - Vector store → Text embeddings: uses
backend/app.py - Flask API → Semantic retrieval: configures
backend/app.py - RAG chain → Semantic retrieval: retrieves context
backend/app.py - RAG chain → Gemini model: generates answer
backend/app.py - Flask API → RAG chain: invokes
backend/app.py - Flask API → Conversation memory: tracks turns
backend/app.py - Flask API → Timestamp links: builds sources
backend/app.py - Chat interface → Answer translation: translates answers
README.md - Chat interface → YouTube player: seeks timestamps
static/script.js