0% found this document useful (0 votes)
44 views72 pages

Mini Project Report b16

Uploaded by

Kavya Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views72 pages

Mini Project Report b16

Uploaded by

Kavya Reddy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 72

A Mini Project report on

CHATBOT FOR COLLEGE WEBSITE

Submitted in partial fulfillment of the requirement for the award of the degree of

Bachelor of Technology in Information Technology

By:

Sravani Angirekula (20251A1293)

Rishitha Bandi (20251A1294)

Varshini Gande (20251A1299)

20B16

G. Narayanamma Institute of Technology and Science

(for Women)

Approved by AICTE, New Delhi & Affiliated to JNTUH, Hyderabad

Accredited by NBA, An ISO 9001:2015 Certified Institution

Shaikpet, Hyderabad – 500104, TS.

July 2023

i
ACKNOWLEDGEMENT
We would like to express our sincere thanks to Dr K. Ramesh Reddy, Principal, G. Narayanamma
Institute of Technology and Science for providing the working facilities in the college. Our sincere
thanks and gratitude to Dr I. Ravi Prakash Reddy, Professor and HOD, Dept. of IT, GNITS for all the
timely support and valuable suggestions during the period of our Project.

We are extremely thankful and indebted to our Internal guide, Mrs. P.N Ramya, Assistant Professor,
Dept. of Information Technology, GNITS and project coordinators, Sesha Bhargavi, Jyothi, Assistant
Professors, Dept. of Information Technology, GNITS for their constant guidance, continuous advice,
encouragement and moral support throughout the project.

Finally, we would also like to thank all the faculty and staff of IT Department who have helped us
directly or indirectly, parents and friends for their cooperation in completing the project report work.

ii
ABSTRACT

The main goal of this project is to implement a web-based campus application for further
development of educational institutions by building a chatbot. In an institution,
information is distributed to students in the form of notifications, handwritten manuals.
The college website has been developed to overcome problems with the existing manual
system. The proposed system is specialized in creating a chatbot to be employed by
students to urge their queries responded easily from the college website. Many students
use live chat service because it is easy, fast and comfortable. A chatbot may be a program
that may do real conversations with textual method, built using NLP and python. The
Chatbot will engage in friendly conversations, respond to the course and college
information and answer frequently asked questions, among other things. It also responds
to queries related to placements preparation for specific companies. Students can ask
questions to the chatbot at any time of the day and get a reply very quickly. The chatbot
is able to handle a large number of concurrent users without any degradation in
performance or response time. It works towards making it easier for students to learn and
reach out to all the activities that they can do during their course of study.

Signature of the Internal guide Signature of HOD


(Dr. I Ravi Prakash Reddy)

iii
CONTENTS

1. INTRODUCTION
1.1 General / Domain Description…………………………………………… 1-2
1.2 Objective & Scope of the Project………………………………………… 3-4
1.3 Project Definition………………………………………………………… 5
1.4 Organization of Project Report…………………………………………… 6
2. LITERATURE SURVEY
2.1 Existing Approaches / System…………………………………………… 7-16
2.2 Drawbacks in Existing System…………………………………………… 17
2.3 Motivation for Proposed System………………………………………… 18
3. REQUIREMENT SPECIFICATION
3.1 Overall Description of the Project (Use Case Diagrams)……………… 19-23
3.2 Functional & Non-functional Requirements Specification………………24-25
3.3 Design Specification (UML Diagrams / DFD / E-R Diagrams) with
Normalized Database…………………………………………………… 26-35
3.4 Software and Hardware Requirements……………………………………. 36
4. IMPLEMENTATION
4.1 Methodology (with Flowchart)………………………………………… 37-38
4.2 System Architecture…………………………………………………..… 39-40
4.3 Modules Description with Algorithms / Pseudo-code…………………… 41
5. TESTING
5.1 Test Cases (Minimum of 5 to be included)………………………………42-44

6. RESULTS AND CONCLUSION


6.1 Result Analysis / Performance Analysis…………………………………45-50
(Screenshots / Graphs of results) (Scope and Objectives)
6.2 Conclusion & Future Scope……………………………………………… 51

iv
Appendix
I. Code………………………………………………………………………… 52-66
II. Bibliography / References…………………………………………………… 67

LIST OF FIGURES
1. Use Case diagram Figure-1
2. E-R diagram Figure-2
3. Class diagram Figure-3
4. Activity diagram Figure-4
5.Collaboration Figure-5
6. Object Figure-6
7. Sequence diagram Figure-7
8. Flow chart Figure-8
9. System Architecture Figure-9

v
1. INTRODUCTION

1.1 General / Domain Description

The emergence of the College Website Chatbot marks a significant leap forward in
reshaping the way users interact with educational institutions' digital platforms. Tailored
to cater specifically to the needs of students, parents, and visitors accessing the college's
website, this intelligent virtual assistant employs the cutting-edge technology of natural
language processing (NLP) to forge a new era of seamless communication and immediate
access to a wealth of comprehensive information.

For prospective students embarking on the journey of selecting the right college and
program, the chatbot serves as a beacon of convenience. Its prowess in responding to
queries about courses, admissions, and various departments ensures that users receive
detailed and timely information. This transforms what was once a potentially convoluted
process into an effortless and streamlined experience, allowing students to make well-
informed decisions about their educational path.

Beyond the academic realm, the chatbot extends its reach to foster a vibrant campus
community. It becomes a gateway to the world of extracurricular activities and events by
providing insights into different clubs and their upcoming gatherings. This ensures that
users are constantly updated about opportunities to engage beyond the classroom,
contributing to a well-rounded college experience.

A standout feature of the chatbot is its unwavering commitment to assisting students


in their pursuit of placements. Going beyond the surface, it offers intricate details about
the placement process, serving as a guiding light for students stepping into the
professional world. By offering valuable preparation tips, the chatbot enhances students'
readiness for the job market, bolstering their confidence.

Chatbot For College Website 1


Taking its assistance a step further, the chatbot empowers students with firsthand
insights by sharing the LinkedIn profiles of alumni who have successfully secured
placements in specific companies. This unique feature not only helps students gain an
understanding of the professional landscape but also facilitates connections with alumni,
nurturing the growth of their own professional networks.

As a centralized repository of information, the College Website Chatbot alleviates


the strain on college staff and resources. Its ability to promptly provide accurate and
personalized assistance reduces the need for repeated queries and manual interventions.
This, in turn, enhances the overall website experience and reinforces a sense of support
and engagement among users.

The College Website Chatbot transcends its role as a mere utility and becomes a
cornerstone of the college's digital ecosystem. It acts as a catalyst in creating a thriving
and successful college community by facilitating admissions, disseminating essential
placement information, and offering a window into the world of campus activities. With
its intelligent insights and personalized interactions, this chatbot cements its status as an
indispensable asset in shaping a dynamic and prosperous college environment.

Chatbot For College Website 2


1.2 Objective & Scope of the Project

The central goal of integrating a chatbot into the college website is to significantly
elevate communication, accessibility, and overall user experience for all individuals
interacting with the platform. Through the deployment of an intelligent virtual
assistant, the project seeks to provide valuable assistance and information to students,
parents, and visitors, ultimately enriching their interactions with the college's online
presence in a manner that is both efficient and engaging.

The expansive capabilities of the chatbot will extend to a broad spectrum of user
inquiries encompassing various facets of college life. Users can expect quick and
precise responses regarding subjects ranging from available courses and admission
procedures to placement opportunities, campus amenities, upcoming events, and other
pertinent college-related details. By furnishing rapid answers to these inquiries, the
chatbot obviates the need for users to navigate through different sections of the
website manually, thereby saving them valuable time and effort.

Of particular importance within the project's scope is its commitment to aiding


students in navigating the intricate process of placements. The chatbot is poised to
offer invaluable insights into placement opportunities available on campus, the
dynamics of the recruitment procedure, and actionable advice for effective placement
preparation. By rendering such support, the chatbot empowers students to make well-
informed choices and enhance their prospects of securing coveted job placements
upon graduation.

In pursuit of a more sophisticated and tailored user experience, the project


