How vijayyy-code/youtube_qna_system works
YouTube Video Q&A is a Streamlit-based, captions-first transcript assistant with Whisper transcription fallback, semantic retrieval, and Groq-generated answers. The main workflow is to process a video, clean and chunk its transcript, optionally add a generated summary, build an in-session FAISS index, then retrieve context and answer questions across chat turns. Speaker questions can instead use video metadata. The source excerpts show the main call paths; external service links reflect calls visible in source, while documented capabilities such as optional retrieval-detail display are retained.
Main entry points: ui.py Chat UI · ingest.py Video ingestion · indexing.py Vector indexing · qa.py Chunk reranking
Components 19
Video ingestion
- Video ingestion
src/ingest.py - Caption fetch
src/ingest.py - Audio fetch
src/ingest.py - Video metadata
src/ingest.py
Transcript processing
- Transcript cleanup
src/transcript.py - Transcript chunking
src/transcript.py
Retrieval and state
- Runtime settings
src/config.py - Vector indexing
src/indexing.py - FAISS vector store
src/state.py - Chunk reranking
src/qa.py - Session state
src/ui.py
Answer generation
- Whisper transcription
src/llm.py - Transcript summary
src/llm.py - Grounded answering
src/llm.py
Other components
- Viewer
- YouTube video
- Groq API
Connections 23
- Viewer → Chat UI: uses
src/ui.py - App entry → Chat UI: runs
app.py - Chat UI → Video ingestion: processes video
src/ui.py - Video ingestion → YouTube video: fetches metadata
src/ingest.py - Video ingestion → Caption fetch: tries captions
src/ingest.py - Video ingestion → Audio fetch: fallback downloads
src/ingest.py - Video ingestion → Video metadata: extracts
src/ingest.py - Video ingestion → Transcript cleanup: parses captions
src/ingest.py - Video ingestion → Whisper transcription: transcribes fallback
src/ingest.py - Whisper transcription → Groq API: calls transcription
src/llm.py - Chat UI → Transcript chunking: chunks transcript
src/ui.py - Chat UI → Transcript summary: requests summary
src/ui.py - Transcript summary → Groq API: generates summary
src/llm.py - Chat UI → Vector indexing: builds index
src/ui.py - Vector indexing → FAISS vector store: creates index
src/indexing.py - Chat UI → Chunk reranking: gets relevant chunks
src/ui.py - Chunk reranking → Vector indexing: retrieves candidates
src/qa.py - Chat UI → Grounded answering: submits question
src/ui.py - Grounded answering → Groq API: generates answer
src/llm.py - Chat UI → Video metadata: answers speaker questions
src/ui.py - Chat UI → Session state: stores chat turns
src/ui.py - Chat UI → Runtime settings: loads settings
src/ui.py - Chat UI → Session state: shows retrieval details
src/ui.py