Professional Documents
Culture Documents
Aa
Aa
Aa
It is the dream of millions of students to study in a foreign university. They leave no stone
unturned in their journey of discovering their perfect university. Often times, it can be a
daunting task to find out about the universities to make a well informed decision. This project is
an attempt to make this task as simple as possible. We developed a conversational chatbot
which would cater to the queries of the prospective students. Deployed on Facebook
messenger platform, this acts as a familiar medium for the current generation of students to
learn about their university. This project also doubles as a lead managing service for the
university admission departments by collecting and maintaining the database of the
prospective students.
INTRODUCTION
LITERATURE REVIEW
Studies show that people are intrigued by chatbots and find it amusing to use them. It is easier
to text to a chatbot as it can work with short messages (Hill et al, 2015). This makes it easier for
students who are in a hurry to clear a doubt they have on a university. It saves them from going
through the hurdles of the formal procedure. (Holtgraves et al, 2007) suggests that
conversational bots have a very good potential to be deployed on websites as an initial
communication medium.
Prospective international students may come up with new queries and may want a quick
answer. But the admission councilor or university may not be available at the moment due to
time zone constraints. Though most of the information is available online on websites, it might
take considerable effort and time to find an answer for every little doubt they have. Chatbots
are the perfect solution in these situations. Chatbots provide a very quick way to find answers
(Brandtzaeg et al, 2017). One more advantage with the chatbots is the ease of accessibility.
Students can open up their phone and talk with the chatbot the same way they talk with their
friends online. We wanted the students to have a natural and familiar medium to access the
bot. We found no better solution than Facebook with 2.41 billion monthly active users
(Company Info, Facebook, 2019).
It has been found that people have a good acceptance of computer bots (Clément et al, 2015).
Researchers also found that people do not find any difference if they are communicating with a
person or a bot (Edwards et al, 2016). Universities can safely transition to this new chatbot
assisted admissions system smoothly without much change in the way they interact with their
prospective students
METHODOLOGY
Developing a chatbot from scratch is a mammoth task. We sought to utilize existing chatbot
developing frameworks to aide us in this project. These frameworks provide a structure to the
project. Chatbot developing frameworks contain necessary programming libraries and a set of
guidelines which help streamline the development process.
Our research presented with a good number of options for the chatbot frameworks.
Frameworks like Microsoft Bot Framework, Dialogflow, IBM Watson, RASA were found to be
interesting choices. We decided to use RASA for this project. RASA is an open source framework
and is developed using Python programming language. This makes it simpler for any college to
implement this chatbot on their website.
Software Installation
Rasa Framework needs a set of prerequisite software in order to fully function. These include
the Rasa framework itself and few other dependencies which support Rasa.
1) As we have worked on Windows, we have installed the Visual C++ Build tool. We
learned that this is required for some Python packages.
2) We have Anaconda installed on our system so both Rasa and Rasa X can be installed
using pip command
pip install rasa
pip install rasa x
3) We check for Python and find that we already have Python version 3.7 installed in our
system.
Structure of the Chatbot
## intent:enter_data
- my email is [email@rasa.com](email)
- my email is [markjobs@ibm.com](email)
- my name is [preethi](person_name)
- I am [Romain](person_name)
A) Writing Stories
Now we teach our bot how to respond to user messages. This is known as dialogue
management and is handled by Rasa core. A story is a conversation between a user and the
chatbot. The user’s inputs are expressed as intents and entities while the responses of the
chatbot are expressed as what we call the actions. Real conversational data is provided to the
core model in form of stories. Our model’s stories are stored in stories.md file. Below is an
example of training data from the file:
## Contact Admissions
* contact_admin
- utter_moreinformation
- admin_form
- form{"name": "admin_form"}
- slot{"requested_slot": "person_name"}
- form: admin_form
- slot{"person_name": "Manohar"}
- slot{"requested_slot": "email"}
- form: admin_form
- slot{"email": "lol-677@hotmail.com"}
- slot{"requested_slot": "program"}
- form: admin_form
- slot{"program": "MSC"}
- slot{"requested_slot": "intake"}
- slot{"intake": "SPRING"}
- slot{"intake": "SPRING"}
- form{"name": null}
- slot{"requested_slot": null}
- utter_confirm_adminrequest
- action_deactivate_form
- form{"name": null}
- slot{"requested_slot": null}
- action_restart
Format of a story
## A story starts with two hashes followed by a name. Giving a relevant name to the
story ( ‘Contact admissions’ in the above example) helps to debug later but there is no
rule as such for naming a story.
- Actions excuted by the chatbot are shown by lines starting with hyphen and contain
the name of the action.
Events returned by an action are written immediately after that action. If an actions
returns a slotset event, this is shown as slot{“slot_name”: “value”}. An example from
our story above would be slot{"intake": "SPRING"}.
B) Defining a Domain
Domain is where our bot lives and operates. This includes what user inputs it expects , what
actions should it be able to predict , how to respond and what information to store. The domain
consists of five key parts :
Intents
Slots
Entities
Actions
Templates
As we have already discussed the first two in the previous section, let us now focus on the
others. The table below defines each of them briefly.
template
template strings for the things your bot can say
s
entities:
- intake
- program
- person_name
intents:
- contact_admin
- signup_newsletter
- human_handoff
- ask_builder
- ask_weather
- ask_howdoing
- ask_whatspossible
- ask_whatisrasa
- ask_isbot
slots:
person_name:
type: unfeaturized
auto_fill: false
program:
type: unfeaturized
auto_fill: false
intake:
type: unfeaturized
auto_fill: false
email:
type: unfeaturized
auto_fill: false
templates:
utter_ask_program:
- text: "Give me a moment to note it down ✍️..Meanwhile please enter your program
(MSc/MBA) of interest"
utter_ask_email:
utter_response_why_email:
- text: "I need your email address to sign you up to the admissions newsletter."
- text: "I need it so that I can sign you up to the admissions newsletter."
utter_ask_continue_admin:
utter_confirm_adminrequest:
- text: "Thanks a bunch {person_name}! Our admissions team will reach out to you
with details of the {program} program for the {intake} intake.! ✉️"
actions:
- utter_greet
- utter_ask_goal
- utter_docu
- utter_contact_email
- utter_no_speak
- utter_out_of_scope
- utter_possibilities
forms:
- admin_form
- action_email_campaign
C) Custom actions:
An action can run just about anything you want from booking a flight to checking your bank
balance. The endpoint should be a webserver that reacts to this call and runs the code.
For custom actions, the action name is the what use to return from the name method of the
custom action class
The file that contains our actions is called actions.py
An example of action from the actions.py file of our chatbot is shown below:
import logging
import json
import logging.config
class emailCampaign(FormAction):
def name(self):
return "action_email_campaign"
@staticmethod
def required_slots(tracker):
return [
"email"
def slot_mappings(self):
- an extracted entity
- a whole message
self.from_text(intent="enter_data")]}
email = tracker.get_slot("email")
msg = EmailMessage()
msg['To'] = email
smtp.login('JediBSchool@gmail.com', '#####')
smtp.send_message(msg)
dispatcher.utter_template("utter_sent_email", tracker)
return []
We define a method called “emailCampaign”. The purpose of this custom action is to collect
the email of the user and sends them an email automatically. To link this action with the
chatbot we added the action “action_email_campaign” to the list of actions in our
domain.yml file. We also added this action to the flow of stories in our stories.md file.
Lastly, we enable the custom action server using the endpoints file to let Rasa use this custom
action. Rasa calls an endpoint which we specify, when a custom action is predicted.
Shown below is our endpoints file called endpoints.yml
action_endpoint:
url: "http://localhost:5055/webhook"
D) Slots :
Slots are our chatbot’s memory. We use slots when we want our chatbot to remember
something and use it later in the conversation.
In our chatbot, we have slots for four values that we want our bot to remember :
Forms :
An important feature of Rasa are the Rasa forms which help us to design the flow of stories
easily with reliable slot filling. For example, our bot can book a call for the prospective students
with the university’s admissions team. Before scheduling the call, however, the bot needs to
know some important details like the email, program of interest, etc. To model conversations
like this will be difficult using slots alone, so we use Rasa forms which can be modelled with one
single story and ensure that our chatbot has all the required details collected before proceeding
further.
For our bot, we have used a Form Action defined in the class ‘adminForm’. This form action
collects student data and stores the data in a google sheet through API.
Model configuration
The configuration file defines the NLU and core components that our model uses. In our case,
we have used the supervised embedding pipeline. An NLU pipeline allows you to customize
your model. Our model’s configuration is stored in config.yml file and below is an example from
the file:
language: "en"
pipeline: "supervised_embeddings"
# Configuration for Rasa core
policies:
-name: AugmentedMemoizationPolicy
max_history: 6
- name: MemoizationPolicy
- name: KerasPolicy
- name: MappingPolicy
- name: FormPolicy
rasa train
To start our action server we run the following command from the command prompt:
rasa interactive
We then tested the bot using Rasa X after quitting the rasa interactive terminal. (It is to be
noted that, the actions need to be running parallelly for the chatbot to work)
rasa x
Here’s the screenshot of the Rasa x user interface for our chatbot:
Rasa X provides an interactive user interface to understand and correct the real time
conversations. This helps to train the chatbot using the conversation data from the actual users
which in turn improves the chatbot’s performance.
Steps :
Before we begin, we need to complete a few tasks on Facebook.
A Facebook page will work as an identity to our chatbot. We have created a page with a
fictional school name called Jedi School of Business. Here’s the link to our Facebook
page : https://www.facebook.com/Jedi-School-of-Business-113232816727121/
3) Webhook Configuration:
We opened the settings under for Messenger, scrolled down and found Webhooks.
Webhooks are a way for students all over the world access our Chatbot, which runs
based out of our local machine.
We clicked on Subscribe to Events option.
We open Settings for Messenger under Products
We then select our newly created Jedi School of Business page to subscribe our
app Yoda to.
We copy the token that appears in the ‘Page Access Token’ field
That’s all! The Messenger Platform will now be able to send the webhook events we have
subscribed to for our School’s page to our webhook.
6) Rasa Credentials
We have added our Facebook credentials to a credential file which Rasa will use during
integration. The credential file should contain the following:
Verify - We have used “rasa-bot” to verify our chatbot.
Secret - We copy the app secret value from our Facebook app chatbot dashboard.
facebook:
verify: "rasa-bot"
secret: "6bXXdc2c24c5cXX99ceXXffe62e"
page-access-token: "EAAGyyJIXXXXXXD"
After deploying a bot which can handle FAQ’s about the university we improvised it a bit
by training it to handle small talk from users for questions like “What’s the time now?”,
“Can you suggest me a restaurant?” , “Who created you?” and so on.
The next step was to utilise the Rasa actions effectively. After some brainstorming, we
decided that we can add two very useful features to our bot. They are:
1) Book a call with the admissions team : It is common for prospective students to
want to call an admission team member but often, they either don’t get the right
contact details. Even if they get to connect with the admissions team, a lot of time
is wasted in collecting the student’s information the call. We know that the
admissions team is usually very busy handling a lot of student queries especially
during the major intake periods of the university. In such a situation the student is
forced to wait for a few more days/hours before their data is processed and they
get their queries answered.
We can solve this problem if we already collect the student information relevant
to his query like their program of interest, email, etc and store it in the school’s
database.
The admission team can then look up the data and contact the student with the
required information.
"type": "service_account",
"project_id": "yoda-1571913072086",
"private_key_id": "xxxx448d2d347d7854ad116089d32dxxxx",
"client_email": "yoda-838@yoda-1571913072086.iam.gserviceaccount.com",
"client_id": "10768xxx44633406”,
“auth_uri”: “https://accounts.google.com/o/oauth2/auth”,
“token_uri”: “https://oauth2.googleapis.com/token”,
“auth_provider_x509_cert_url”: “https://www.googleapis.com/oauth2/v1/certs”,
“client_x509_cert_url”: “https://www.googleapis.com/robot/v1/metadata/x509/yoda-
838%40yoda-1571913072086.iam.gserviceaccount.com”
}
We now open google sheets and share it with the client email address mentioned
above.
Lastly, we code an action in Python to fetch the slot values from the Rasa form
and save them in the Google sheets.
We tested to see if it worked by chatting with our bot on Facebook and providing
all the details it asked us.
We then opened the Google sheets associated with the School’s account.
Here’s the screenshot of the Google Sheet which was updated by the user’s
details.
2) For the next big thing, we wanted the bot to subscribe the students to the
university’s admission newsletter. Most universities across the world have an
admissions newsletter which when subscribed by the student, keeps them
informed about the admission events, campus updates etc.
SURVEY
We conducted a survey to test the viability of our chatbot. We created a Google form with a
collection of questions to get an opinion on our project. This survey was targeted at a group of
students who have/ or going to have a study abroad experience. Through this survey, we aim to
understand the problems faced by students when trying to find answers to their questions
about universities and how our chatbot could have made that experience simpler.
RESULTS
We personally experienced roadblocks while trying to find the right information at the right
time using traditional means. We developed this chatbot to help students facing similar
problems.
We developed a conversational chatbot using the RASA framework to cater to the queries of
international students. Readily available information helps create a connect between the
student and the university. This chatbot can easily be deployed by any university which is trying
to lower the overhead on their admissions team. Our chatbot, Yoda, can automate the data
collection process of the prospective students and assists the admissions team in pursuing
leads.
CONCLUSION
We received 26 completed responses from students all over the world. All of the respondents
are past/current/prospective international students and a majority of them were in pursuit of
Master’s degree (80.8%). Notable findings from our survey:
University admissions office and college website was found to be their primary sources of
information. 57.7% of the respondents agreed to having faced difficulties in finding the
information about the University.
After using our chatbot, Yoda, majority of the students agreed that they could find the
information quicker and easier than compared to traditional means.
76.9 percent of the students felt that a chatbot like Yoda would have helped them in accessing
information about the university easily instead of looking up multiple websites and forums.
After analyzing the overall results of the survey, we found that majority of the respondents
have an affinity for the chatbots and welcome the idea of having chatbots for their universities.
84.6 percent of the respondents appreciated the idea of having a chatbot like Yoda for their
university.
These results helped in quantifying the validity of this project. In this fast paced life, time is of
utmost value and students expect information in a blink of an eye. This project provides the
students with a familiar medium to access the information they eagerly seek and help them
make informed decisions about one of their biggest life choices. We hope that universities
implement similar chatbots which provide immense value to both the students and the
administration staff, making it a win-win situation.
LIMITATIONS AND FURTHER SCOPE
We could not find university APIs to use in our project. Using a university API would have made
the development process easier as we would then get the FAQ’s directly instead of researching
and writing our own FAQ’s.
Providing more conversations in terms of both the volume and variety from the users would
increase the bot’s ability to make better sense of new and unseen user inputs.
The bot can further be enhanced with additional features like helping the students find the
right program, tracking the application status of the students, and connecting the them with
their faculty.
REFERENCES
http://data.uis.unesco.org/index.aspx?queryid=169
Jennifer Hill, W. Randolph Ford, Ingrid G. Farreras, Real conversations with artificial
intelligence: A comparison between human–human online conversations and human–
chatbot conversations, Computers in Human Behavior, Volume 49, 2015, Pages 245-250,
ISSN 0747-5632, https://doi.org/10.1016/j.chb.2015.02.026.
T.M. Holtgraves, S.J. Ross, C.R. Weywadt, T.L. Han, Perceiving artificial social agents,
Computers in Human Behavior, Volume 23, Issue 5, 2007, Pages 2163-2174, ISSN 0747-
5632, https://doi.org/10.1016/j.chb.2006.02.017.
Brandtzaeg P.B., Følstad A. (2017) Why People Use Chatbots. In: Kompatsiaris I. et al.
(eds) Internet Science. INSCI 2017. Lecture Notes in Computer Science, vol 10673.
Springer, Cham
https://newsroom.fb.com/company-info/
Maxime Clément, Matthieu J. Guitton, Interacting with bots online: Users’ reactions to
actions of automated programs in Wikipedia, Computers in Human Behavior, Volume
50, 2015, Pages 66-75, ISSN 0747-5632, https://doi.org/10.1016/j.chb.2015.03.078.
Chad Edwards, Austin J. Beattie, Autumn Edwards, Patric R. Spence, Differences in
perceptions of communication quality between a Twitterbot and human agent for
information seeking and learning, Computers in Human Behavior, Volume 65, 2016,
Pages 666-671, ISSN 0747-5632, https://doi.org/10.1016/j.chb.2016.07.003.
https://rasa.com/docs/rasa-x/
https://forum.rasa.com/
https://github.com/RasaHQ