An AI-powered chatbot that answers student and staff FAQs in regards to CSIS.
Find a file
mcPrefect 8dc5e07a5b
Some checks failed
/ check_lfs (push) Failing after 2s
added integration tests for chatbot and knowledge base services
2025-11-23 18:07:14 +00:00
.forgejo/workflows Initial commit 2025-11-21 21:18:03 +00:00
backend added integration tests for chatbot and knowledge base services 2025-11-23 18:07:14 +00:00
doc Initial commit 2025-11-21 21:18:03 +00:00
frontend switch to png logo 2025-11-23 16:47:23 +00:00
sample_data Add course timetable integration: detect course queries, ask for course code and year together, display full course timetable 2025-11-23 16:44:53 +00:00
src Initial commit 2025-11-21 21:18:03 +00:00
.env added env 2025-11-22 12:51:23 +00:00
.gitattributes Initial commit 2025-11-21 21:18:03 +00:00
.gitignore added complete docker compose orchestration with escaltion servive running and connected to ui 2025-11-23 09:58:46 +00:00
.mailmap Initial commit 2025-11-21 21:18:03 +00:00
demo_script add demo script 2025-11-23 16:12:49 +00:00
LICENSE Initial commit 2025-11-21 21:18:03 +00:00
README.md added README 2025-11-23 15:50:05 +00:00

CSIS Helpdesk Chatbot

A RAG-powered AI chatbot for university helpdesk queries built with a microservices architecture.

Architecture

Backend Services

Service Port Description
Knowledge Base 8000 Vector search with Qdrant, document ingestion
Chatbot 8001 RAG chat with GPT-3.5-turbo, escalation logic
Notification 8003 Escalation handling, ticket creation

Infrastructure

  • Qdrant (6333) - Vector database
  • RabbitMQ (5672, 15672) - Message queue for escalations
  • MySQL - Conversation storage
  • NGINX (80) - Load balancer

Frontend

React

Quick Start

Prerequisites

  • Docker and Docker Compose
  • Node.js 18+
  • OpenAI API key

Environment Setup

Create backend/.env:

OPENAI_API_KEY=your-key-here

Running with Docker

cd backend
docker-compose up -d

Frontend runs at http://localhost:3000

Running Frontend on its own

cd frontend
npm install
npm run dev

API Endpoints

Chatbot Service (8001)

  • POST /api/chat - Send message, get AI response
  • GET /api/conversations - List conversations
  • GET /api/conversations/{session_id} - Get conversation messages
  • DELETE /api/conversations/{session_id} - Delete conversation

Knowledge Base Service (8000)

  • POST /api/knowledge/search - Vector search
  • POST /api/knowledge/ingest - Add document
  • POST /api/knowledge/upload - Upload file (PDF/DOCX/TXT/JSON)
  • GET /api/knowledge/documents - List documents
  • DELETE /api/knowledge/documents/{id} - Delete document

Notification Service (8003)

  • GET /api/escalations - List escalations
  • GET /api/escalations/stats - Escalation statistics
  • PATCH /api/escalations/{id}/status - Update status

Features

  • RAG-powered responses using OpenAI embeddings and GPT-3.5
  • Automatic document chunking for better retrieval
  • Query escalation based on confidence scores and keywords
  • Conversation history per user
  • Admin dashboard for managing knowledge base and escalations
  • Voice input support

Project Structure

backend/
  chatbot/          # Main chat service
  knowledge_base/   # Vector DB and document processing
  auth/             # Authentication service
  notification_service/  # Escalation handling
  database/         # MySQL schema
frontend/
  src/
    components/     # React components
    services/       # API client
    utils/          # Helper functions
sample_data/        # Sample knowledge base documents

Configuration

Escalation Thresholds

In backend/chatbot/main.py:

  • MIN_CONFIDENCE_SCORE = 0.3 - Below this triggers escalation
  • ESCALATION_KEYWORDS - Words that trigger escalation

Chunking

In backend/knowledge_base/main.py:

  • CHUNK_SIZE = 1500 - Characters per chunk
  • CHUNK_OVERLAP = 200 - Overlap between chunks