ambitiously aims to amalgamate machine learning algorithms with the foundational
NLP techniques utilized by the chatbot. This amalgamation will facilitate continuous
learning from user interactions, enabling the chatbot to dynamically refine its
responses over time based on evolving user behavior. Through this iterative learning
process, the chatbot can adeptly understand user preferences, align its responses

Chatbot For College Website 3


accordingly, and deliver personalized and contextually pertinent information to each
user.

Further enhancing the project's comprehensive approach is its commitment to


responsiveness to user feedback. Regular updates will be a hallmark of the chatbot's
lifecycle, allowing for the rectification of any shortcomings and the enrichment of its
functionalities. This iterative methodology ensures that the chatbot continues to
evolve, augmenting its intelligence and operational efficacy with each subsequent
update.

The successful integration of the College Website Chatbot stands to


fundamentally transform the digital ecosystem of the college. By simplifying and
enhancing communication channels, the chatbot not only minimizes the workload of
college staff tasked with addressing repetitive inquiries but also ushers in a seamless
and user-centric experience for all stakeholders. As the chatbot harnesses machine
learning to learn and adapt from interactions, it lays the groundwork for a remarkably
personalized and effective user experience, accommodating the unique requirements
of each individual interacting with the college's online platform. Ultimately, this
project represents an innovative initiative that harnesses the power of technology to
optimize communication and support within the college community, thereby fostering
a more connected and informed environment.

Chatbot For College Website 4


1.3 Project Definition

The overarching goal of this project is to create an intuitive and accessible chatbot
tailored for the college's website, utilizing the power of Python and Natural Language
Processing (NLP). Through this advanced technology, the chatbot is set to serve as an
interactive and intelligent intermediary, seamlessly bridging communication gaps among
the diverse stakeholders of the college: students, faculty, and visitors. By emulating
human-like understanding, the chatbot aims to interpret and comprehend user queries
adeptly, enabling real-time access to precise and pertinent information. Whether it's
inquiries about admissions procedures, comprehensive course details, upcoming events,
or intricate placement information, the chatbot is primed to be a comprehensive
information repository. Notably, the chatbot is poised to offer invaluable assistance to
students navigating the intricate landscape of placements, providing guidance and
insights.

Central to the project's objective is the optimization of user satisfaction through


prompt responses. By ensuring swift and efficient interaction, the chatbot obviates the
need for users to manually navigate through various sections of the college website,
saving them both time and energy. This approach underscores the project's commitment
to enhancing the overall user experience. The development journey will be characterized
by an iterative methodology, guaranteeing that the chatbot evolves in response to user
feedback and identified areas for refinement. The integration of regular updates and
enhancements will progressively fine-tune the chatbot's capabilities, solidifying its
efficiency and user-friendliness with each iteration.

Beyond its practical utility, the chatbot aspires to foster a more engaging and
interactive ambiance for all users, contributing to the college's sense of community and
support. By offering a dynamic platform for interaction, the chatbot will not only provide
information but also cultivate a richer engagement among users, nurturing a stronger
sense of belonging. This amalgamation of cutting-edge technology and user-centered
design principles underscores the project's commitment to modernizing communication
channels and fortifying the college's digital presence.

Chatbot For College Website 5


1.4 Organization of Project Report

We were inspired to develop a chatbot for our college website to address the
common challenges faced by students, faculty, and visitors in finding information and
navigating the various resources available on the website. Recognizing the increasing
popularity of chatbots and their potential to enhance user experience, we saw an
opportunity to make a positive impact on our college community.

We conducted extensive research on chatbot technologies, exploring different


platforms and studying successful implementations on college websites. This allowed us
to understand the specific needs of our college users and tailor the chatbot's capabilities
accordingly.

Throughout the development journey, we acquired new technical skills in natural


language processing (NLP). These skills were essential in building a chatbot that could
understand user queries and provide relevant and helpful responses in real-time.

We recognized the importance of testing the chatbot extensively to ensure its


reliability and responsiveness. We simulated various user scenarios and refined the
chatbot's responses to make it more intuitive and efficient.

One of our primary goals was to create a user-friendly and conversational chatbot
that feels approachable and helpful. We focused on developing a friendly personality for
the chatbot, so users feel comfortable interacting with it and are encouraged to use it as
their go-to resource for information. We also provided feedback form to the user if the
query related information is not present in dataset.

We are grateful for the opportunity to implement this chatbot as it will continue to
evolve and serve as a valuable resource for current and prospective students, faculty, and
visitors, promoting engagement and facilitating seamless interactions.

Chatbot For College Website 6


2. LITERATURE SURVEY

2.1 Existing Approaches / System


2.1.1 Title: AI-Powered Student Assistance Chatbot
Authors: A. Bhharathee, S. Vemuri, B. Bhavana, K. Nishitha
Summary:
In the context of addressing the challenges and inquiries commonly faced by
Class 12 students during the transition to college, a comprehensive research study has
been conducted to devise an innovative solution - a chatbot tailored to assist students
throughout the enrollment process. This intelligent software, known as a chatbot or
chatterbot, has been meticulously crafted by harnessing the power of Natural
Language Processing (NLP) techniques and frameworks. Unlike traditional methods
involving interactions with human agents, this chatbot orchestrates online
conversations, offering real-time guidance.

To implement this advanced chatbot system, the research study employs the
BotPress platform. This platform serves as the foundation upon which the chatbot is
built, and its capabilities are further enriched by incorporating Natural Language
Understanding (NLU) functionalities. By integrating NLU into the chatbot's
architecture, it gains the capacity to decipher users' intentions and react appropriately
to their inquiries. This means that the chatbot can now not only comprehend user
inputs but also deduce the context and meaning behind them, leading to more relevant
and contextually accurate responses.

The integration of the chatbot into a WordPress website using Javascript is a


pivotal step in ensuring its accessibility and usability. WordPress, a widely adopted
open-source content management system written in PHP, serves as the ideal platform
for hosting this chatbot. Through the utilization of the 'Header and Footer Scripts
Plugin,' the chatbot becomes seamlessly embedded within the website's interface,
providing a cohesive and user-friendly experience for students seeking assistance.

Chatbot For College Website 7


The efficacy of the proposed chatbot system is substantiated by its impressive
performance metrics. The chatbot's ability to provide suitable responses is
demonstrated through an approximate accuracy rate of 90.6%, illustrating its
proficiency in addressing users' queries and concerns. This high accuracy rate
underscores the success of the chatbot's NLU implementation, allowing it to discern
user intent and offer tailored responses effectively.

Notably, Natural Language Understanding (NLU) is a pivotal technology that


underpins the development of conversational interfaces. It encompasses various
aspects such as intent classification and entity recognition, requiring training to
perform tasks effectively. NLU empowers the software to transform user messages
into structured data, which forms the basis for meaningful interactions with the
chatbot.

WordPress, renowned for its versatility and user-centric design, provides the ideal
canvas for hosting the chatbot. Its widespread use in creating visually appealing
websites ensures a seamless integration of the chatbot into the user interface. On the
other hand, the field of Natural Language Processing (NLP) equips the chatbot with
the ability to comprehend users' input by deciphering syntax, semantics, and intent.

The development process of the chatbot leverages BotPress as its foundation.


Moving forward, the research aims to enhance the NLU accuracy and expand the
chatbot's capabilities by introducing new categories to cater to evolving user
requirements. This ongoing work signifies a commitment to continuous improvement
and adaptation, ensuring that the chatbot remains a valuable resource for Class 12
students embarking on their college journey.Here, BotPress is used to develop the
bot, will be improving the accuracy of the bot's NLP and adding any new categories
required by the users.
Here, BotPress is used to develop the bot. Our work will be improving the accuracy
of the bot's NLP and adding any new categories required by the users.

Chatbot For College Website 8


2.1.2 Title: GALGOBOT – The College Companion Chatbot
Authors: S. Saraswat, S. Mishra, V. Mani, S. Priya
Summary:
GALGOBOT presents a groundbreaking solution for streamlining the process of
acquiring information within sprawling college campuses. With their expansive areas,
college campuses often necessitate traversing multiple departments to piece together
answers to specific queries. GALGOBOT addresses this challenge by offering a time-
efficient and effortless query-solving experience. This innovative chatbot system operates
as a virtual companion, seamlessly integrated into college websites.

To enhance user interaction and security, GALGOBOT incorporates a


