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.
- Python 3.13 or higher
- uv (Python package manager)
- Node.js and npm (for frontend development tools)
- An Anthropic API key (for Claude AI)
- For Windows: Use Git Bash to run the application commands - Download Git for Windows
-
Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh -
Install Python dependencies
uv sync
-
Install Node.js dependencies (for development tools)
npm install
-
Set up environment variables
Create a
.envfile in the root directory:ANTHROPIC_API_KEY=your_anthropic_api_key_here
Use the provided shell script:
chmod +x run.sh
./run.shcd 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
This project includes automated code quality tools for both Python backend and frontend code.
Quick quality check (format + lint):
./quality-check.shFormat code only:
# Python backend
./format.sh
# Frontend (HTML/CSS/JS)
npm run formatLint code only (no modifications):
# Python backend
./lint.sh
# Frontend
npm run format:checkBackend (Python):
- Black: Code formatter
- isort: Import statement organizer
- flake8: Style guide enforcement
Frontend (JavaScript/CSS/HTML):
- Prettier: Code formatter
For detailed information about code quality tools and configuration, see frontend-changes.md.