Skip to content

Mateeb-Haider/AI-ChatBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

University of South Asia AI Chatbot

Version React Vite

Overview

The University of South Asia AI Chatbot is an intelligent, interactive conversational assistant designed specifically for the University of South Asia (USA), Cantt Campus. This AI-powered solution provides instant, accurate information about the university's programs, faculty members, campus facilities, and student initiatives—enabling students, faculty members, and visitors to engage seamlessly with the institution.

The chatbot addresses the common challenge of information accessibility in educational institutions, where students and visitors often struggle to find quick answers to their queries about programs, faculty, campus facilities, and administrative details. By providing 24/7 automated assistance, the solution reduces the administrative burden on staff while improving the user experience for all stakeholders.

Project Goals

  • Deliver accurate, university-specific information to students, faculty, and visitors through an intuitive conversational interface
  • Reduce response time for common administrative queries from hours/days to instantaneous
  • Demonstrate practical AI implementation within an academic setting, showcasing student innovation
  • Provide 24/7 accessibility to university information without requiring human intervention
  • Serve as a educational exemplar for AI students at the university
  • Achieve high user satisfaction rates through natural, context-aware conversations

System Architecture Diagram

image

Key Features

Feature Description
University-Specific Information Provides accurate details about programs, faculty members, campus location, and operating hours from a curated database
Intelligent Conversation Routing Automatically determines whether to use custom responses or LLM API based on query type
Program Details Comprehensive information about undergraduate and postgraduate programs including BSCS, BSSE, BSAI, BSDS, BBA, and MBA
Faculty Directory Details about department heads and key faculty members including Miss Zoba Zafar (CS HOD), Miss Sehrish Aqeel (SE HOD), and Sir Masroor Hussain (FYP Supervisor)
Campus Information Location details, opening hours, and contact information for the Cantt Campus
Student Project Showcase Information about innovative student initiatives and final year projects
Real-Time Interaction Instant responses to user queries without noticeable delay
Responsive Design Optimized interface that adapts seamlessly to mobile, tablet, and desktop devices
24/7 Availability Round-the-clock accessibility for students, faculty, and visitors
Natural Conversation Human-like interactions powered by state-of-the-art language models

API Architecture

The chatbot integrates with an external Language Learning Model (LLM) API while maintaining a local database of custom responses for university-specific queries.

Request/Response Flow

Component Description
Endpoint /api/chat
Method POST
Authentication API key header: X-API-Key: [your-api-key]
Content-Type application/json

Request Format

{
  "query": "Who is the head of Computer Science department?",
  "userId": "optional-user-identifier",
  "sessionId": "optional-session-identifier",
  "timestamp": "2024-01-15T10:30:00Z"
}

Response Format

{
  "response": "The Head of the Computer Science Department is Miss Zoba Zafar.",
  "responseType": "custom", // or "llm" for general queries
  "confidence": 0.98,
  "timestamp": "2024-01-15T10:30:01Z",
  "sessionId": "session-identifier"
}

Query Routing Logic

Query Type Handler Example
Program Information Custom Response Database "What programs does USA offer?"
Faculty Details Custom Response Database "Tell me about Sir Masroor Hussain"
Campus Information Custom Response Database "Where is the Cantt Campus located?"
Student Projects Custom Response Database "What are some student projects?"
General Conversation LLM API "What is artificial intelligence?"
Greetings Mixed "Hello" (can be handled by either)

Brand Value Propositions

  • Educational Innovation: Demonstrates the University of South Asia's commitment to practical AI implementation and technological advancement
  • Student-Centered Development: Showcases student-driven innovation with faculty mentorship, reinforcing the university's educational excellence
  • Operational Efficiency: Reduces administrative burden by automating responses to frequently asked questions
  • Enhanced Accessibility: Provides 24/7 access to university information for prospective students, current students, and visitors
  • Competitive Differentiation: Positions USA as a forward-thinking institution embracing AI technologies in education
  • Scalable Knowledge Base: Easily expandable to include additional programs, faculty, and student achievements over time
  • Practical Learning Tool: Serves as a real-world example for AI and cybersecurity students to study and learn from

Tech Stack

Category Technology Version Purpose
Frontend Framework React 18.3.1 User interface development
Build Tool Vite 5.4.10 Fast development and building
Styling CSS3 - Responsive design implementation
Programming Language JavaScript (ES6+) - Core application logic
API Integration REST API - Communication with LLM service
Version Control Git - Source code management
Linting ESLint 9.13.0 Code quality enforcement

Folder Structure

Challenges and Solutions

Challenge Solution
Distinguishing between university-specific and general queries Implemented a query classification system that analyzes keywords and patterns to route requests to either the custom database or LLM API
Ensuring accuracy of university information Created a curated database of verified responses for all university-related topics, manually reviewed by faculty members
Maintaining natural conversation flow Used context preservation techniques to maintain conversation history and provide coherent multi-turn interactions
Handling ambiguous queries Implemented a clarification system that asks follow-up questions when the intent is unclear
Mobile responsiveness Designed a flexible UI with CSS Grid and Flexbox that adapts to all screen sizes without losing functionality

Application Flow

  1. User Access: User opens the chatbot interface on their preferred device (mobile, tablet, or desktop)
  2. Initialization: The React application loads in the browser, establishing connection with backend services
  3. Query Input: User types a question or message into the input field and submits
  4. Query Processing: The system analyzes the query to determine intent and appropriate response source
  5. Routing Decision:
    • If query relates to university-specific information (programs, faculty, campus, projects), the system retrieves the response from the custom database
    • If query is general conversation or outside university scope, the system forwards to the LLM API
  6. Response Generation: Appropriate response is generated from either source
  7. Response Delivery: Formatted response is returned to the frontend and displayed to the user
  8. Context Update: Conversation context is updated to maintain coherence in subsequent interactions
  9. Session Continuation: User can continue the conversation with full context maintained

Conclusion

The University of South Asia AI Chatbot represents a significant step forward in leveraging artificial intelligence to enhance communication and accessibility within educational institutions. By combining a curated knowledge base of university-specific information with the conversational capabilities of modern language models, the system provides an intuitive, efficient interface for students, faculty, and visitors to access accurate information about the university.

Future enhancements may include integration with university administrative systems for real-time updates, expanded knowledge base coverage of additional departments and programs, multilingual support for international students, and analytics dashboards for university administrators to understand common queries and information needs.

This project embodies the University of South Asia's dedication to educational excellence, practical learning, and the advancement of AI-driven solutions in higher education.


Acknowledgments

Special thanks to:

  • Dr. Umer Javed for project supervision and guidance
  • University of South Asia for supporting innovation and research
  • Computer Science Department for providing resources and mentorship

About

An AI chatbot for the University of South Asia, built with React, that stores custom responses and generates dynamic replies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors