Dylan Howard
AI Chatbot Engineer

Dylan Howard

Developed the backend architecture for MyAdvisor, an AI-powered virtual advising system for UCT. Designed and implemented the distributed API framework, integrated large language models for SQL generation and conversation, and built the retrieval and vector search pipeline.

8.2/10
Chatbot usefulness
2
AI Models
86%
User Satisfaction
Scroll to Explore

AI Chatbot Development for MyAdvisor

Building an intelligent, context-aware virtual advisor powered by retrieval-augmented generation and semantic search

The MyAdvisor project was developed to modernize the student advising experience at the University of Cape Town (UCT). Each year, over 26,000 students rely on a small team of advisors for course registration, funding inquiries, and academic planning. This imbalance often leads to long wait times and confusion, especially given that critical information is scattered across UCT handbooks, departmental web pages, and email correspondence.

MyAdvisor addresses this challenge by providing a centralised virtual advising platform powered by artificial intelligence. At its core is an AI chatbot that combines retrieval-augmented generation, semantic vector search, and database querying to produce reliable, context-aware answers to student questions. The system functions as both a support tool for students and a complementary resource for human advisors, streamlining access to information while reducing administrative strain.

The chatbot handles everything from course prerequisites and registration deadlines to financial aid, transport, and accommodation queries. By simultaneously generating SQL queries and performing semantic searches, the system merges structured and unstructured information to deliver comprehensive, accurate responses in real-time.

Goals & Motivation

Primary Objectives

The main goal of MyAdvisor was to design and implement a virtual advisor capable of assisting students with academic and administrative queries in real time, addressing the critical imbalance where over 26,000 students rely on a small team of advisors.

Simplify the UCT registration process by centralising key information scattered across handbooks, web pages, and email correspondence

Provide 24/7 automated assistance to students through an intelligent chatbot that never sleeps

Reduce the workload on the limited team of human advisors by handling routine queries automatically

Demonstrate that retrieval-augmented AI systems can improve efficiency and accessibility in higher education

Technical Goals

The project also aimed to explore how open-source large language models (LLMs) could be effectively deployed within hardware constraints while maintaining high performance and response quality. Establish a scalable architecture that allows future integration of new datasets, languages, and student-facing tools.

Technologies Used

FastAPI

Used to build the system's distributed API architecture. Chosen for its speed, simplicity, and native support for asynchronous operations. Each component of the system as a separate FastAPI microservice, enabling modular development and easy scalability.

Python (asyncio, HTTPX, Pydantic)

Selected as the core development language due to its extensive AI and web development ecosystem. The asyncio library allowed asynchronous task management, while HTTPX was used for efficient API communication between services. Pydantic ensured data validation allowing each microservice to operate independently.

PostgreSQL

Served as the primary structured data store for UCT course, faculty, and administrative information. Chosen for its robustness, open-source nature, and advanced querying capabilities.

FAISS

Facebook AI Similarity Search implemented as the vector database to handle semantic retrieval. Stores dense text embeddings of advisor questions and handbook excerpts. Chosen for its efficiency and speed in high-dimensional similarity searches with exact indexing for high retrieval accuracy.

Hugging Face Transformers

Enabled integration of large, open-source LLMs without relying on proprietary APIs. Provided access to model loading, quantization, and streaming output features.

sqlcoder-7B-2

Fine-tuned model selected to handle natural language to SQL translation. Chosen for its high accuracy on unseen database schemas and compact size relative to proprietary alternatives, making it ideal for a self-hosted environment.

vicuna-13B

Deployed as the main conversational model responsible for generating final responses. Selected for its strong performance in maintaining conversational context, producing human-like replies, and integrating information from multiple sources.

all-MiniLM-L6-v2

Used to generate embeddings for semantic search, transforming user queries and advisor responses into vector representations for FAISS indexing. Chosen for its excellent trade-off between speed and accuracy, enabling fast semantic comparisons with minimal GPU memory usage.

Core Features

1. Intelligent AI Chatbot

The heart of MyAdvisor is an AI-powered chatbot designed to answer a broad range of student questions about university life — from course prerequisites and registration deadlines to financial aid, transport, and accommodation.

The chatbot doesn't rely on just one source of data; it combines structured database queries with unstructured text retrieval to generate complete and accurate answers. When a student types a question, MyAdvisor simultaneously:

  • Generates a SQL query to extract relevant information from the PostgreSQL database
  • Performs semantic vector search to retrieve similar past questions, advisor responses, and handbook excerpts

These results are merged and processed by Vicuna-13B, which crafts a final, natural-sounding response. This hybrid approach handles both factual questions ("What are the prerequisites for STA2007P?") and open-ended ones ("How do I choose my electives for next year?") effectively.

2. Roadmap Evaluation

The Roadmap feature helps students visualize and plan their academic journey. By selecting which courses they have passed, failed, or plan to take, users can generate a personalized degree progress report.

The AI evaluates the student's selections against program rules, prerequisites, and exceptions stored in the database, then recommends:

  • Eligible courses for the next year of study
  • Alternative routes if a required course has not been passed
  • Warnings about known course difficulties or time conflicts

This feature transforms the static course handbook into a dynamic, interactive planning tool, allowing students to make informed decisions before meeting with an advisor.

Architecture & System Design

System Workflow

The MyAdvisor system is built on a distributed, microservices-based architecture designed for scalability, fault tolerance, and modularity. When a student asks a question, the request flows through a multi-step pipeline:

  1. 1Frontend → Proxy API: Receives student question
  2. 2Proxy → SQL Server: Generates and executes SQL query for structured data
  3. 3Proxy → FAISS Search: Retrieves relevant semantic context
  4. 4Proxy → Model Server (Vicuna): Combines SQL + vector data and generates final answer
  5. 5Proxy → Frontend: Streams output to the website chat interface

Real-Time Response Streaming

AI output is streamed to the website as it's generated using NDJSON streaming via FastAPI and HTTPX, reducing perceived wait time and improving engagement.

Distributed, Resilient Architecture

Each component runs independently and communicates via APIs, providing fault tolerance, scalability, and ease of maintenance. If one service goes offline, others continue operating.

Dynamic Schema Extraction

The system dynamically reads the database schema at startup using SQLAlchemy, automatically identifying new tables and fields without manual reconfiguration.

Hybrid Context Retrieval

Combines FAISS vector search for semantic similarity with keyword filtering for precision, achieving both contextual understanding and accuracy for specific terms.

Adaptive Queue Management

FIFO request queue with timeout handling ensures stable performance during high-traffic periods, preventing crashes and guaranteeing system reliability.

Continuous Improvement

Every student interaction contributes to improving the system. As more data is added, the vector search index grows more robust, creating a living, continuously improving resource.

System Architecture Diagram

Testing and Evaluation

Testing Overview

Participants10 UCT students (Commerce, Science, Humanities)
MethodSupervised online sessions via screen-sharing
Duration30-45 minutes per session
EthicsUCT approved clearance (07/07/2025)

Evaluation Results

Ease of Navigation
4.8/5
Response Accuracy
4.5/5
Summarization Quality
4.7/5
Response Time / Speed
4.8/5
Overall User Satisfaction
4.6/5
Likelihood to Use Again90% of users

The testing phase demonstrated that the AI chatbot is a robust and effective advising tool. Students responded positively to its clarity, tone, and ease of use, confirming that the system could meaningfully reduce advisor workload and improve the registration experience. The strong testing results highlight the potential for MyAdvisor to evolve into a fully integrated advising platform for UCT.

Reflections and Learnings

Developing MyAdvisor revealed that balancing accuracy, performance, and usability is essential when deploying AI in educational contexts. The decision to separate context gathering from response generation—using sqlcoder for data extraction and vicuna for conversation—proved to be one of the most impactful design choices.

This separation improved answer reliability and reduced hallucinations, a common problem in end-to-end RAG systems. Quantization allowed larger models to run efficiently on limited hardware, showing that open-source AI can be both powerful and cost-effective when engineered carefully.

The project demonstrated that even without fine-tuning on institutional data, well-designed pipelines can achieve strong real-world performance. However, it also highlighted that data coverage, link embedding, and contextual continuity remain important frontiers for improvement in future iterations.

Credits & Acknowledgements

Project Team

  • Ethan Allies - Frontend Development (React.js, Next.js, Tailwind CSS, TypeScript)
  • Dylan Howard - Chatbot Development (NLP, Hugging Face Transformers)
  • Mitchell Flanegan - Database Development (Django REST Framework, PostgreSQL)

Supervision

Aslam Safla, Department of Computer Science, University of Cape Town

Special Thanks

A heartfelt thank you to the 10 UCT students from various faculties who participated in user testing and provided detailed feedback on system performance, usability, and accuracy. Your input was vital in shaping the chatbot’s conversational flow and ensuring MyAdvisor met real student needs. Special appreciation also goes to the UCT Computer Science technical team, specifically to Craig Balfour and Jan Buys, for providing access to the Badkamer server for high-performance model deployment and evaluation. THe project would not have been possible without your help.