comprehensive Login and Signup System. This functionality enables users to establish
individual profiles, storing their data securely within a MySQL database. This stored
information serves to authenticate users and verify their identity when engaging with the
chatbot.

The foundation of GALGOBOT's capabilities rests upon cutting-edge artificial


intelligence technologies. The system leverages Natural Language Processing (NLP) to
comprehend user queries, enabling it to furnish accurate and current information in
response. The architecture of GALGOBOT embodies the integration of a multitude of
technologies, encompassing both frontend and backend components.

For the frontend, technologies like HTML, CSS, AJAX, jQuery, and JavaScript
are harnessed to create an intuitive and user-friendly interface. This interface becomes the
platform through which users interact with GALGOBOT, enabling seamless
communication and query resolution.

The backend functionalities of GALGOBOT are realized through the combined


use of PHP and Python. These programming languages facilitate the intricate processes
that power the chatbot's responses, ensuring that users receive accurate and relevant
information to their queries.

Chatbot For College Website 9


Central to the construction of GALGOBOT is the Rasa Framework, which
contributes its specialized services, including Rasa NLU and Rasa Core. These services
play a pivotal role in crafting the functionality of GALGOBOT, allowing it to effectively
understand user intents and deliver meaningful responses. This integration of AI-driven
services transforms GALGOBOT into an intelligent and interactive entity capable of
addressing a diverse array of college-related inquiries.

The practical manifestation of GALGOBOT's capabilities is manifested in a


thoughtfully designed chatbot user interface that resides on the college's official website.
This integration empowers users, be they students or faculty members, with a powerful
tool for quickly and accurately obtaining information relevant to their needs.

It's important to highlight that GALGOBOT's implementation is underpinned by a


robust security framework, ensuring that only authorized college students and faculty
members can access its services. This added layer of security reinforces the chatbot's
value as a trustworthy and dependable resource within the college community.

In conclusion, GALGOBOT stands as an innovative solution that harmonizes


advanced technologies such as NLP, AI frameworks, and web development to create a
seamless, efficient, and secure means of resolving college-related queries. Its integration
within college websites revolutionizes the way information is acquired, making it an
indispensable asset for both students and faculty members alike.

Chatbot For College Website 10


2.1.3 Title: AI And Web-Based Interactive College Enquiry Chatbot
Authors: R. Parkar, Y. Payare, K. Mithari, J. Nambiar, J. Gupta
Summary:
The emergence of the AI-powered College Enquiry Chatbot represents a
significant advancement in the way students gather essential information about colleges.
In a rapidly evolving digital landscape, this web application stands out as a user-friendly
and efficient tool, designed to provide comprehensive insights into various aspects of
college life.

Traditionally, students faced the arduous task of physically visiting campuses or


engaging in lengthy communication with college staff to gather information. This process
was time-consuming and often led to frustration. The advent of the College Enquiry
Chatbot revolutionizes this experience by offering a streamlined, 24/7 access point for
users to seek information about courses, admissions, academic schedules, and other
common inquiries.

At the heart of this project lies a tailored chatbot accessible via the college
website. The chatbot's versatility shines through as it accommodates both text and audio
inputs, creating an interactive and intelligent experience that transcends basic, predefined
responses. Its ability to engage in insightful discussions sets it apart, fostering a human-
like interaction that provides users with the information they need promptly.

The development of the chatbot involves a series of crucial steps aimed at


ensuring its accuracy and effectiveness. A comprehensive dataset is curated, comprising a
range of user questions, associated tags, and the corresponding responses. This dataset is
then divided into two parts: the training inputs (x train) and the tags (y train). The
application of Natural Language Processing (NLP) techniques further enhances the
chatbot's ability to comprehend user inputs effectively.

Chatbot For College Website 11


NLP, a cutting-edge technology facilitating seamless human-machine
communication without the need for extensive coding, underpins the chatbot's
functionality. Through processes like tokenization, stemming, and the bag of words
approach, user inputs are efficiently preprocessed to ensure a higher level of
understanding. Tokenization breaks down sentences into individual tokens, while
stemming generates various forms of root words. The bag of words technique leverages
word frequencies to preprocess text, contributing to more accurate responses.

Central to the chatbot's capabilities is the Feedforward Neural Network model.


The intricate interplay between NLP and the neural network empowers the chatbot to
provide accurate and contextually relevant responses. The model operates by taking NLP-
processed input patterns as the variable X, which is then fed into the neural network. This
network predicts corresponding tags (variable Y), enabling the chatbot to offer tailored
information to users.

In essence, the College Enquiry Chatbot stands as a testament to the fusion of


NLP and AI concepts to create an efficient platform that addresses the needs of modern
students. By bridging the gap between users and vital information, it simplifies the
college inquiry process, offering a level of convenience that was previously unheard of.
In doing so, this innovative application not only enhances the user experience but also
sets a benchmark for the potential of AI in transforming various facets of our lives.

Chatbot For College Website 12


2.1.4 Title: Preliminary Findings of using Chat-bots as a Course FAQ Tool
Authors: Sue Inn Ch’ng, Lee Seng Yeong, Xin-Yean Ang
Summary:
Students learn by asking questions and as instructors we encourage students to ask
questions. However, not all questions are of equal importance. Questions related to the
mechanics of a course are unavoidable but when the same question is asked and answered
multiple times by an instructor it can become a burden to the instructor to personally
answer these questions multiple times. This paper presents the preliminary findings of an
admin-updatable Dialogflow-based chat-bot deployed on an instant messaging platform
(Telegram) to handle all course queries. The chat-bot uses the in-built natural language
processing module by Dialogflow to understand a student’s query and match it to the
provided predefined answers.

The design and implementation of a chat-bot to handle FAQs for a compulsory


computing internship course at a private university in Malaysia. The internship course is
undertaken by students from seven different programs in the department and is usually
overseen and coordinated by one academic staff. The contribution of this paper is mainly
in the dissemination of information on the know-how of designing a chat-bot using
server-less technology particularly Google Dialogflow.

The chat-bot was designed based on the questions collected from Padlet during
the period of September 2018 – January 2019. There were a total of 35 questions asked
by students during this duration regarding the course. The questions were then coded
using in vivo coding . The codes from the in vivo coding were then further organized into
three categories based on the areas to be addressed by the query throughout the course: -
before, during or after internship. It was intentionally done this way to facilitate the
maintenance of the agent when the course is rotated to another staff. At each rotation, it
was noted that the staff first familiarizes him/herself with the course processes –
deliverables, deadlines and supporting events and tasks that students are required t o
attend/fulfil during the course. The results of the in vivo coding yielded 13 codes. Each of
these codes form the ‘intents’ or the purpose of the students’ questions while all related

Chatbot For College Website 13


questions form the ‘training phrases’ for the chat-bot. The responses for each of the
questions in Padlet that was provided by the course coordinator forms the chat-bot
responses when the questions are matched to the ‘intents’. In the Dialogflow tool, these
answers are inputted as values for ‘Text response’.

The chat-bot was deployed for a period of two weeks. A survey was designed to
collect feedback on student’s perception of the use of the developed chat-bot as a source
of information compared to the regular method of communication – emails. The
questionnaire contains three parts: demographic information, chat-bot performance
evaluation and students’ preference. The evaluation of the chat-bot was based on two
close-ended 7-point Likert scale questions to evaluate how well the responses of the
chatbot addresses the questions raised. The questionnaire was administered at the end of
the conversation to ensure that the respondents have at least tried the chat -bot before
giving their views.

Here, the design and implementation of a chat-bot built from a small bank of
questions to handle students’ queries for a compulsory internship course. The chat -bot
was deployed on Telegram and instructions were provided for students to access the chat-
bot through the LMS. The conversation logs from the deployment were analysed and
further used to improve the knowledge bank of the chat-bot showing that the chat-bot can
be a viable tool to collect questions from students and a platform to disseminate
information to students.

Chatbot For College Website 14


2.1.5 Title: Development of a Bespoke Chatbot Design Tool to Facilitate a
Crowd-based Co-creation Process.

Authors: James Henderson, Matthew Pears, Panagiotis D. Bamidis, Iraklis


Tsoupouroglou, Eirini Schiza, Constantinos S. Pattichis

