Deployed App Link: https://chatwithvideos.streamlit.app/
This application allows users to interact conversationally with YouTube videos.
The system extracts video transcripts, converts them into semantic embeddings, stores them in a FAISS vector database, retrieves relevant transcript chunks, reranks results semantically, and generates contextual answers using Gemini AI.
The project demonstrates:
- RAG pipeline engineering
- NLP workflows
- conversational memory
- semantic retrieval
- vector databases
- production AI application architecture
β
YouTube transcript extraction
β
Conversational AI chatbot
β
Multi-video support
β
Semantic search with FAISS
β
Gemini-powered responses
β
Semantic reranking
β
Timestamp citations
β
Transcript download
β
Streaming responses
β
Video thumbnail preview
β
Persistent vector database
β
Production-style modular architecture
- Streamlit
- LangChain
- Google Gemini AI
- Sentence Transformers
- FAISS
- YouTube Transcript API
- Recursive Text Chunking
youtube-rag-chatbot/
β
βββ app.py
βββ requirements.txt
βββ README.md
βββ .gitignore
βββ .env
β
βββ utils/
β βββ transcript.py
β βββ chunking.py
β βββ embeddings.py
β βββ vectorstore.py
β βββ rag_chain.py
β βββ reranker.py
β
βββ data/
β βββ faiss_index/
β
βββ images/
βββ screenshots/
git clone github.com/maw-khan/youtube-rag-chatbot.gitpip install -r requirements.txtstreamlit run app.pyπ API Key Setup You need a Google Gemini API Key. Get it from: π https://ai.google.dev/ No need for .env file β the app accepts it directly via Streamlit sidebar.
https://chatwithvideos.streamlit.app/
- Enter your Gemini API Key in the sidebar
- Paste youtube videos links/URL
- Click βProcess Videoβ
- Wait for processing to complete
- Start asking questions in the chat box
- View answers + expandable source references
π Example Query βWhat is the main conclusion of the video?β The chatbot will:
- Retrieve relevant chunks
- Generate an answer using Gemini
- Show source excerpts used for reasoning
Automatically extracts transcripts from YouTube videos.
Relevant transcript chunks are retrieved before generating responses.
Retrieved chunks are reranked using transformer-based semantic similarity models.
Responses include transcript timestamps for source verification.
Answers stream in real time for better conversational UX.
Users can download processed transcripts directly.
- YouTube playlist support
- Multi-user authentication
- Chat export
- PDF summary generation
- Voice interaction
- Hybrid BM25 + vector retrieval
- LangGraph agent workflows
This project helped strengthen understanding of:
- AI application engineering
- RAG pipelines
- vector search systems
- semantic retrieval
- conversational memory
- Streamlit deployment
- modular software architecture
Muhammad Ali Waris Khan
AI Developer | RAG Systems | Streamlit AI Apps | Python




