A hands-on collection of Generative AI projects and experiments built with LangChain, Ollama (local LLMs), Streamlit, and various AI APIs. This repository covers the full spectrum of modern GenAI development β from basic LLM calls and embeddings to multi-agent pipelines, RAG systems, and production-ready AI applications.
- Tech Stack
- Project Structure
- Projects
- Learning Modules
- Prerequisites
- Installation
- Environment Variables
- Author
| Category | Tools |
|---|---|
| LLM Framework | LangChain, LangChain-Ollama |
| Local LLMs | Ollama (phi3, nomic-embed-text) |
| External APIs | Tavily Search, Sarvam AI (STT), TMDB, OpenWeatherMap |
| Vector Stores | FAISS, ChromaDB |
| Embeddings | Ollama Embeddings, HuggingFace (all-MiniLM-L6-v2) |
| Audio/Video | Whisper (OpenAI), yt-dlp, pydub, FFmpeg |
| Web Framework | Streamlit, FastAPI |
| Deployment | Render (movie-rec API) |
| Language | Python 3.11+ |
GenAI Learning/
βββ AI-Video-Assistant/ # YouTube/video transcription + RAG chat
β βββ core/
β β βββ extractor.py # Action items, decisions, questions extraction
β β βββ rag_engine.py # LCEL RAG pipeline over transcript
β β βββ summarizer.py # Map-reduce summarization
β β βββ transcriber.py # Whisper + Sarvam AI (Hinglish support)
β β βββ vector_store.py # ChromaDB + HuggingFace embeddings
β βββ utils/
β β βββ audio_processor.py # yt-dlp download, WAV conversion, chunking
β βββ app.py # Streamlit UI
β
βββ Multi-agent-research-system/ # 4-agent research pipeline
β βββ agents.py # Search agent, Reader agent, Writer & Critic chains
β βββ pipeline.py # CLI pipeline runner
β βββ tools.py # Tavily web search + BeautifulSoup scraper tools
β βββ app.py # Streamlit UI with live pipeline status
β
βββ rag/ # RAG system with PDF ingestion
β βββ app.py # Streamlit UI (upload PDF β ask questions)
β βββ create_database.py # PDF β FAISS vector store builder
β βββ main.py # CLI RAG query interface
β βββ document loaders/ # PDF, web page, text loaders (experiments)
β βββ retrievers/ # MMR, multi-query, arXiv retriever experiments
β βββ vector store/ # ChromaDB experiments
β
βββ movie-rec-ai/ # Movie recommendation system
β βββ main.py # FastAPI backend (TF-IDF + TMDB API)
β βββ app.py # Streamlit frontend
β βββ movies.ipynb # Data preprocessing & TF-IDF model building
β
βββ cinesage/ # Movie info extractor using structured output
β βββ core.py # CLI version (Pydantic + Ollama)
β βββ UICore.py # Streamlit UI version
β
βββ chatmodels/ # LLM chat experiments
β βββ chat.py # Basic LLM invocation (Ollama/OpenAI/Groq/Gemini)
β βββ chatbot.py # CLI chatbot with personality modes + memory
β βββ UIChatbot.py # Streamlit chatbot with 5 AI personality modes
β
βββ tools/ # LangChain tools & agents experiments
β βββ toolcalling.py # Tool binding + manual tool call loop
β βββ owntool.py # Custom @tool decorator example
β βββ Agents.py # City agent (weather + news) with human approval
β βββ newssummarizer.py # Tavily search β LLM summarization chain
β βββ sequencerunnable.py # LCEL RunnableSequence experiments
β βββ parallelrunnable.py # LCEL RunnableParallel experiments
β βββ runnablepassthrough.py # RunnablePassthrough experiments
β
βββ embeddingmodels/ # Embedding model experiments
β βββ embedding.py # Ollama embeddings (nomic-embed-text)
β βββ huggingfaceembedding.py # HuggingFace embeddings
β
βββ .env # API keys (not committed)
βββ requirements.txt # All Python dependencies
βββ pyproject.toml # Project config (uv)
AI-Video-Assistant/
A full-stack meeting intelligence tool that takes any YouTube URL or local video file and produces a complete analysis.
Pipeline:
- Audio extraction via
yt-dlp+pydub(chunked into 10-min pieces) - Transcription β English via OpenAI Whisper (local), Hinglish via Sarvam AI STT-Translate API
- Map-reduce summarization using Ollama phi3
- Extraction of action items, key decisions, and open questions
- RAG chat over the transcript using ChromaDB + HuggingFace embeddings + LCEL pipeline
Key Features:
- Supports both YouTube URLs and local video/audio files
- Bilingual: English + Hinglish (auto-translated to English via Sarvam)
- Live pipeline status in sidebar with animated step indicators
- Custom dark-themed Streamlit UI (JetBrains Mono + Syne fonts)
- In-session RAG chat with full conversation history
Run:
streamlit run AI-Video-Assistant/app.py
Multi-agent-research-system/
A 4-agent collaborative pipeline that researches any topic and produces a scored, structured report.
Agents:
| Agent | Role | Tool |
|---|---|---|
| Search Agent | Finds recent web information | Tavily Search API |
| Reader Agent | Scrapes top URLs for deep content | BeautifulSoup scraper |
| Writer Chain | Drafts structured research report | Ollama phi3 |
| Critic Chain | Reviews and scores the report (X/10) | Ollama phi3 |
Key Features:
- Real-time pipeline status cards (Waiting β Running β Done)
- Final report downloadable as
.md - Critic feedback with score, strengths, and improvement areas
- Custom dark UI with orange accent theme
Run:
# Streamlit UI
streamlit run Multi-agent-research-system/app.py
# CLI
python Multi-agent-research-system/pipeline.py
rag/
Upload any PDF and ask questions β answers grounded strictly in the document.
Architecture:
- PDF ingestion via
PyPDFLoader - Chunking with
RecursiveCharacterTextSplitter(1000 chars, 200 overlap) - Embeddings via
OllamaEmbeddings(nomic-embed-text) - Vector store: FAISS (persisted locally)
- Retrieval: MMR (Maximal Marginal Relevance) β
k=4, fetch_k=10 - LLM: Ollama phi3 with strict context-only prompt
Also includes:
create_database.pyβ standalone script to pre-build FAISS index from a PDFmain.pyβ CLI query interface for the saved vector store- Experiments in
retrievers/β multi-query retriever, arXiv retriever, MMR tuning
Run:
streamlit run rag/app.py
movie-rec-ai/
A full-stack movie recommendation system with a FastAPI backend deployed on Render and a Streamlit frontend.
Backend (FastAPI):
- TF-IDF cosine similarity on movie metadata (local dataset, ~45k movies)
- TMDB API integration for posters, details, genre-based discovery
- Endpoints:
/home,/tmdb/search,/movie/id/{id},/movie/search,/recommend/genre - Deployed at:
https://movie-rec-466x.onrender.com
Frontend (Streamlit):
- Keyword search with autocomplete dropdown
- Poster grid with click-to-details navigation
- Movie details page: poster, overview, genres, backdrop
- Dual recommendations: TF-IDF similar movies + genre-based discovery
Run:
# Backend
uvicorn movie-rec-ai.main:app --reload
# Frontend
streamlit run movie-rec-ai/app.py
cinesage/
Paste any movie description paragraph and get structured JSON output using Pydantic structured output with Ollama.
Output Schema:
class Movie(BaseModel):
title: str
release_year: Optional[int]
genre: List[str]
director: Optional[str]
cast: List[str]
rating: Optional[float]
summary: strRun:
streamlit run cinesage/UICore.py
chatmodels/
A conversational chatbot with 5 distinct AI personality modes, built with full message history.
Modes: π Angry Β· π Funny Β· π’ Sad Β· π Happy Β· π Sarcastic
Key Features:
- Persistent conversation memory using
SystemMessage + HumanMessage + AIMessage - Mode switching resets chat context automatically
- Message count stats in sidebar
- Supports Ollama, OpenAI, Groq, Gemini (commented stubs included)
Run:
streamlit run chatmodels/UIChatbot.pyThese modules document the learning journey through core LangChain concepts:
| Module | What's Covered |
|---|---|
chatmodels/chat.py |
Basic LLM invocation across providers (Ollama, OpenAI, Groq, Gemini) |
embeddingmodels/embedding.py |
Generating embeddings with Ollama (nomic-embed-text) |
embeddingmodels/huggingfaceembedding.py |
HuggingFace sentence-transformers embeddings |
tools/owntool.py |
Creating custom LangChain tools with @tool decorator |
tools/toolcalling.py |
Manual tool binding + tool call loop with bind_tools |
tools/Agents.py |
ReAct agent with weather + news tools + human approval middleware |
tools/newssummarizer.py |
Tavily search β LCEL summarization chain |
tools/sequencerunnable.py |
RunnableSequence (LCEL pipe operator) |
tools/parallelrunnable.py |
RunnableParallel for concurrent chain execution |
tools/runnablepassthrough.py |
RunnablePassthrough for context injection |
rag/retrievers/mmr.py |
MMR retrieval tuning |
rag/retrievers/multiquery.py |
Multi-query retriever for better recall |
rag/retrievers/arixv.py |
ArXiv academic paper retriever |
- Python 3.11+
- Ollama installed and running locally
- Required Ollama models pulled:
ollama pull phi3 ollama pull nomic-embed-text
- FFmpeg installed (for audio processing in AI Video Assistant)
# Clone the repository
git clone <repository-url>
cd "GenAI Learning"
# Install dependencies (using uv β recommended)
uv sync
# Or using pip
pip install -r requirements.txt
# Copy and fill environment variables
cp .env.example .envCreate a .env file in the root directory:
# Ollama (local)
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=phi3
OLLAMA_CHAT_MODEL=phi3:latest
OLLAMA_EMBEDDING_MODEL=nomic-embed-text:latest
OLLAMA_TEMPERATURE=0.3
# External APIs
TAVILY_API_KEY=<your-tavily-api-key>
TMDB_API_KEY=<your-tmdb-api-key>
OPENWEATHER_API_KEY=<your-openweather-api-key>
SARVAM_API_KEY=<your-sarvam-api-key> # For Hinglish transcriptionSadik Mohammad
- GitHub: [Your GitHub Profile]
- Email: [Your Email]
Built with LangChain Β· Ollama Β· Streamlit Β· FastAPI Β· Whisper Β· FAISS Β· ChromaDB