Summary:
Developing an effective educational chatbot is a challenging and time-consuming
process. One of the main challenges in a co-creation process, is ensuring multiple
stakeholders, as professionals in a variety of roles such as academics, learners,
researchers, and subject experts, are all able to contribute successfully. More common
online learning resources are designed using traditional methods such as group
storyboarding workshops. With chatbot design, it is especially difficult to maintain a
group focus on pedagogical requirements while minimizing technological interactionThis
paper describes the development of a web-based chatbot design tool formed to break
down these barriers and support the overall design process.

The paper describes the development of a web-based chatbot design tool aimed at
overcoming the challenges associated with co-creating effective educational
chatbots.Traditional methods for designing online learning resources are less effective in
the context of chatbot design due to the complex interplay between pedagogical
requirements and technological aspects.

The ASPIRE framework, used in the ERASMUS+ project called "Chatbot


Enhanced Personalise European Healthcare Curricula (CEPEH)," was employed to
design healthcare education chatbots covering topics like cybersecurity, critical appraisal,
and virtual patients. The framework's application revealed challenges during the
Storyboarding and Population phases, which led to the development of a web-based
chatbot design tool. This tool aimed to simplify the interaction for stakehold ers of various
roles and shield them from the technical complexities of the chatbot development
process.

Chatbot For College Website 15


The architecture of the tool is built using technologies like PHP, a MySQL
database, HTML, CSS, and JavaScript. It generates data output in YAML or JSON file
formats, both widely recognized in the software industry. Stakeholder roles were defined.
An Administrator role was also established for overall application functionality.

Learners provide initial data based on their knowledge and experiences, including
questions, statements, and expected responses for chatbots. Academics verify and
validate learner-entered data, while others like learning technologists and software
developers prepare the verified data for export in a format suitable for chatbot software.

While the development of the web-based chatbot design tool presents promising
solutions to challenges in co-creating educational chatbots, there are potential drawbacks
to consider. One drawback is the reliance on stakeholders' accurate input and validation,
which might be subject to inconsistencies or errors. Additionally, the tool's effectiveness
could be limited by the simplicity of the interface, potentially constraining the depth and
complexity of chatbot interactions that can be created. Moreover, the use of predefined
templates and data formats might hinder the flexibility required for more specialized or
innovative chatbot designs. Finally, the tool's success heavily depends on user
engagement, which could vary, impacting the quality and quantity of contributed data and
potentially affecting the overall utility of the chatbots produced.

Chatbot For College Website 16


2.2Drawbacks in Existing System
Websites that lack a chatbot can have several drawbacks, which may impact user
experience and hinder efficient information retrieval. Some of the common drawbacks
include:

• Limited Interactivity: Without a chatbot, websites often lack real-time


interactivity, resulting in a static and passive user experience. Users cannot ask
questions or seek specific information directly, leading to a less engaging and
dynamic interaction.

• Time-Consuming Information Search: Users may need to navigate through


various webpages and menus to find the information they seek. This process can
be time-consuming and frustrating, especially when users are looking for specific
details about courses, admissions, or campus facilities.

• Lack of Personalization: Websites without a chatbot typically cannot offer


personalized assistance or tailored recommendations based on individual
preferences or needs.

• Absence of Instant Support: Without a chatbot, users cannot obtain immediate


answers to their questions. They may need to wait for responses to emails or rely
on phone calls during office hours, leading to delays in getting the information
they require.

• Inconsistent Information Retrieval: Users may struggle to find consistent


information across different webpages, leading to confusion and uncertainty
regarding college-related details.

• Less Efficient Student Support: Without a chatbot, students and parents may need
to rely on traditional support channels, such as email or phone, which may not be
as efficient as a real-time chatbot interaction.

Chatbot For College Website 17


2.3 Motivation for Proposed System

The motivation behind the proposed system, an AI-powered chatbot for college-
related inquiries, can stem from several factors. Here are some common motivations for
implementing such a system: The primary motivation is to enhance the user experience
for students and parents who seek information about college-related activities. By
providing a user-friendly and interactive chatbot, colleges aim to offer a more convenient
and efficient way for users to access the information they need without navigating
complex websites or going through lengthy phone inquiries. Navigating through a college
website or making phone calls to inquire about various college-related activities can be
time-consuming and require significant resources, both for the institution and the users.
By implementing a chatbot, colleges can automate the process of addressing common
inquiries, reducing the need for manual assistance and freeing up resources for more
complex tasks. Unlike traditional methods of inquiry, a chatbot can operate 24/7,
providing round-the-clock access to information. This is especially beneficial for students
and parents who may have inquiries outside regular working hours or in different time
zones. The motivation is to ensure that users can get their questions answered promptly
and at their convenience. With a growing number of inquiries from prospective students
and parents, it can be challenging for college staff to handle each request individually. By
implementing a chatbot, colleges can scale their support services to handle a larger
volume of inquiries simultaneously, ensuring that all users receive timely responses and
assistance. Ultimately, the motivation for implementing the chatbot for college-related
inquiries is to provide a seamless and efficient communication channel that empowers
users to obtain the information they need while optimizing resources and improving the
overall user experience.

Chatbot For College Website 18


3. REQUIREMENT SPECIFICATION

3.1 Overall Description of the Project


The proposed project centers around the development of an AI-powered web-
based interactive college inquiry chatbot, a pioneering solution aimed at revolutionizing
the way prospective students and parents access vital information about college-related
activities. In a conventional scenario, individuals seeking details about courses,
admissions, and campus facilities often navigate the college website or resort to
telephonic inquiries, facing the challenge of sifting through numerous web pages to find
relevant information. This can be both time-consuming and frustrating, hampering the
accessibility of crucial data.

The primary motivation for this project stems from the need to simplify and
expedite the process of acquiring college-related information. By integrating cutting-edge
Natural Language Processing (NLP) techniques and AI capabilities, the chatbot is poised
to serve as an efficient and user-friendly alternative. The envisioned system is designed to
empower users to pose queries in natural language, thereby eliminating the cumbersome
navigation process and rendering the information-seeking journey seamless. Whether it's
details about courses, admission requirements, application procedures, or campus
amenities, the chatbot endeavors to promptly provide tailored responses, creating a
personalized experience that closely mirrors human interaction.

The scope of the project encompasses multiple dimensions. The core functionality
revolves around the creation of a chatbot interface that mimics conversation, catering to
the inquiries posed by users in real time. This requires the integration of advanced NLP
algorithms to understand user intent, extract relevant entities, and generate contextually
accurate responses. Furthermore, the system incorporates a comprehensive knowledge
base meticulously compiled with up-to-date information about the college's offerings.
This knowledge base serves as the repository from which the chatbot draws accurate and
timely data to address users' questions.

Chatbot For College Website 19


The envisaged architecture involves seamless integration of the chatbot system
into the college's website or messaging platform, ensuring its effortless accessibility to
users. To realize this, the project necessitates the collaboration of multiple components,
including the chatbot engine, the NLP module, the knowledge base, and potential
integration with external databases or APIs for real-time data retrieval. The system also
offers the potential for expansion by incorporating additional functionalities such as user
authentication, personalized recommendations, and analytics for continuous
improvement.
The AI-powered web-based interactive college inquiry chatbot presents a
transformative solution to the challenges inherent in the conventional information-
seeking process. By leveraging advanced technologies, the project aims to provide an
innovative platform that not only streamlines the accessibility of college-related
information but also enhances user experience through real-time responses, personalized
interactions, and a simplified approach to engagement. Through the seamless integration
of technology and user-centric design, the chatbot aspires to redefine the way individuals
engage with colleges and make informed decisions about their academic journeys.

Chatbot For College Website 20


Use Case Diagrams

Figure-1

Chatbot For College Website 21


Use Case Diagram
In the use case diagram, there are two actors, mainly admin and user.

3.1.1 Admin Interface

As the person responsible for managing the entire website, the admin plays a
crucial role in ensuring the smooth operation and functionality of the platform.
Here are the specific tasks and responsibilities of the admin in detail:

Database Management:
• The admin has access to the website's database, which stores all user
information, placement details, courses, clubs, and other relevant data.
• Admin can make updates to the database, ensuring that the information is
accurate and up-to-date.
• The admin can add new entries to the database, such as ad ding new companies,
clubs.
• Similarly, the admin can also remove data from the database when necessary.

Website Maintenance and Updates:


• The admin is responsible for maintaining the overall functionality of the website
and ensuring that it runs smoothly for users.
• This may involve periodic updates to the website to improve performance, fix
any bugs or issues, and enhance user experience.
• The admin may work closely with the website development team or web
hosting service to implement necessary updates and improvements.

Chatbot For College Website 22


User Support and Issue Resolution:
• The admin may also handle user support and address any issues or queries users
may have regarding the platform.
• The admin can help users with any technical difficulties, registration problems,
or appointment scheduling inquiries.
• In case of any disputes or complaints, the admin may be responsible for
resolving them and ensuring a positive user experience.

The admin's role is vital in overseeing and managing the website, including database
updates, user, website updates, and user support.

3.1.2 User Interface


The website offers a user-friendly interface for users to access information about college
and resolve their queries with the help of chatbot.

• User can explore information about courses, placements and college in the
website.
• On the home page, a detailed description of the courses is provided along with the
chatbot.
• The user can ask queries related to college, courses, clubs, events and placements
to the chatbot and get an instant reply.

Chatbot For College Website 23


3.2 Functional & Non-functional Requirements Specification

3.2.1 Introduction
This document specifies the requirements for Chatbot for College Website. The
requirements are grouped by their stakeholders, and functional and non-functional
requirements are separated.

3.2.2 Stakeholders
• U User
• A Admin

3.2.3 Functional Requirements


• The website should provide detailed information about the institution.
• Users can interact with the chatbot through a user-friendly interface.
• Chatbot should be able to process the user inputs using NLP.
• Chatbot should answer the queries regarding the institution.
• The system should clarify information about the courses provided by the
institution.
• Chatbot should provide information about placements tests and training.
• Chatbot should provide information regarding placement preparation for any
specified company.

3.2.4 Non-Functional Requirements


Usability
• The chatbot responses should be clear, concise, and easily understandable by
users.
• The system shall be user friendly.

Chatbot For College Website 24


Performance
• The chatbot should respond promptly, providing real-time or near-real-time
answers to user queries.
• The system should be able to handle a large volume of simultaneous user
interactions without significant delays or downtime.

Scalability
• The system should be able to accommodate an increasing number of users and
inquiries without significant degradation in performance.

• The system shall handle multiple user inputs simultaneously.

Maintainability
• The system should be maintainable, allowing for updates, bug fixes, and
enhancements.

Integration
• The chatbot should be seamlessly integrated into the college's website or
messaging platform.

• The system should support integration with the existing college database.

Availability
• The system shall always be available, without fail.
• The system shall be fast and responsive.

Security
• User data should be stored securely and protected from unauthorized access or
data breaches.
• The system should adhere to data protection and privacy regulations.

Chatbot For College Website 25


3.3 Design Specification (UML Diagrams / DFD / E-R Diagrams) with
Normalized Database

E-R Diagram

Figure-2

Chatbot For College Website 26


The Entity-Relationship Diagram (ER Diagram) provides an overview of the
relationships between different entities in the website.
Entities:
User Entity:
• The User entity contains attributes such as username, password and can give
the feedback.
• The user can interact with the chatbot to resolve his queries.
Chatbot Entity:
• The Chatbot entity gives the response the user’s query by the Natural Language
Processing.
Dataset Entity:
• The dataset entity contains information in json format.
Admin Entity:
• The Admin plays a central role in managing user data, updating the chatbot's
dataset, and updating website. The website's functionality relies on the
interactions between users, the Chatbot's prediction, and the Admin's approval
process.

Overall, this ER Diagram provides a comprehensive view of the website's


structure and the roles of different entities in delivering a seamless and user-friendly
experience.

Chatbot For College Website 27


Class Diagram

Figure-3

Chatbot For College Website 28


Class diagram:
The Class Diagram illustrates the relationships and interactions between various classes
in the website.

User Class:
• User can have username, password and mail id.
• User can also give feedback based on the performance of the chatbot.

Admin Class:
• Admin adds users to the system, implying an association between Admin and
User classes.
• Admin updates the database, indicating an association between Admin and
Database classes.
• Admin monitors the chatbot, suggesting an association between Admin and
Chatbot classes.

Chatbot Class:
• The Chatbot class takes input as a string and performs actions like tokenization
and generate a response.

Chatbot For College Website 29


Activity Diagram

Figure-4

Chatbot For College Website 30


The Activity Diagram provides a visual representation of the sequence of activities and
actions performed by users when interacting with the college chatbot.

• Firstly, the user asks a query to the chatbot.


• The chatbot analyzes the query by performing tokenization, stemming and
checks whether it is matched with the data present in dataset.
• If the data is present in the dataset, then the chatbot gives the instant response,
resolving the user query.
• If the data is not present in the dataset, the chatbot asks the user to give the
feedback.

The Activity Diagram provides a clear flow of actions, ensuring a smooth and user-
friendly experience for individuals to resolve their queries.

Chatbot For College Website 31


Collaboration Diagram:

Figure-5

A collaboration diagram, also known as a communication d iagram, is a visual


representation that illustrates the interactions and relationships among objects or
components within a specific scenario or use case. Unlike sequence diagrams,
collaboration diagrams emphasize the structural aspect of the system, focusing on how
objects collaborate and communicate with each other to achieve a particular task.

Interactions in the Collaboration Diagram:

• The user initiates the interaction by sending a message to the chatbot, asking
about requirements for a specific program.

• The chatbot collaborates with the NLP module by passing the user's inquiry for
processing. This interaction represents the relationship between the chatbot and
the NLP module.

Chatbot For College Website 32


• The NLP module communicates the processed information back to the chatbot.
This interaction illustrates the relationship between the NLP module and the
chatbot.

• The chatbot sends the requirements to the user as a response to the original
inquiry.
Object Diagram:

Figure-6

The object diagram provides a static snapshot of the system, showcasing the instances of
classes and how they interact at a specific moment. It's particularly useful for
understanding relationships, associations, and the structure of objects within the system.
Interactions in the Object Diagram:
• The "User" object interacts with the "Chatbot" object, representing the user's
message to the chatbot.
• The "Chatbot" object interacts with the "NLP Module" object, indicating the
chatbot's utilization of the NLP module for processing.
• Chatbot: The "NLP Module" object communicates back to the "Chatbot" object,
providing processed information.
• The "Chatbot" object sends the admission requirements to the "User" object as a
response.

Chatbot For College Website 33


Sequence Diagram:

Figure-7

The Sequence Diagram illustrates the chronological order of interactions and messages
exchanged between the User, Chatbot. The sequence diagram visually represents the flow
of interactions between the user, chatbot, NLP module, and database, showing how
messages are exchanged and processed at each step of the scenario.

User interacts with the Chatbot:

• The user clicks the chat icon on the website to initiate the interaction with the
chatbot. This action sends a synchronous message from the user to the chatbot.

Chatbot For College Website 34


• The chatbot responds with a welcome message, acknowledging the user's
interaction. This response is an asynchronous message sent from the chatbot to
the user.

• The user types a message inquiring about admission requirements for a specific
program. This message is sent from the user to the chatbot.

• The chatbot forwards the user's message to the Natural Language Processing
(NLP) module for processing. This is an asynchronous message indicating the
chatbot's intent to understand the user input.

• The NLP module processes the user's message, extracts the intent and relevant
entities. It sends back the processed information to the chatbot.

• The chatbot sends the requirements as a response to the user's original inquiry.

Chatbot For College Website 35


3.4 Software and Hardware Requirements
Software Requirements:
Language : Python, HTML, CSS
Operating System : Windows 7 and above
Python: Used for implementing various components of the chatbot, including Natural
Language Processing (NLP) algorithms and integration with external systems.
Development Frameworks and Libraries:
Flask or Django: Web frameworks for building the backend of the chatbot system.
NLTK (Natural Language Toolkit): Libraries for natural language processing and text
analysis.
PyTorch: Frameworks for implementing machine learning models if advanced AI
capabilities are required.
HTML, CSS: Used for creating the web-based user interface and ensuring a responsive
design.
Hardware Requirements:
Installed RAM :4GB RAM (minimum)
System Type : PC
RAM (Random Access Memory): Minimum 4GB RAM is required for the website to
function efficiently. RAM plays a crucial role in storing and accessing data that is
currently in use by the system and applications. With 4GB RAM, the website can handle
multiple processes and user interactions without significant slowdowns.

