A Retrieval-Augmented Generation (RAG) system designed to answer questions about course materials using semantic search and AI-powered responses.
This application is a full-stack web application that enables users to query course materials and receive intelligent, context-aware responses. It uses ChromaDB for vector storage, Anthropic's Claude for AI generation, and provides a web interface for interaction.
- Docker and Docker Compose
- An Anthropic API key (for Claude AI)
- Python 3.13 or higher
- uv (Python package manager)
- An Anthropic API key (for Claude AI)
- For Windows: Use Git Bash to run the application commands - Download Git for Windows
Set up environment variables (required for both Docker and native installation)
Create a .env file in the root directory:
ANTHROPIC_API_KEY=your_anthropic_api_key_hereTo get an Anthropic API key:
- Go to https://console.anthropic.com
- Sign up or log in
- Navigate to "API Keys" and create a new key
No additional installation needed if you have Docker installed.
-
Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh -
Install Python dependencies
uv sync
Start the application:
docker-compose up --build -dThe application will be available at:
- Web Interface:
http://localhost:5000 - API Documentation:
http://localhost:5000/docs
Useful Docker commands:
# View logs
docker-compose logs -f
# Stop the application
docker-compose down
# Restart after .env changes
docker-compose down && docker-compose up -d
# Clear all data and restart
docker-compose down -v && docker-compose up --build -dQuick Start - Use the provided shell script:
chmod +x run.sh
./run.shManual Start:
cd backend
uv run uvicorn app:app --reload --port 8000The application will be available at:
- Web Interface:
http://localhost:8000 - API Documentation:
http://localhost:8000/docs
- Semantic Search: Uses ChromaDB with vector embeddings for intelligent document retrieval
- AI-Powered Responses: Leverages Anthropic's Claude for generating contextual answers
- Course Management: Automatically processes and indexes course materials from the
docs/folder - Conversation History: Maintains session-based conversation context
- Web Interface: Clean, responsive UI with markdown support and collapsible source citations
- Hot Reload: Development mode supports automatic code reloading (both Docker and native)
- Frontend: Vanilla JavaScript, HTML, CSS
- Backend: FastAPI (Python)
- Vector Database: ChromaDB
- AI Model: Anthropic Claude (claude-sonnet-4-20250514)
- Embeddings: Sentence Transformers (all-MiniLM-L6-v2)
- Place your course documents (
.txt,.pdf, or.docx) in thedocs/folder - Restart the application
- The system will automatically process and index the new documents
For detailed documentation, see CLAUDE.md.