Final Reportgrp
Final Reportgrp
A PROJECT REPORT
submitted by
ABHINAND M (LKMC21CS053)
MUHAMMED AMAN TK (KMC21CS031)
NEERAJ CK (LKMC21CS056)
SUFAIL SALIM (KMC21CS049)
to
Of
Bachelor of Technology
In
Computer Science and Engineering
Place: Kallanthode
Date: 25-03-25
ABHINAND M
MUHAMMED AMAN TK
NEERAJ CK
SUFAIL SALIM
I
DEPARTMENT OF COMPUTER SCIENCE AND
ENGINEERING KMCT COLLEGE OF ENGINEERING,
KOZHIKODE
CERTIFICATE
II
ACKNOWLEDGEMENT
Firstly, We would like to express our sincere gratitude to our principal Dr. Sabiq P V for
providing such quality facilities in our esteemed institution for our project work.
We would like to express our sincere gratitude to Mrs. Nilovena K V, Head of the
Department, Computer Science and Engineering, KMCT College of Engineering for being a
great force behind all our efforts through timely advice, guidance, and words of encouragement.
We extend our sincere gratitude to our project guide Mrs. Najiya Nasrin K, Assistant
Professor, Computer Science and Engineering, KMCT College of Engineering for all kinds
of cooperation, guidance and help rendered throughout our seminar. And We also express our
thanks to all teaching and nonteaching staff for their valuable advice and help to move forward
with the project work.
We express our heartfelt gratitude to the project coordinator, Ms.Divya RK, Assistant
Professor, Computer Science and Engineering, KMCT College of Engineering for her
valuable direction and constant motivation which helped in doing the project with utmost
dedication and presence of mind.
Above all, We thank the Almighty without whose grace our endeavors would not have been a
success.
ABHINAND M
MUHAMMED AMAN TK
NEERAJ CK
SUFAIL SALIM
III
ABSTRACT
The integration of artificial intelligence (AI) and natural language processing (NLP) in academic
environments has revolutionized how students access information. CampusGuide is an AI-powered
chatbot designed to provide students at KMCT College of Engineering with instant access to
essential academic data, such as attendance records and assignment details. By eliminating the
need for manual navigation through multiple web portals, CampusGuide enhances both user
experience and operational efficiency.
The chatbot backend is developed using Flask, a lightweight web framework, with Flask-CORS
enabling cross-origin requests. The system utilizes Google’s Gemini AI to generate responses
dynamically while leveraging a structured intent-matching approach using a JSON-based dataset.
If a query does not match predefined patterns, the chatbot intelligently escalates it to the AI model
for response generation. Additionally, unhandled queries are logged for continuous model
refinement, ensuring improved future interactions.
CampusGuide securely retrieves student attendance and assignment details through ETLAB
integration, facilitating seamless access to academic records. The chatbot requests authentication
credentials when necessary, ensuring secure transactions. To enhance reliability, the system
incorporates robust error-handling mechanisms, addressing API failures, incorrect credentials, and
data retrieval issues effectively. The chatbot is deployed as a web-based application with an
intuitive UI, providing students with easy access to their academic data on any device. Its 24/7
availability reduces administrative dependency, ensuring uninterrupted service.
Future improvements aim to expand chatbot capabilities with advanced AI models for improved
contextual understanding, enhanced student support, and integration with broader campus services
such as faculty interactions and real-time academic updates.
By bridging the gap between academic management systems and intelligent AI solutions,
CampusGuide redefines digital academic assistance, offering an efficient, scalable, and user-
friendly approach to student support services.
.
IV
CONTENTS
ACKNOWLEDGMENT iii
ABSTRACT iv
LIST OF FIGURES vii
CHAPTER 1 : INTRODUCTION
1.3 Objective 3
1.4 Scope 4
2.3 Smart Chatbot for College Information Enquiry Using Deep Neural
Network 7
V
3.3 Proposed System 17
4.1.4 Scalability 20
VI
CHAPTER 5 : SYSTEM DESIGN AND DEVELOPMENT
5.4 Flowchart 29
6.2 Code 31
6.2 Result 42
7.1 Conclusion 44
REFERENCES viii
VII
LIST OF FIGURES
VII
I
Campus Guide Project 2024-25
CHAPTER 1
INTRODUCTION
In today’s digital age, students increasingly rely on quick and easy access to academic information,
yet many university systems remain fragmented and challenging to navigate. Traditional methods
of obtaining academic data—such as scores, attendance records, and course information—often
involve navigating multiple websites, repeated logins, and long wait times, which can frustrate
students and disrupt their productivity. The CampusGuide project addresses these inefficiencies by
introducing an AI-driven chatbot designed to serve as a centralized, responsive resource for
students’ academic needs.
CampusGuide combines advanced AI and NLP technologies to provide students with immediate
access to critical information without the need to browse multiple platforms. By integrating with
campus systems and delivering 24/7 availability, CampusGuide aims to enhance user experience
and streamline academic data retrieval. This chatbot offers a single, accessible platform that caters
to a wide range of student queries, from checking attendance to viewing internal exam results,
freeing up administrative resources and allowing students to focus on their learning.
Academic information systems today primarily depend on university websites and portals,
requiring students to navigate numerous pages and log in multiple times. While these methods
allow students to view essential information, the complex navigation and lack of centralization
hinder the user experience, especially when students need quick access. Additionally, these
systems typically rely on an internet connection and web-only interfaces, limiting accessibility
for students who need mobile or offline access. For more specific or urgent queries, students
often depend on administrative support, but this assistance can be delayed due to high staff
workloads.
Another limitation is the inconsistency in user interfaces across different platforms, which can
make it difficult for students to find information efficiently, especially if the interface is outdated
or poorly organized. Furthermore, existing systems generally lack personalization, offering a
one- size-fits-all approach that forces students to sift through irrelevant information to find what
they need. While some schools have attempted to implement automated FAQ systems, these
often fall short in providing real-time, contextually relevant responses, especially during peak
periods like exams.
These challenges highlight the need for an AI-driven chatbot like CampusGuide, which provides
students with a responsive, personalized, and centralized system for accessing academic data,
improving both accessibility and user experience.
1.3 Objective
The core objective of CampusGuide is to transform access to academic information for students,
delivering a centralized, efficient solution for retrieving scores, attendance, and other essential
data. Current university websites and portals, while useful, often involve complex navigation and
fragmented information access, resulting in a time-consuming process for students. By leveraging
advanced AI technology, CampusGuide simplifies the data retrieval experience, providing instant,
accurate responses through Natural Language Processing (NLP) and real-time updates, thereby
empowering students to access academic information without hassle.
CampusGuide also aims to enhance communication within the campus by reducing the dependency on
administrative staff for routine inquiries. The chatbot offers an autonomous, user-friendly platform
that answers common questions and resolves issues, streamlining the workload for campus
administrators. This design fosters a more responsive academic environment, ensuring students
have the resources they need without delays.
A critical goal of the system is to increase accessibility by offering 24/7 availability and mobile
integration, enabling students to interact with CampusGuide anytime and from any device. This
round-the-clock access ensures that students can find the information they need, whether during
peak times like exams or when they cannot access a computer. By making academic resources
available at any hour, CampusGuide strives to support student productivity and engagement
throughout their academic journey.
1.4 Scope
A key component of CampusGuide's scope is its capacity to improve academic accessibility and
foster campus engagement. By offering a centralized platform for retrieving academic
information, CampusGuide enables students to independently access essential data, such as
scores, attendance, and announcements, without navigating multiple websites or relying heavily
on administrative staff. This streamlined access not only promotes student self-sufficiency but
also strengthens the campus community by facilitating more efficient interactions. Additionally,
by reducing the routine workload on administrative personnel, CampusGuide allows staff to focus
on complex, value- adding tasks, creating a more responsive and connected academic
environment.
From a technological perspective, CampusGuide is designed for scalability and flexibility. Built
using the Rasa framework and Python, it is compatible across mobile and desktop platforms, with
the ability to incorporate future AI advancements, such as voice recognition and multilingual
support, broadening its accessibility to a diverse student base. Its cloud-based architecture also
enables it to handle growing data and user demands, ensuring that CampusGuide can adapt to the
evolving needs of the university.
CHAPTER 2
LITERATURE SURVEY
This research focuses on a web-based chatbot designed to assist students with inquiries related to
college information. The chatbot uses Natural Language Processing (NLP) and AI to
communicate with users and provide relevant responses. The study highlights how chatbots can
enhance user interaction by supplying course details, academic calendar links, and frequently
asked questions. Traditional inquiry systems require human intervention, but this chatbot operates
autonomously and is available 24x7, allowing multiple users to interact with it simultaneously.
The research references earlier chatbot models such as "Eliza" and "Cleverbot" while
demonstrating improvements in handling student-specific queries.
A key advantage of this chatbot is its accessibility, as it allows students to obtain information
directly from the college website without waiting in long queues or browsing multiple pages.
Additionally, the chatbot ensures polite and structured interactions, eliminating the emotional
variations that come with human communication. However, the chatbot lacks real-time database
connectivity, limiting its ability to fetch dynamic academic data such as attendance records and
exam scores. It primarily focuses on predefined queries and does not incorporate deep learning
techniques for adaptive responses.
This paper supports our project by demonstrating the necessity of chatbot integration in academic
institutions. Our chatbot extends its capabilities by incorporating real-time student data retrieval,
ensuring that users can access personalized academic details. Furthermore, it leverages more
advanced NLP models to handle complex queries efficiently. This research provides a foundation
for chatbot implementation, and our project enhances its capabilities by improving accuracy,
incorporating humor for engagement, and ensuring seamless API integration with institutional
databases.
This research discusses the role of AI-powered chatbots in reducing administrative workload and
improving student interaction in the education sector. The study highlights how chatbots provide
instant query resolution, particularly during peak admission periods when college reception areas
are crowded. Traditional college websites often fail to provide direct answers to specific student
inquiries, leading to confusion. The chatbot proposed in this paper aims to create an interactive
platform where students can receive responses in real time without human intervention.
One of the key advantages of this chatbot is its ability to automate routine queries, reducing the
dependency on administrative staff. Additionally, it enhances user experience by providing
structured responses that eliminate ambiguity. However, the study lacks a detailed technical
implementation of the chatbot, making it more of a conceptual discussion rather than a full-
fledged technical solution. It does not provide insights into how the chatbot connects with student
databases or dynamically retrieves academic records. Furthermore, it does not specify whether the
chatbot utilizes advanced NLP techniques for handling complex queries.
Our project builds upon this research by offering a chatbot that not only responds to general
queries but also retrieves personalized academic data, such as attendance and exam scores. Our
chatbot integrates structured databases, ensuring that student-specific inquiries are handled
accurately.
2.3 Smart Chatbot for College Information Enquiry Using Deep Neural
Network
Channabasamma, Lakshmi Soumya P, Nooka Swetha, Mukkari Indu, 2023
This paper presents a chatbot designed to assist students and parents in retrieving college-related
information through an AI-driven web application. Unlike previous chatbot models that relied on
simple rule-based or traditional NLP approaches, this study integrates deep learning using a deep
neural network (DNN) trained with PyTorch. The chatbot is implemented using the Flask
framework, and its front-end is designed using HTML and CSS. The study emphasizes the
importance of an interactive and intelligent chatbot capable of understanding natural language
queries more effectively than conventional approaches.
One of the key features introduced in this research is the chatbot’s ability to assist users with
institutional information, including details about administration, departments, and events. The use
of deep learning enables the chatbot to improve its responses over time based on user interactions.
However, despite these advancements, the study does not mention real-time database integration
for fetching academic records such as attendance and exam scores. Moreover, while the chatbot
utilizes deep neural networks, there is no mention of reinforcement learning techniques that could
further enhance its adaptability.
Our project extends this research by integrating real-time student database access, ensuring that
users can retrieve personalized academic information. Additionally, our chatbot incorporates
advanced NLP techniques beyond deep learning, such as contextual awareness, allowing for more
natural and dynamic interactions. This study introduces deep learning for chatbot responses, and
our project refines it by focusing on academic data retrieval and improving engagement with
creative interaction elements.
This paper reviews Google Gemini as an emerging AI tool with potential applications in
education. The study highlights Gemini’s ability to process various types of data, making it a
versatile AI-driven educational assistant. It discusses the tool’s capacity to generate diverse
content and adapt to different educational needs, including personalized learning and academic
assistance. Additionally, the research explores the integration of Gemini into the educational
landscape, analyzing recent empirical studies and technological advancements.
Our project integrates Gemini AI to enhance chatbot responses, allowing for more natural and
sophisticated interactions. By leveraging Gemini’s advanced AI capabilities, our chatbot can
provide more accurate and context-aware responses, improving the overall user experience. This
integration ensures a more advanced AI-driven academic assistant capable of handling complex
queries efficiently.
This research explores the application of advanced NLP models in chatbot development,
specifically for university information retrieval. The study highlights the challenges students face
in obtaining accurate and official information from various sources, particularly during the
admission process. The research compares multiple chatbot models, including neural networks,
TF-IDF vectorization, sequential modeling, and pattern matching, to determine the most efficient
approach for handling student queries. The results indicate that sequential modeling provides the
best accuracy while preventing overfitting, making it the most reliable model for chatbot
development.
A key strength of this study is its comparative analysis of different NLP techniques, offering
valuable insights into model selection for chatbot implementations. It also emphasizes the
importance of semantic analysis and pattern matching for real-time query resolution. However,
despite its strong theoretical foundation, the research does not address chatbot deployment
challenges, such as database integration or handling ambiguous queries. Additionally, while it
establishes the superiority of sequential modeling, it does not explore real-world testing scenarios
where student queries may require dynamic adaptation.
Our project builds upon this research by implementing an NLP-driven chatbot optimized for real-
time student queries. We integrate academic databases to provide accurate information on
attendance, grades, and schedules, bridging the gap between theoretical NLP models and
practical implementation. Our chatbot applies these findings to create a fully functional
educational assistant. Furthermore, we enhance user experience by incorporating humor and
dynamic responses, making interactions more engaging while maintaining accuracy.
CHAPTER 3
The Campus Guide Chatbot is designed to assist students in accessing academic information
such as attendance, assignments, sessional exams, and module tests in a user-friendly and
efficient manner. To develop a functional and reliable system, a comprehensive requirement
study and analysis was conducted to determine the essential components for its successful
implementation. The chatbot must ensure 24/7 accessibility and provide both text and voice-
based interactions to enhance usability. Secure user authentication is necessary to protect
sensitive academic data while allowing personalized responses based on student credentials.
The system needs a web-based and mobile-compatible chat interface, allowing students to
interact with ease. It should utilize Natural Language Processing (NLP) to understand user
queries and provide relevant responses. The chatbot must integrate with the student database,
which is managed using JSON, to fetch real-time academic data, ensuring accurate and up-to-
date information. For handling general and complex queries, Gemini AI is used to generate
intelligent responses. The chatbot relies on Django for backend development, ensuring secure
data handling and API integration, while the frontend is built using HTML, CSS, and JavaScript
for an interactive experience. Secure API connections are implemented to access attendance and
academic record systems. With these components in place, the chatbot ensures seamless
automation of academic support, improving student engagement and efficiency..
A project feasibility study is a comprehensive report that examines in detail the five frames of
analysis of a given project. It also takes into consideration its four Ps, its risks and POVs, and its
constraints. The goal is to determine whether the project should go ahead, be redesigned, or else
abandoned altogether. Thus, the four feasibilities are:
● Operational feasibility.
● Technical feasibility.
● Economic feasibility.
● Behavioral feasibility.
Collaboration with Administrators: Work closely with campus administrators to ensure the
chatbot meets the diverse needs of students and integrates with existing systems.
Feedback Mechanisms: Establish channels for students and faculty to provide feedback on
the chatbot’s performance, leading to iterative improvements.
Training and Workshops: Offer training sessions for students and staff to familiarize them
with the chatbot, promoting its use and enhancing user acceptance.
➢ User Acceptance:
Intuitive Design: The chatbot's design prioritizes simplicity and accessibility, enabling users
to navigate the system easily and increasing their comfort with the technology.
Real-Time Responses: By providing immediate answers to academic queries, users will
trust the chatbot as a reliable resource for information.
Empowerment: The ability to access academic data independently boosts students' confidence
and sense of autonomy, which is crucial for enhancing their educational experience.
Security Features: Incorporating features such as data privacy and secure access will further
increase user trust and acceptance of the chatbot.
➢ Technology Stack:
● Frontend Development: The chatbot interface can be developed using HTML,
CSS, and JavaScript, ensuring a responsive design that works seamlessly across
various web browsers and devices.
● Backend Development: The system will utilize the Python programming language
with the Flask framework to manage server-side logic and database interactions
effectively.
● AI and NLP Integration: The chatbot will incorporate AI modules for natural
language processing (NLP) to understand and respond to user queries accurately.
● Libraries such as PyTorch and NLTK can be utilized for building and training the
chatbot's AI capabilities.
➢ Resource Requirements:
➢ Technical Challenges:
● Data Privacy and Security: Safeguarding user data and ensuring compliance with
data protection regulations (e.g., GDPR) will be critical and may require
additional resources for implementing security measures.
➢ Cost-Benefit Analysis:
● Includes costs for software tools, licenses, and paying developers, testers, and
designers to build the app.
● Covers ongoing expenses for hosting, updates, and support to keep the app
running smoothly.
03-2025
Project Team - Abhinand M, Muhammad Aman TK, Neeraj CK, Sufail Salim
The proposed system for "CampusGuide" is an AI-powered chatbot that assists prospective
students in obtaining real-time information about academic programs, campus facilities, and
administrative processes. Utilizing natural language processing and machine learning, the
chatbot provides accurate responses to student inquiries, streamlining communication and
enhancing the overall user experience.
The chatbot operates 24/7, ensuring students can retrieve essential academic data such as scores
and attendance at any time, thus reducing the need for manual searches across multiple
platforms. It integrates seamlessly with existing campus systems, making it a valuable tool for
both students and administrators.
To enhance usability, the system includes a user-friendly interface and personalized assistance
features, allowing students to interact with the chatbot easily. Additionally, the system is
structured into three main modules: Admin, User, and Support, which facilitate efficient
management and quick responses to student queries. Prioritizing accessibility and user
experience, CampusGuide aims to empower students by providing them with the information
they need to navigate their academic journey confidently.
● The application should be easy for users to navigate, ensuring a positive user experience.
● It should provide instant responses to user queries, minimizing any delays in information
retrieval.
● The system should be reliable and maintain consistent performance, especially during peak
usage times.
● User data must be securely stored and protected to maintain privacy and comply with data
protection regulations.
● Needs Intel i5, 8GB RAM, 500GB storage; runs on Windows 8+.
● Needs Android 8+ with 4GB RAM; built with Dart and Flutter.
● Compatible with Windows and Android devices.
● Requires Intel i5 or equivalent processor, 8GB RAM, and 500GB storage; compatible with
Windows 10 or higher.
● Compatible with both Windows and Android devices to ensure accessibility for all users.
● Provides clear and concise audio directions for users to facilitate easy navigation through the app.
● Accurately detects and identifies academic-related inquiries and provides relevant information.
● Offers fast access to support through video calls and real-time location tracking features for
urgent inquiries.
Flask:
For the backend framework of CampusGuide, Flask is chosen to support the web component,
providing a versatile yet lightweight foundation. Flask, a micro-framework in Python, is well-
suited for CampusGuide’s architecture as it facilitates fast, flexible development, allowing
developers to tailor components to the project’s specific needs without imposing rigid structure.
Flask’s modular nature is especially advantageous in projects like CampusGuide, where dynamic
responses and ease of scaling are essential.Flask’s simplicity and ease of integration make it
highly effective for CampusGuide’s requirement to communicate with MySQL, allowing smooth
data retrieval and efficient storage of user information, such as student attendance and scores. This
compatibility ensures that CampusGuide can handle queries and data operations swiftly, making
student interactions seamless and immediate.
Additionally, Flask provides flexibility in integrating with various frontend technologies like HTML,
CSS, and JavaScript. This enables CampusGuide to deliver a responsive, interactive user
experience where backend processes, such as database access and NLP functions, work
harmoniously with a smooth, visually engaging interface. By using Flask’s robust routing
capabilities, CampusGuide ensures that user queries are quickly directed to the relevant response
functions, maintaining responsiveness in user interactions.Moreover, Flask’s ecosystem includes
support for several extensions and libraries, such as Flask-RESTful for building REST APIs.
These APIs enable CampusGuide to communicate between backend and frontend components
securely, manage data, and support the chatbot’s real-time response capabilities. Flask’s flexibility
with add- ons for security features like authentication and authorization further strengthens
CampusGuide’s ability to safeguard user data, which is crucial in a student-focused application.
Overall, Flask’s lightweight framework empowers CampusGuide with a foundation that is both
scalable and adaptable, ensuring smooth functionality for users while supporting CampusGuide’s
ability to grow and enhance its feature set as requirements evolve.
CHAPTER 5
For The constraints which were concider while designing the projects are follows.
CHAPTER 5
● User provides input through text or voice to the chat application interface.
● Application receives the user input, converting voice to text using a speech recognition
module if necessary.
● The raw input data is captured and prepared for initial processing by the system.
● Preprocessing of the input starts, involving steps like tokenization and normalization to
make the text suitable for analysis.
● Tokenization splits the input into individual words or subwords, breaking down sentences
for easier analysis.
● Each token is tagged with its Part-of-Speech (POS), identifying nouns, verbs, adjectives,
etc., to help the model understand the sentence structure.
● Named Entity Recognition (NER) identifies key entities, such as names, dates, or
locations, within the input for more accurate context.
● Sentiment analysis may be applied to assess the user’s mood or attitude, aiding in
generating a more suitable response.
● The processed input is fed into the NLP model, which interprets the meaning and intent
behind the user's message.
● A trained machine learning model, often a neural network, predicts the most appropriate
response based on learned conversation patterns.
● The final response is validated, then displayed as text or converted to audio for playback,
completing the user interaction.
● The conversation begins when the user initiates a chat session, either by text or voice input.
● The chatbot greets the user with a welcoming message, setting a friendly and
approachable tone.
● The chatbot prompts the user to choose from a list of topics to guide the conversation
effectively.
● The user is presented with several predefined options to select, based on their interests or
needs.
● “Information about the admission process” is an option that includes inquiries about
application deadlines, requirements, and eligibility.
● Another option, “Information regarding fees and payment,” allows the user to inquire
about tuition costs, payment plans, and deadlines.
● The “Information about attendance records or policies” option allows students to check
their attendance records or understand the attendance policies.
● After the user selects a topic, the chatbot invites them to ask specific questions within the
chosen topic.
● The user enters their specific question, and the chatbot analyzes keywords and context to
prepare a targeted response.
● The chatbot retrieves relevant information from its knowledge base or database, quickly
processing the user’s question.
● Based on the topic and the specific query, the chatbot provides a clear and relevant
response, aiming to answer accurately.
● After answering, the chatbot checks if the user has additional questions or needs further
assistance, displaying a proactive approach.
Dept Of CSE 26 KMCTCE
Campus Guide Project 2024-25
● If the user has more questions on the same topic, the chatbot allows them to ask additional
questions to deepen the conversation.
● For users seeking different information, the chatbot can guide them back to the main
menu to select another topic.
● In situations where the user has complex or unique needs beyond the chatbot's scope, it
suggests connecting them to a human agent.
● If the user agrees to the transfer, the chatbot initiates a seamless handover to a human
representative for personalized assistance.
● If the user indicates that their questions are fully addressed, the chatbot acknowledges this
and ends the conversation politely.
● The chatbot closes the session with a thank-you message, inviting the user to return with
future questions and logging the interaction for learning purposes.
LEVEL 0
LEVEL 1.2
CHAPTER 6
SYSTEM IMPLEMENTAION
Language : Python
6.2 CODE
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>KMCT College of Engineering, Kozhikode</title>
<script src="{{ url_for('static', filename='app.js') }}" defer></script>
</head>
<body style="margin: 0; font-family: Arial, sans-serif;">
</main>
function createClickableLink(message) {
return message.replace(
/(https?:\/\/[^\s]+)/g,
'<a href="$1" target="_blank" style="color: blue; text-decoration: underline;">$1</a>'
);
}
function startSpeechToText() {
if (!('webkitSpeechRecognition' in window) && !('SpeechRecognition' in window)) {
console.log("Speech recognition is not supported in this browser.");
return;
}
recognition.start();
}
function sendMessage(message) {
let requestBody = { message: message };
requestBody.username = credentials[0];
requestBody.password = credentials[1];
requestBody.message = storedMessage;
waitingForCredentials = false;
}
fetch('/predict', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(requestBody)
})
.then(response => response.json())
.then(data => {
appendUserMessage(message);
if (data.ask_credentials) {
waitingForCredentials = true;
storedMessage = message;
appendBotMessage(data.answer);
return;
}
if (data.student_info) {
const info = data.student_info;
formattedText += `
<strong>👤 Student Details:</strong><br>
Name: ${info.Name}<br>
Roll No: ${info["Roll No"]}<br>
Reg No: ${info["UNi Reg No"]}<br>
Total Attendance: ${info.Total}<br>
Overall Percentage: ${info.Percentage}<br><br>
`;
}
if (data.subjects) {
formattedText += "<strong>📊 Subject-wise Attendance:</strong><br>";
Dept Of CSE 34 KMCTCE
Campus Guide Project 2024-25
data.subjects.forEach(subj => {
formattedText += ${subj.Subject}: ${subj.Attendance}<br>;
});
}
if (data.assignments) {
formattedText += "<strong>📌 Assignments:</strong><br>";
data.assignments.forEach(assign => {
formattedText += `
Subject: ${assign.Subject}<br>
Semester: ${assign.Semester}<br>
Title: ${assign.Title}<br>
Issued On: ${assign["Issued On"]}<br>
Last Date: ${assign["Last Date"]}<br>
Status: ${assign.Status}<br><br>
`;
});
}
if (data.sessional_exams) {
formattedText += "<strong>📝 Session Exam Details:</strong><br>";
data.sessional_exams.forEach(session => {
formattedText += `
Subject: ${session.Subject}<br>
Exam: ${session.Exam}<br>
Maximum Marks: ${session["Maximum Marks"]}<br>
Marks Obtained: ${session["Marks Obtained"]}<br><br>
`;
});
}
if (data.module_tests) {
formattedText += "<strong>📖 Module Test Details:</strong><br>";
data.module_tests.forEach(test => {
formattedText += `
Subject: ${test.Subject}<br>
Exam: ${test.Exam}<br>
Max Marks: ${test["Maximum Marks"]}<br>
Obtained: ${test["Marks Obtained"]}<br><br>
`;
});
}
if (data.internal_marks) {
formattedText += "<strong>📊 Internal Marks:</strong><br>";
data.internal_marks.forEach(mark => {
Dept Of CSE 35 KMCTCE
Campus Guide Project 2024-25
formattedText += `
Subject: ${mark.Subject}<br>
Maximum Marks: ${mark["Maximum Marks"]}<br>
Marks Obtained: ${mark["Marks Obtained"]}<br><br>
`;
});
}
if (!data.answer) {
formattedText = "I'm sorry, I couldn't generate a response.";
}
appendBotMessage(formattedText);
})
.catch(error => console.error('Error:', error));
}
function appendUserMessage(message) {
let chatMessages = document.getElementById('chatbox-messages');
let userMessage = document.createElement('div');
userMessage.className = 'message user-message';
userMessage.innerHTML = 'You: ' + message;
chatMessages.appendChild(userMessage);
chatMessages.scrollTop = chatMessages.scrollHeight;
}
function appendBotMessage(message) {
let chatMessages = document.getElementById('chatbox-messages');
let botMessage = document.createElement('div');
botMessage.className = 'message bot-message';
botMessage.innerHTML = createClickableLink(message);
chatMessages.appendChild(botMessage);
chatMessages.scrollTop = chatMessages.scrollHeight;
}
document.getElementById('send-button').addEventListener('click', function () {
let message = document.getElementById('chat-input').value.trim();
if (message !== '') {
sendMessage(message);
document.getElementById('chat-input').value = '';
}
});
document.getElementById('speech-button').addEventListener('click', startSpeechToText);
document.addEventListener("DOMContentLoaded", function () {
Dept Of CSE 36 KMCTCE
Campus Guide Project 2024-25
const chatbox = document.getElementById("chatbox");
const chatboxToggle = document.getElementById("chatbox-toggle");
const minimizeButton = document.getElementById("minimize-button");
const maximizeButton = document.getElementById("maximize-button");
const closeButton = document.getElementById("close-button");
minimizeButton.addEventListener("click", () => {
chatbox.classList.remove("fullscreen");
chatbox.classList.toggle("minimized");
});
maximizeButton.addEventListener("click", () => {
chatbox.classList.add("fullscreen");
chatbox.classList.remove("minimized");
});
closeButton.addEventListener("click", () => {
chatbox.classList.remove("show", "fullscreen", "minimized");
chatboxToggle.style.display = "block";
});
chatboxToggle.addEventListener("click", () => {
chatbox.classList.add("show");
chatboxToggle.style.display = "none";
});
});
app = Flask(_name_)
CORS(app)
# Gemini fallback
def get_gemini_response(message):
response = model.generate_content(message)
return response.text
@app.route("/")
def index():
return render_template("website.html")
@app.route("/predict", methods=["POST"])
def predict():
data = request.get_json()
message = data.get("message")
username = data.get("username")
password = data.get("password")
if not message:
return jsonify({"error": "Missing 'message'"}), 400
if "attendance" in message.lower():
if not username or not password:
return jsonify({"answer": "Please provide your credentials.", "ask_credentials": True})
etlab_data = fetch_etlab_data(username, password)
if "error" in etlab_data:
return jsonify({"answer": etlab_data["error"]})
attendance_data = etlab_data["attendance"][0]
student_info = {
"UNi Reg No": attendance_data.get("UNi Reg No", "N/A"),
"Roll No": attendance_data.get("Roll No", "N/A"),
"Name": attendance_data.get("Name", "N/A"),
"Total": attendance_data.get("Total", "N/A"),
"Percentage": attendance_data.get("Percentage", "N/A"),
}
subjects = [
{"Subject": key, "Attendance": value}
for key, value in attendance_data.items()
Dept Of CSE 38 KMCTCE
Campus Guide Project 2024-25
if key not in student_info
]
return jsonify({"answer": "Here is your attendance:", "student_info": student_info,
"subjects": subjects})
if "assignment" in message.lower():
if not username or not password:
return jsonify({"answer": "Please provide your credentials.", "ask_credentials": True})
etlab_data = fetch_etlab_data(username, password)
if "error" in etlab_data:
return jsonify({"answer": etlab_data["error"]})
return jsonify({"answer": "Here are your assignments:", "assignments":
etlab_data["assignments"]})
response = find_intent(message)
if response:
return jsonify({"answer": random.choice(response)})
gemini_reply = get_gemini_response(message)
return jsonify({"answer": gemini_reply or "I'm sorry, I couldn't understand your query."})
fetch_etlab_data()
def fetch_etlab_data(username, password):
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()),
options=options)
data = {"attendance": [], "assignments": [], "sessional_exams": [], "module_tests": [],
"internal_marks": []}
try:
driver.get("https://kmctce.etlab.app/user/login")
time.sleep(2)
driver.find_element(By.ID, "LoginForm_username").send_keys(username)
driver.find_element(By.ID, "LoginForm_password").send_keys(password)
driver.find_element(By.XPATH, "//button[@type='submit']").click()
time.sleep(5)
if "login" in driver.current_url:
Dept Of CSE 40 KMCTCE
Campus Guide Project 2024-25
return {"error": "Invalid username or password"}
# Attendance
driver.get("https://kmctce.etlab.app/ktuacademics/student/viewattendancesubject/37")
time.sleep(3)
table = driver.find_element(By.CLASS_NAME, "items")
data["attendance"] = pd.DataFrame([
[td.text for td in tr.find_elements(By.TAG_NAME, "td")]
for tr in table.find_elements(By.TAG_NAME, "tr")[1:]
], columns=[th.text for th in table.find_elements(By.TAG_NAME,
"th")]).to_dict(orient="records")
# Assignments
driver.get("https://kmctce.etlab.app/student/assignments")
time.sleep(3)
table = driver.find_element(By.CLASS_NAME, "items")
data["assignments"] = pd.DataFrame([
[td.text for td in tr.find_elements(By.TAG_NAME, "td")]
for tr in table.find_elements(By.TAG_NAME, "tr")[1:]
], columns=[th.text for th in table.find_elements(By.TAG_NAME,
"th")]).to_dict(orient="records")
# Sessional Exams
driver.get("https://kmctce.etlab.app/ktuacademics/student/results")
time.sleep(5)
table = driver.find_element(By.ID, "yw0")
data["sessional_exams"] = pd.DataFrame([
[td.text for td in tr.find_elements(By.TAG_NAME, "td")]
for tr in table.find_elements(By.TAG_NAME, "tr")[1:]
], columns=[th.text for th in table.find_elements(By.TAG_NAME,
"th")]).to_dict(orient="records")
# Module Tests
table = driver.find_element(By.ID, "yw1")
data["module_tests"] = pd.DataFrame([
[td.text for td in tr.find_elements(By.TAG_NAME, "td")]
for tr in table.find_elements(By.TAG_NAME, "tr")[1:]
], columns=[th.text for th in table.find_elements(By.TAG_NAME,
"th")]).to_dict(orient="records")
# Internal Marks
table = driver.find_element(By.ID, "yw5")
data["internal_marks"] = pd.DataFrame([
[td.text for td in tr.find_elements(By.TAG_NAME, "td")]
for tr in table.find_elements(By.TAG_NAME, "tr")[1:]
], columns=[th.text for th in table.find_elements(By.TAG_NAME,
Dept Of CSE 41 KMCTCE
Campus Guide Project 2024-25
"th")]).to_dict(orient="records")
except:
return {"error": "Unable to fetch data"}
finally:
driver.quit()
return data
6.3 Result
CHAPTER 7
7.1 Conclusion
A key strength of this chatbot lies in its hybrid response mechanism. It combines a predefined
intent-based approach for common queries with Google Gemini AI to handle dynamic or complex
user inputs. This ensures that students receive accurate and context-aware responses, even when
their queries do not directly match predefined patterns. Additionally, the chatbot employs a secure
authentication mechanism, requesting credentials only when necessary to maintain data privacy and
security.
In conclusion, the Campus Guide Chatbot serves as a reliable, efficient, and intelligent academic
assistant for students. Its implementation marks a significant step towards AI-powered education
support systems, offering a scalable foundation for future advancements in academic chatbots.
Dept Of CSE 44 KMCTCE
Campus Guide Project 2024-25
The Campus Guide Chatbot has immense potential for further development, making it an even
more powerful academic tool. One key enhancement is multilingual support, which would allow
students to interact in their preferred language, improving accessibility. Additionally, the chatbot’s
natural language processing (NLP) capabilities can be expanded to better understand complex
queries, making conversations more context-aware and personalized.
Another significant upgrade would be learning management system (LMS) integration, enabling
seamless access to course materials, assignment deadlines, and exam schedules from platforms like
Moodle, Google Classroom, or Blackboard. The chatbot can also provide real-time performance
analytics, allowing students to track their attendance, grades, and academic progress through a
personalized dashboard.
To enhance security and reliability, blockchain technology can be implemented to protect academic
records from tampering. A mobile application would further improve accessibility, offering a
dedicated and interactive interface for students. Additionally, AI-driven career counseling could be
introduced, helping students choose courses, internships, and career paths based on their interests
and academic performance.
Future versions could also incorporate emotional intelligence, allowing the chatbot to detect student
stress levels and provide motivational responses or study tips. Lastly, integrating cloud-based
deployment would enhance scalability, enabling multiple institutions to adopt and customize the
chatbot to fit their requirements.
With these advancements, the Campus Guide Chatbot will evolve into an indispensable AI-powered
academic assistant, ensuring students receive real-time, intelligent, and personalized academic
support at all times.
[1] M R. Parkar, Y. Payare, K. Mithari, J. Nambiar and J. Gupta, ”AI And Web-Based Interactive
College Enquiry Chatbot,” 2021 13th International Conference on Electronics, Computers and
Ar- tificial Intelligence (ECAI), Pitesti, Romania, 2021, pp. 1-5,
doi:10.1109/ECAI52376.2021.9515065.
[2] Chiara Valentina Misischia, Flora Poecze, Christine Strauss, Chatbots in customer service: Their
relevance and impact on service quality, Procedia Computer Science, Volume 201, 2022, Pages
421-428, ISSN1877 0509
[3] B. R. Ranoliya, N. Raghuwanshi and S. Singh, ”Chatbot for university related FAQs,”
International Conference on Advances in Computing, Communications and Informatics
(ICACCI), Udupi, 2017, pp.1525 1530.
[4] N. P. Patel, D. R. Parikh, D. A. Patel and R. R. Patel, ”AI and Web-Based Human-Like
Interactive University Chatbot (UNIBOT),”2019 3rd International conference on Electronics,
Communication and Aerospace Technology (ICECA), Coimbatore, India, 2019, pp. 148-150,
doi: 10.1109/ICECA.2019.8822176.
[5] Manoj Joshi , Rakesh Kumar Sharma, 2020, An Analytical Study and Review of open Source
Chatbot framework, RASA, INTERNATIONAL JOURNAL OF ENGINEERING RESEARCH
AND TECHNOLOGY (IJERT) Volume 09, Issue 06 ,June 2020.
[6] Delphin Lydia,J Sangeetha Priya, Dhivya Jai Sree G,Vidhya, Vi-jayameena S, Chatbot for
College Management System, International Journal for Research in Applied Science and
Engineering Technology (IJRA), Volume 9, Issue 7, July 2021.
[7] Attigeri, G., Agrawal, A. and Kolekar, S., 2024. Advanced NLP Models for Technical University
Information Chatbots: Development and Comparative Analysis. IEEE Access.
[8] Patel, D., Shetty, N., Kapasi, P. and Kangriwala, I., 2023. College enquiry chatbot using
conversational AI. International Journal for Research in Applied Science & Engineering
Technology (IJRASET), 11(5).
VIII
[9] Bieletzke, S., 2023. Ai-chatbot-integration in campus-management-systems. In EDULEARN23
[10] Assayed, S.K., Alkhatib, M. and Shaalan, K., 2023, May. Artificial intelligence based chatbot for
promoting equality in high school advising. In 2023 4th International Conference on Intelligent
Engineering and Management (ICIEM) (pp. 1-4). IEEE.
IX
X