This workshop guides you through building a RAG (Retrieval-Augmented Generation) chatbot from scratch, using only local resources with Ollama. You'll learn how to create a complete system that can intelligently answer questions based on your documents.
Carlos Villuendas - @carlosvillu
- Node.js v22 or higher
- Ollama installed locally
- Docker and Docker Compose
- Basic understanding of TypeScript and JavaScript
- Basic knowledge of RAG systems and embeddings
- Clone the repository:
git clone https://github.com/carlosvillu/chatbot-workshop
- Install dependencies:
cd chatbot-workshop
npm run phoenix
- Install Ollama using the official install script:
curl -fsSL https://ollama.com/install.sh | sh
- Verify the installation:
ollama --version
- Start the Ollama server:
ollama serve
- Download required models:
# Download base model for chat
ollama pull llama3.1:8b
# Download smaller model for testing
ollama pull llama3.1:3b
# Download model for embeddings
ollama pull nemotron:mini
You can verify installed models with:
ollama list
In the 03-ingest-vectorstore
branch, you'll find a docker-compose.yml
file. Start the required services with:
docker-compose up -d
This will set up:
- ChromaDB for vector storage
- Additional required services
After finishing the workshop, clean up all resources with:
# Stop all containers
docker-compose down
# Remove all volumes
docker-compose down -v
# Remove all related images
docker rmi $(docker images -q 'chromadb/*')
# Verify cleanup
docker ps -a
docker volume ls
The workshop is organized in branches, each focusing on a specific aspect of RAG systems. Follow them in order:
Learn how to load and process documents from different sources.
Transform documents into vector representations using Ollama's embedding model.
Store and manage document embeddings efficiently using ChromaDB.
Process user questions and convert them into vector representations.
Implement semantic search to find relevant documents for user questions.
Create a chat interface that uses the RAG system to answer questions.
- Start with branch
01-ingest-documents
and follow the commits - Once you understand each part, move to the next branch
- Each branch builds upon the previous one
- The final branch
06-consumer-chat
contains the complete working chatbot
The slides for this workshop are available at: https://docs.google.com/presentation/d/1QwgaD35z1KK7CqexYm5HWy2oezk_nK9Y_RcoM6Ej8oY/edit?usp=sharing
- If you encounter issues with Ollama, ensure the server is running with
ollama serve
- Check server status:
curl http://localhost:11434/api/tags
- Verify model installation:
ollama list
- Check running containers:
docker ps
- View logs:
docker-compose logs -f
- If ChromaDB fails to start, ensure ports are not in use:
lsof -i :8000
MIT