Chatbot For College Website 36


4. IMPLEMENTATION

4.1 Methodology (with Flowchart)

4.1.1 Requirement Gathering


During the initial phase of our project, our primary focus was on identifying and
documenting the specific requirements and objectives of the chatbot system. We
conducted thorough research to understand the needs of our target audience,
which includes students, faculty, and visitors of college website. we also
identified integration needs, such as connecting with the frontend part.
4.1.2. Design and Architecture
To ensure an efficient and effective chatbot system, we defined a comprehensive
architecture. This involved outlining the chatbot's various components,
determining the appropriate database structure to store relevant data, and
considering any potential integration with external system. We also designed the
conversational flow and user interactions to create a seamless and user-friendly
experience. with and find the information they need effortlessly.
4.1.3. Natural Language Processing (NLP) Training
An essential aspect of the chatbot's functionality lies in its ability to understand
and interpret user queries accurately. To achieve this, we prepared and
preprocessed a dataset of training examples that encompasses a wide range of
possible user inputs and their corresponding responses. We train the NLP model
using this dataset, enabling it to interpret user input effectively and generate
appropriate responses.
4.1.4. Development
With the architectural plan, we proceeded with the implementation of the
chatbot's backend logic. This phase involved integrating the trained NLP model
with the system, connecting it to the designated dataset. we also developed the
frontend interface, where users can interact with the chatbot. The user interface
will be designed to be visually appealing and user-friendly.

Chatbot For College Website 37


4.1.5. Integration and Testing
We then proceed with integrating the chatbot system into the website. We
conducted extensive testing with various inputs, including functional testing of
the chatbot's responses, to ensure that it performs reliably.
4.1.6. Maintenance and Iteration
We closely monitored the chatbot's performance and collected user feedback to
gain insights into its strengths and areas for improvement. Regular updates to the
chatbot's knowledge base will be made, incorporating new information and
refining responses based on user interactions. By continually iterating and
enhancing the chatbot, we aim to provide a valuable tool for the college needs.
Flowchart:

Figure-8

Chatbot For College Website 38


4.2 System Architecture

Figure-9

The system architecture for the Chatbot website is depicted in the figure and follows a
step-by-step process. The user initiates an interaction by typing a query in the chat
window on the UI.

When users engage with the chatbot, they type their inquiries into the chat window
available on the user interface (UI). This initial query is then directed to the chatbot
engine, a central processing component. The chatbot engine forwards the user's input to

Chatbot For College Website 39


the Natural Language Processing (NLP) module, which specializes in analyzing and
understanding human language.

Within the NLP module, a comprehensive analysis of the user's query takes place. The
NLP module goes beyond the surface level of the text, delving into the intent behind the
words. It skillfully identifies the purpose of the user's query and extracts important details
or entities embedded within it.

In cases where additional information is required to provide an accurate response, the


chatbot seamlessly accesses a knowledge base. This knowledge repository houses a
wealth of relevant information about the college, its procedures, courses, events, and
more. Armed with this knowledge, the chatbot proceeds to craft a response tailored to the
user's specific query.

Once the response is formulated, it's relayed back to the user interface. The user can
instantly view the chatbot's response within the chat window. At this juncture, the user
holds the power to shape the conversation's trajectory. They can opt to provide feedback
on the response's relevance or continue the conversation by posing further questions or
offering remarks.

If the user decides to continue interacting, the process enters a fresh iteration. Their new
input is sent back to the chatbot engine for analysis. This iterative exchange cultivates a
dynamic and adaptive dialogue between the user and the chatbot. Over time, the chatbot's
proficiency in understanding user intent and delivering pertinent responses is honed,
leading to an enhanced user experience. This iterative loop embodies the essence of a
fruitful human-computer interaction, characterized by continuous learning and
refinement.

Chatbot For College Website 40


4.3 Modules Description with Algorithms / Pseudo-code

A module is a software description or part of a documentation that contains one or more


routine details. It is a high-level description of a functional area, consisting of a group of
processes describing the functionality of the module and a group of packages
implementing the functionality. The modules in this application are –

4.3.1 Admin:
• Admin has complete access to the entire dataset.
• Admin inserts, updates, and deletes the data from dataset.
• Admin manages the chatbot's content, such as adding or modifying responses to
frequently asked questions or updating information.
• Admin manages the website's content, including adding or modifying pages,
updating course descriptions, uploading new images, and managing multimedia
content.

4.3.2 User:
• The user module provides a chat interface for users to interact with the chatbot,
including the ability to send messages and receive responses.
• The user module might include resources for students, such as study guides,
placement preparation and tutoring services.
• The user module allows users to access various aspects of the website, such as
course information, admission process, and campus events.

4.3.3 Natural Language Processing (NLP) Module:


This module is responsible for understanding and processing user input in natural
language.
• Keyword Matching: Identifying keywords or key phrases in user input and map
them to relevant intents or actions.
• Intent Recognition: Classification of user intents based on training data.
• Entity Extraction: Extracting specific entities from user input using techniques
like Named Entity Recognition

Chatbot For College Website 41


5. TESTING

5.1 Test Cases

Test Prerequisites Test Test Case Expect Actual Status Act


Case Case Description ed Output ion
No. Name Output /No
tes
1 Chatbot is Basic User The Chatbot Passed
deployed on Greeting initiates a chatbot responds
the college conversation should with a
website. with the respond friendly
chatbot by with a greeting
saying "Hi" greeting message.
or "Hello." message.

2 Chatbot is Departme User asks the The The Passed


deployed on nts chatbot about chatbot chatbot
the college informati a specific should provides
website on department provide details of
inquiry like details Informati
Information about the on
Technology Informati Technolo
on gy
technolog including
y the details
departme of HOD,
nt. Staff and
scope.

Chatbot For College Website 42


3 Chatbot is Clubs User asks Chatbot Chatbot Passed
deployed on details about a should responds
the college particular give the with
website club present details complete
in college. about the details of
club and the club,
its board events, its
members. board
members
along
with the
contact of
the club.
4 Chatbot is Placemen The user Chatbot Chatbot Passed
deployed on t related inquires should provides
the college queries. about the provide the
website recruitment details selection
process or about the process
preparation selection and the
guidance for process list of
a particular and previousl
company. resources y placed
for students
preparatio in the
n. company
along
with their
Linkedin
profiles,
including
the
resources
for
preparatio
n.
5 Chatbot is Feedback User asks The Chatbot passed
deployed on Collectio about the chatbot provides
the college n information should feedback
website that is not provide form
present in the feedback asking

Chatbot For College Website 43


dataset. form for about the
the data data to be
that is not added in
in the
dataset. dataset.

Chatbot For College Website 44


6. RESULTS AND CONCLUSION

6.1 Result Analysis


Home page of the application

Once user clicks the chat icon, the chatbot is initialized

Chatbot For College Website 45


The user can now interact with the chatbot by typing a message or asking a question in
the chatbot. The chatbot generates a response and sends it back to the chatbot interface.

Chatbot For College Website 46


Chatbot For College Website 47
Chatbot For College Website 48
Chatbot For College Website 49
Chatbot For College Website 50
6.2 CONCLUSION AND FUTURE SCOPE

The development of a chatbot for the college website using Python and Natural
Language Processing (NLP) is a valuable addition to the institution's digital presence.
The chatbot serves as an interactive and user-friendly tool that enhances communication
between the college and its students, faculty, and visitors. Throughout the project, we
have successfully implemented NLP technique to understand and respond effectively to
user queries, streamlining the access to relevant information. Moreover, the iterative
development process and incorporation of user feedback have enabled us to continuously
enhance the chatbot's capabilities, making it more efficient and reliable over time.

There are several opportunities to further expand and improve the college website
chatbot. One potential way is to integrate machine learning algorithms into the NLP
techniques, enabling the chatbot to learn from interactions and adapt its responses based
on user behavior. This would lead to a more personalized user experience, as the chatbot
can tailor answers according to individual preferences and historical interactions.
Incorporating voice recognition and speech synthesis technology would enable users to
interact with the chatbot through voice commands, making it even more convenient for
visually challenged people and individuals too.

Chatbot For College Website 51


Appendix
I. Code
App.py-
from flask import Flask, render_template, request, jsonify
from chat import get_response
app = Flask(__name__)
@app.get("/")
def index_get():
return render_template("base.html")
@app.post("/predict")
def predict():
text = request.get_json().get("message")
response = get_response(text)
message = {"answer": response}
return jsonify(message)
if __name__ == "__main__":
app.run(debug=True)

Chat.py-
import random
import json
import torch
from model import NeuralNet
from nltk_utils import bag_of_words, tokenize
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
with open('intents.json', 'r') as json_data:
intents = json.load(json_data)
FILE = "data.pth"
data = torch.load(FILE)
input_size = data["input_size"]

Chatbot For College Website 52


hidden_size = data["hidden_size"]
output_size = data["output_size"]
all_words = data['all_words']
tags = data['tags']
model_state = data["model_state"]
model = NeuralNet(input_size, hidden_size, output_size).to(device)
model.load_state_dict(model_state)
model.eval()
bot_name = "gnitsbot"
def get_response(msg):
sentence = tokenize(msg)
X = bag_of_words(sentence, all_words)
X = X.reshape(1, X.shape[0])
X = torch.from_numpy(X).to(device)
output = model(X)
_, predicted = torch.max(output, dim=1)
tag = tags[predicted.item()]
probs = torch.softmax(output, dim=1)
prob = probs[0][predicted.item()]
if prob.item() > 0.75:
for intent in intents['intents']:
if tag == intent["tag"]:
return random.choice(intent['responses'])
return "I do not understand...follow this link to give the feedback,<a
href='https://docs.google.com/forms/feedback/viewform?usp=sf_link'>click
here</a>"
if __name__ == "__main__":
print("Let's chat! (type 'quit' to exit)")
while True:
sentence = input("You: ")
if sentence == "quit":

Chatbot For College Website 53


break
resp = get_response(sentence)
print(resp)

Models.py-
import torch
import torch.nn as nn
class NeuralNet(nn.Module):
def __init__(self, input_size, hidden_size, num_classes):
super(NeuralNet, self).__init__()
self.l1 = nn.Linear(input_size, hidden_size)
self.l2 = nn.Linear(hidden_size, hidden_size)
self.l3 = nn.Linear(hidden_size, num_classes)
self.relu = nn.ReLU()
def forward(self, x):
out = self.l1(x)
out = self.relu(out)
out = self.l2(out)
out = self.relu(out)
out = self.l3(out)
return out

nltk_utils.py-
import numpy as np
import nltk
from nltk.stem.porter import PorterStemmer
stemmer = PorterStemmer()
def tokenize(sentence):
return nltk.word_tokenize(sentence)
def stem(word):
return stemmer.stem(word.lower())

Chatbot For College Website 54


def bag_of_words(tokenized_sentence, words):
sentence_words = [stem(word) for word in tokenized_sentence]
bag = np.zeros(len(words), dtype=np.float32)
for idx, w in enumerate(words):
if w in sentence_words:
bag[idx] = 1
return bag
train.py-
import numpy as np
import random
import json
import torch
import torch.nn as nn
from torch.utils.data import Dataset, DataLoader
from nltk_utils import bag_of_words, tokenize, stem
from model import NeuralNet
with open('intents.json', 'r') as f:
intents = json.load(f)
all_words = []
tags = []
xy = []
for intent in intents['intents']:
tag = intent['tag']
tags.append(tag)
for pattern in intent['patterns']:
w = tokenize(pattern)
all_words.extend(w)
xy.append((w, tag))
ignore_words = ['?', '.', '!']
all_words = [stem(w) for w in all_words if w not in ignore_words]
all_words = sorted(set(all_words))

Chatbot For College Website 55


tags = sorted(set(tags))
print(len(xy), "patterns")
print(len(tags), "tags:", tags)
print(len(all_words), "unique stemmed words:", all_words)
X_train = []
y_train = []
for (pattern_sentence, tag) in xy:
bag = bag_of_words(pattern_sentence, all_words)
X_train.append(bag)
label = tags.index(tag)
y_train.append(label)
X_train = np.array(X_train)
y_train = np.array(y_train)
num_epochs = 1000
batch_size = 8
learning_rate = 0.001
input_size = len(X_train[0])
hidden_size = 8
output_size = len(tags)
print(input_size, output_size)
class ChatDataset(Dataset):
def __init__(self):
self.n_samples = len(X_train)
self.x_data = X_train
self.y_data = y_train
def __getitem__(self, index):
return self.x_data[index], self.y_data[index]
return self.n_samples
dataset = ChatDataset()
train_loader = DataLoader(dataset=dataset,
batch_size=batch_size,

Chatbot For College Website 56


shuffle=True,
num_workers=0)
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model = NeuralNet(input_size, hidden_size, output_size).to(device)
criterion = nn.CrossEntropyLoss()
optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate)
for epoch in range(num_epochs):
for (words, labels) in train_loader:
words = words.to(device)
labels = labels.to(dtype=torch.long).to(device)
outputs = model(words)
loss = criterion(outputs, labels)
optimizer.zero_grad()
loss.backward()
optimizer.step()
if (epoch+1) % 100 == 0:
print (f'Epoch [{epoch+1}/{num_epochs}], Loss: {loss.item():.4f}')
print(f'final loss: {loss.item():.4f}')
data = {
"model_state": model.state_dict(),
"input_size": input_size,
"hidden_size": hidden_size,
"output_size": output_size,
"all_words": all_words,
"tags": tags
}
FILE = "data.pth"
torch.save(data, FILE)
print(f'training complete. file saved to {FILE}')

Base.html-

Chatbot For College Website 57


<!DOCTYPE html>
<html lang="en">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<head>
<title>GNITS</title>
<link href="https://fonts.googleapis.com/css?family=Montserrat|Ubuntu"
rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Aboreto&display=swap"
rel="stylesheet">
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet" integrity="sha384-
gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/
vI1Bx" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-
awesome/6.1.2/css/all.min.css"
integrity="sha512-
1sCRPdkRXhBV2PBLUdRb4tMg1w2YPf37qatUFeS7zlBy7jJI8Lf4VHwWfZZf
pXtYSLy85pkm9GaYVYMfw5BC1A=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKt
QBHUuLZ9AsSv4jD4Xa"crossorigin="anonymous"></script>
</head>
<body>
<section class="colored-section" id="title">
<div class="container">
<nav class="navbar navbar-expand-lg navbar-dark">
<img class="navbar-brand" src="https://www.gnits.ac.in/wp-
content/uploads/2020/10/logo-white-new.png">

Chatbot For College Website 58


<button class="navbar-toggler" type="button" data-toggle="collapse" data-
target="#navbarTogglerDemo02">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse" id="navbarTogglerDemo02">


<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="#footer">Contact</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#cta">About Us</a>
</li> </ul>
</div> </nav>
</section>
<div class="row1">
<div class="col1"><br><br>
<img width="650px" height="350px" src="https://www.gnits.ac.in/wp-
content/uploads/2020/08/infra1.jpg">
</div>
<div class="col1"
style="color:black"><br><br><br><br><center><h1>WELCOME TO
GNITS</h1><br>
<h5>G. Narayanamma Institute of Technology Science (for Women),
Hyderabad Is Committed to Imparting Quality Education and Training for
Women Empowerment in the Field of “engineering and Technology” and to
Satisfy Applicable Requirements. GNITS Is the Top Women's Engineering

Chatbot For College Website 59


