A Retrieval-Augmented Generation (RAG) system that lets you:
- Fetch YouTube video transcripts
- Generate embeddings and store them locally
- Query videos using natural language
- Get AI-powered summaries and Q&A
- Transcript Extraction: Automatically fetch YouTube video transcripts
- Local Vector Database: ChromaDB for efficient similarity search
- LLM Integration: Ollama with local LLMs (DeepSeek, Llama3, etc.)
- Strict Context-Only Answers: Prevents hallucinations
- Modular Architecture: Easily swap components (database, LLM, etc.)
- Backend: Python 3.10+
- Vector DB: ChromaDB
- Embeddings: SentenceTransformers (
all-MiniLM-L6-v2
) - LLM: Ollama (local models)
- UI: Streamlit
-
Prerequisites:
- Ollama installed and running
- Python 3.10+
-
Set up virtual environment:
python -m venv .venv source .venv/bin/activate # Linux/Mac # .venv\Scripts\activate # Windows
-
Install dependencies:
pip install -r requirements.txt
-
Download LLM model:
ollama pull deepseek-r1:1.5b
youtube-notes/
├── database/
│ ├── databaseInterface.py
│ └── chroma.py
├── utils/
│ ├── youtube_utils.py
├── youtube_notes.py
├── app.py
└── requirements.txt
-
Run the app:
streamlit run app.py
-
Process a video:
Enter YouTube Video ID (e.g., pNJUyol15Jw)
Click "Process Video" to generate embeddings and summary
-
Ask questions:
Type natural language questions about the video
Get answers strictly based on the transcript