Chat with any YouTube video. Fetch the transcript, index it with FAISS + BM25 hybrid search, and answer questions grounded in what was actually said, with clickable timestamp links back to the exact moment in the video.
Start learning at learnwithparam.com. Regional pricing available with discounts of up to 60%.
- Pull YouTube transcripts and metadata without scraping the page
- Chunk transcripts in timestamped segments so citations stay accurate
- Build a hybrid retriever that fuses FAISS semantic search with BM25 keyword search
- Use reciprocal rank fusion to combine the two ranked lists
- Ground LLM answers in retrieved chunks and render timestamp-linked citations
- Ship a Streamlit UI with embedded video playback next to the chat panel
- Python 3.10+ with
uvfor dependency management - Streamlit for the two-panel video + chat UI
- youtube-transcript-api for transcript fetching
- FAISS for semantic retrieval + rank-bm25 for keyword retrieval
- OpenAI for embeddings and chat completions
- Python 3.10+
- uv (installed automatically by
make setup) - An OpenAI API key
make dev
# Or step by step:
make setup
# Edit .env with your OPENAI_API_KEY
make runOpen http://localhost:8501, paste a YouTube URL, and ask questions.
make build
make up
make logs
make downWork through these incrementally to build the app:
- Transcript Fetch - Parse a YouTube URL and pull the transcript with timestamps
- Metadata - Fetch title, thumbnail, and channel info for preview
- Chunking - Split the transcript into overlapping time-windowed chunks
- Semantic Index - Embed chunks with OpenAI and store them in FAISS
- Keyword Index - Build a BM25 index over the same chunks
- Hybrid Retrieval - Fuse FAISS and BM25 results with reciprocal rank fusion
- Grounded Chat - Prompt the LLM with retrieved chunks and render timestamped citations
- Multi-Video UI - Let the user switch between indexed videos in one Streamlit session
make help Show all available commands
make setup Initial setup (create .env, install deps)
make dev Setup and run (one command!)
make run Run the Streamlit app
make build Build Docker image
make up Start container
make down Stop container
make clean Remove venv and caches
- Start the course: learnwithparam.com/courses/video-rag-faiss
- AI Bootcamp for Software Engineers: learnwithparam.com/ai-bootcamp
- All courses: learnwithparam.com/courses