College in Hyderabad Which Is Leading the Future for Women in Engineering
and Technology.</h5></center>
</div>
</div>
</div>
</div>
<section class="white-section" id="pricing">
<h2 class="section-heading">COURSES</h2>
<div class="row row-cols-1 row-cols-lg-3 g-4">
<div class="col">
<div class="card h-100">
<img src="https://manavrachna.edu.in/wp-content/uploads/2018/01/CSE-
with-Specialization-in-Digital-Tranformation-Engineering.jpg" class="card-img-
top h-50 " alt="1">
<div class="card-body">
<h5 class="card-title">Computer Science & Engineering</h5>
<a href="https://www.gnits.ac.in/computer-science-engg/computer-science-
engineering/" class="btn btn-primary">Click here</a>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<img src="https://encrypted-
tbn0.gstatic.com/images?q=tbn:ANd9GcTBBoVdqq6RCPP8y5aPegBXHv50Ob9
dMY5mmw&usqp=CAU" class="card-img-top h-50" alt="2">
<div class="card-body">
<h5 class="card-title">Informtion technology</h5>
<a href="https://www.gnits.ac.in/information-technology/" class="btn btn-
primary">Click here</a>
</div>

Chatbot For College Website 60


</div>
</div>
<div class="col">
<div class="card h-100">
<img src="https://encrypted-
tbn0.gstatic.com/images?q=tbn:ANd9GcTnUQ_BJb8To8Ailg43S57hy8QzZFhIw
aTgww&usqp=CAU" class="card-img-top h-50" alt="3">
<div class="card-body">
<h5 class="card-title">Electronics and Communications Engineering</h5>
<a href="https://www.gnits.ac.in/electronics-communication-engineering/"
class="btn btn-primary">Click here</a>
</div>
</div>
</div>
<div class="col">
<div class="card-body">
<h5 class="card-title">Electrical and Electronics Engineering</h>
<a href="https://www.gnits.ac.in/electrical-electronics-engineering/"
class="btn btn-primary">Click here</a>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<img src="https://encrypted-
tbn0.gstatic.com/images?q=tbn:ANd9GcSAV9FN4XqVXplPARXk6JwVdBagfb
Ta6QqKyw&usqp=CAU" class="card-img-top h-50" alt="5">
<div class="card-body">
<h5 class="card-title">Electronics and Telecommunication Engineering
programme</h5>

Chatbot For College Website 61


<a href="https://www.gnits.ac.in/electronics-telematics-engineering/"
class="btn btn-primary">Click here</a>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<img src="https://encrypted-
tbn0.gstatic.com/images?q=tbn:ANd9GcSvcVEjLBvXFkW8ZRBUY-
pG9xkxmaDaVHoGfw&usqp=CAU" class="card-img-top h-50" alt="6">
<div class="card-body">
<h5 class="card-title">Computer Science and Technology</h5>
<a href="https://www.gnits.ac.in/computer-science-and-technology/"
class="btn btn-primary">Click here</a>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<img src="https://encrypted-
tbn0.gstatic.com/images?q=tbn:ANd9GcRSbHUa5WcEG89Jw9JQ5zbn9fslK-
inKarL_g&usqp=CAU" class="card-img-top h-50" alt="7">
<div class="card-body">
<h5 class="card-title">Computer Science & Engineering (Data
Science)</h5>
<a href="https://www.gnits.ac.in/cse-ds/" class="btn btn-primary">Click
here</a>
</div></div>
</div>
<div class="col">
<div class="card h-100">

Chatbot For College Website 62


<img src="https://encrypted-
tbn0.gstatic.com/images?q=tbn:ANd9GcSrpnwQNnITolC6cs7bI3IRpSJR3XLQV
8zDlw&usqp=CAU" class="card-img-top h-50" alt="8">
<div class="card-body">
<h5 class="card-title">CSE (Artificial Intelligence & Machine
Learning)</h5>
<a href="https://www.gnits.ac.in/cse-ai-and-ml/" class="btn btn-
primary">Click here</a>
</div></div>
</div>
<div class="col">

<div class="card-body">
<h5 class="card-title">Business Management for Women</h5>
<a href="https://soim.edu.in/" class="btn btn-primary">Click here</a>
</div></div>
</div></div>
</section>
<section class="colored-section about" id="cta">
<div class="container-fluid">
<h2 class="section-heading">Accreditation's & Affiliations</h2>
<div class="row2">
<div class="column2">
<img src="https://www.gnits.ac.in/wp-content/uploads/2020/08/NIRF2020-
1.jpg"" alt="Snow" style="width:100%">
</div>
<div class="column2">
<img src="https://www.gnits.ac.in/wp-content/uploads/2020/08/NACC.jpg"
alt="Forest" style="width:100%">
</div>
<div class="column2">

Chatbot For College Website 63


<img src="https://www.gnits.ac.in/wp-content/uploads/2020/08/NBA.jpg"
alt="Mountains" style="width:100%">
</div>
<div class="column2">
<img src="https://www.gnits.ac.in/wp-content/uploads/2020/08/IEEE.jpeg"
alt="Mountains" style="width:100%">
</div>
<div class="column2">
<img src="https://www.gnits.ac.in/wp-content/uploads/2020/08/SET.jpg"
alt="Mountains" style="width:100%">
</div></div>
</div>
</section>
<div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="true">
<div class="carousel-indicators">
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-
slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-
slide-to="1" aria-label="Slide 2"></button>
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-
slide-to="2" aria-label="Slide 3"></button>

</div>
<div class="carousel-inner">
<div class="carousel-item active">
<img class="d-block w-100 image-fluid image-h-cust"
src="https://gnits.ac.in/wp-content/uploads/2020/09/7-scaled.jpg" alt="1">
</div>
<div class="carousel-item">
<img class="d-block w-100 image-fluid image-h-cust"
src=https://www.gnits.ac.in/wp-content/uploads/2023/01/SWE02507.jpg alt="2">

Chatbot For College Website 64


</div>
<div class="carousel-item">
<img class="d-block w-100 image-fluid image-h-cust"
src="https://www.gnits.ac.in/wp-content/uploads/2022/05/m4.jpg" alt="3">
</div>
<div class="carousel-item">
<img class="d-block w-100 image-fluid image-h-cust"
src="https://cdn.telanganatoday.com/wp-content/uploads/2021/09/GNITS-.jpg"
alt="4">
</div>
<div class="carousel-item">
<img class="d-block w-100 image-fluid image-h-cust"
src="https://www.gnits.ac.in/wp-content/uploads/2022/12/WhatsApp-Image-
2022-12-16-at-10.38.23-1024x682.jpeg" alt="5">
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-
target="#carouselExampleIndicators"
data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span> </button>
<button class="carousel-control-next" type="button" data-bs-
target="#carouselExampleIndicators"
data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<div class="container1">
<div class="chatbox">
<div class="chatbox__support">

Chatbot For College Website 65


<div class="chatbox__header">
<div class="chatbox__image--header">
<img src="https://img.icons8.com/color/48/000000/circled-user-female-
skin-type-5--v1.png" alt="image">
</div>
<div class="chatbox__content--header">
<h4 class="chatbox__heading--header">Chat support</h4>
</div></div>
<div class="chatbox__messages">
<div></div>
</div>
<div class="chatbox__footer">
<input type="text" placeholder="Write a message...">
<button class="chatbox__send--footer send__button">Send</button>
</div>
</div>
<div class="chatbox__button">
<button><img src="{{ url_for('static', filename='images/chatbox-icon.svg')
}}" /></button>
</div>
</div>
</div>
<footer class="white-section" id="footer">
<div class="container">
<a href="#"> <i class="social-icon fab fa-twitter"></i></a>
<a href="#"> <i class="social-icon fab fa-instagram"></i></a>
<a href="#"><i class="social-icon fas fa-envelope"></i></a>
</div>
</footer>
</body>
</html>

Chatbot For College Website 66


II. Bibliography / References
[1] A. Bhharathee, S. Vemuri, B. Bhavana, K. Nishitha, "AI-Powered
Student Assistance Chatbot," in 2023 International Conference on
Intelligent Data Communication Technologies and Internet of Things
(IDCIoT), Bengaluru, India, March 2023.
[2] S. Saraswat, S. Mishra, V. Mani, S. Priya, "GALGOBOT – The
College Companion Chatbot," in Proceedings of the 2021 5th
International Conference on Intelligent Computing and Control
Systems (ICICCS), Madurai, India, May 2021.
[3] R. Parkar, Y. Payare, K. Mithari, J. Nambiar, J. Gupta, "AI And
Web-Based Interactive College Enquiry Chatbot," in 2021 13th
International Conference on Electronics, Computers and Artificial
Intelligence (ECAI), Pitesti, Romania, August 2021.

Chatbot For College Website 67

You might also like