CMU-Africa Campus Assistant
# π CMU-Africa Campus Assistant
A modern, full-stack AI-powered campus assistant built with RAG (Retrieval-Augmented Generation) technology for CMU-Africa students, faculty, and staff.
## π Features
### Frontend (React + TypeScript + Tailwind CSS)
- β¨ **Modern, Student-Friendly UI**: Beautiful, responsive design optimized for mobile and desktop
- π¬ **Real-Time Chat Interface**: Smooth conversational experience with message history
- π― **Smart Suggestions**: Contextual suggestion pills displayed ABOVE the input box
- π **Collapsible Sources**: Expandable source citations for transparency
- π **Follow-Up Questions**: AI-generated follow-up suggestions as clickable buttons
- π¨ **Attractive Design**: CMU-branded colors with smooth animations
### Backend (Python FastAPI)
- π€ **Strict RAG Pipeline**: No hallucination - only context-based responses
- π **Vector Search**: Pinecone integration for semantic search
- π§ **OpenAI Integration**: GPT-4 for intelligent response generation
- π **Structured JSON Responses**: Consistent format with answer, sources, suggestions, and follow-ups
- π‘οΈ **Error Handling**: Robust fallback mechanisms
- π **Fast & Scalable**: Async FastAPI for high performance
### Key Capabilities
- **Academic Information**: Programs, courses, requirements
- **Transportation**: Shuttle schedules, routes, tracking
- **Campus Life**: Events, clubs, activities
- **Housing**: Options, applications, availability
- **General Inquiries**: Library hours, contact info, facilities
## π Project Structure
```
cmu-africa-campus-assistant/
βββ backend/
β βββ main.py # FastAPI application
β βββ rag_pipeline.py # Enhanced RAG pipeline
β βββ requirements.txt # Python dependencies
β βββ .env.example # Environment variables template
β βββ load_knowledge_base.py # Script to load sample data
βββ frontend/
β βββ public/
β β βββ index.html
β βββ src/
β β βββ components/ # React components
β β β βββ C β¦