Here is my Senior Design Project that I implemented to graduate from Computer Engineering.

Overview

rasa-travel-chatbot

Ekran Resmi 2021-06-20 15 44 14

Here is my Senior Design Project that I implemented to graduate from Computer Engineering. It is a chatbot made in RASA and helps the user to plan their vacation in the Turkish language. In order to plan the user's vacation, it provides reservations by asking various questions for hotel, flight, or event.

How to Run the Project?

  1. Create a virtual environment of python 3.6 or greater.
  2. Navigate to the rasa directory. Run the command: rasa train
  3. After the model is trained, launch the rasa core server: rasa run -m models --enable-api
  4. Launch the rasa actions server in another terminal: rasa run actions
  5. Navigate to the chatbot/backend. Run the command: python route.py
  6. Launch the frontend on the local python http server under the interface directory: python -m http.server

Interface

Here is an example conversation for booking an event in Turkish.

Ekran Resmi 2021-06-20 15 00 44

In this figure, the chatbot is trying to learn which event the user wants to go to after the greeting.

Ekran Resmi 2021-06-20 15 00 57

After that the chatbot asks for how many tickets the user wants and tries to make the reservation by asking for an e-mail.

Ekran Resmi 2021-06-20 15 01 06

Finally, the chatbot tells the user how many tickets it has bought and sent to which e-mail address and asks if the user wants to take another action. If the user says no, chatbot finishes the conversation by saying goodbye.

Turkish Dataset

Due to the small number of chatbots in the Turkish language, Turkish datasets are also less. For this reason, we prepared a Turkish dataset from scratch while doing this project. In order to do this, we translated the English datasets into Turkish using the Google API. In the end, we have 93 intents 29 entities in total, and an average of 7 sentences for each intent.

Ekran Resmi 2021-06-20 15 08 45

RASA

Rasa is an open source python library for constructing conversational software with minimal (or no) initial training data. It consists of two parts: Rasa NLU and Rasa Core. Dialogue management problem can be handled as a classification problem. At each iteration, Rasa Core predicts which action to take from a predefined list. On the other hand, Rasa NLU is a tool for natural language understanding. It combines a number of natural language processing and machine learning libraries in a consistent API.

Ekran Resmi 2021-06-20 15 17 46

First a message is received and passed to Rasa NLU to extract the intent, entities, and the other structured information. Then the conversation state saved in the tracker which receives a notification that a new message has been received. In step 3, the policy receives the current state of the tracker and chooses which action to take next. Then chosen action is logged by the tracker and executed. If the predicted action is not ‘listen’, go back to step 3. After the first step all the remaining steps are performed by Rasa Core.

Ekran Resmi 2021-06-20 15 17 46

Here is an example of intent classification and entity extraction for a possible input sentence that chatbot can receive from user in this project.

Ekran Resmi 2021-06-20 15 45 03

Best Configuration

We used pre-trained language model BERT for our pipeline. We compared three different pipeline configurations: a light configuration, a configuration using ConveRT, and a heavy configuration that included BERT. In each case we’re training a DIETClassifier for combined intent classification and entity recognition for 200 epochs, but in the light configuration we have CountVectorsFeaturizer, which creates bag-of-word representations for each incoming message at word and character levels. In the end, we chose config-light as the configuration of the chatbot.

Results of the Configurations

Ekran Resmi 2021-06-20 15 21 16

Ekran Resmi 2021-06-20 15 21 27

In the images below, there are confusion matrices created by each configuration for intent classification and entity extraction in turn.

config-light:

Ekran Resmi 2021-06-20 15 26 15 Ekran Resmi 2021-06-20 15 26 36 Ekran Resmi 2021-06-20 15 27 25 Ekran Resmi 2021-06-20 15 27 46

config-convert:

Ekran Resmi 2021-06-20 15 30 19 Ekran Resmi 2021-06-20 15 30 30 Ekran Resmi 2021-06-20 15 30 42 Ekran Resmi 2021-06-20 15 30 54

config-heavy:

Ekran Resmi 2021-06-20 15 32 01 Ekran Resmi 2021-06-20 15 32 12 Ekran Resmi 2021-06-20 15 32 22 Ekran Resmi 2021-06-20 15 32 32

You might also like...
CoreSE - basic of social Engineering tool
CoreSE - basic of social Engineering tool

Core Social Engineering basic of social Engineering tool. just for fun :) About First of all, I must say that I wrote such a project because of my int

Feature engineering library that helps you keep track of feature dependencies, documentation and schema

Feature engineering library that helps you keep track of feature dependencies, documentation and schema

Class XII computer science project.

Computer Science Project — Class XII Kshitij Srivastava (XI – A) Introduction The aim of this project is to create a fully operational system for a me

Project aims to map out common user behavior on the computer

User-Behavior-Mapping-Tool Project aims to map out common user behavior on the computer. Most of the code is based on the research by kacos2000 found

3D Printed Flip Clock Design and Code
3D Printed Flip Clock Design and Code

Smart Flip Clock 3D printed smart clock that puts a new twist on old technology. Making The Smart Flip Clock The first thing that must be done for thi

An app about keyboards, originating from the design of u/Sonnenschirm

keebapp-backend An app about keyboards, originating from the design of u/Sonnenschirm Setup Firstly, ensure that the environment for python is install

A collection of design patterns and idioms in Python (With tests!).

Python Patterns Help the project financially: Donate: https://smartlegion.github.io/donate/ Yandex Money: https://yoomoney.ru/to/4100115206129186 PayP

An addin for Autodesk Fusion 360 that lets you view your design in a Looking Glass Portrait 3D display

An addin for Autodesk Fusion 360 that lets you view your design in a Looking Glass Portrait 3D display

Random pass word generator made with python. PyQt5 module is used to design GUI.

Differences in this GUI program : Default titlebar removed Custom Minimize,Maximize and Close Buttons Drag & move window from any point Program work l

Owner
Ezgi Subaşı
Ezgi Subaşı
An awesome list of AI for art and design - resources, and popular datasets and how we may apply computer vision tasks to art and design.

Awesome AI for Art & Design An awesome list of AI for art and design - resources, and popular datasets and how we may apply computer vision tasks to a

Margaret Maynard-Reid 20 Dec 21, 2022
System Design Assignments as part of Arpit's System Design Masterclass

System Design Assignments The repository contains a set of problem statements around Software Architecture and System Design as conducted by Arpit's S

Relog 1.1k Jan 9, 2023
A data engineering project with Kafka, Spark Streaming, dbt, Docker, Airflow, Terraform, GCP and much more!

Streamify A data pipeline with Kafka, Spark Streaming, dbt, Docker, Airflow, Terraform, GCP and much more! Description Objective The project will stre

Ankur Chavda 206 Dec 30, 2022
👀 nothing to see here

Woofy Woofy is blue dog companion token of YFI (Wifey) It utilizes a special Woof bonding curve which allows two-way conversion between the tokens. Th

Yearn Finance 36 Mar 14, 2022
Here, I have discuss the three methods of list reversion. The three methods are built-in method, slicing method and position changing method.

Three-different-method-for-list-reversion Here, I have discuss the three methods of list reversion. The three methods are built-in method, slicing met

Sachin Vinayak Dabhade 4 Sep 24, 2021
Beginner Projects A couple of beginner projects here

Beginner Projects A couple of beginner projects here, listed from easiest to hardest :) selector.py: simply a random selector to tell me who to faceti

Kylie 272 Jan 7, 2023
Here You will Find CodeChef Challenge Solutions

Here You will Find CodeChef Challenge Solutions

kanishk kashyap 1 Sep 3, 2022
With Christmas and New Year ahead, it is time for some festive coding. Here is a Christmas Card for you all!

Christmas Card With Christmas and New Year ahead, it is time for some festive coding! Here is a Christmas Card for you all! NOTE: I have not made this

CodeMaster7000 1 Dec 25, 2021
HPomb Is Socail Engineering Tool , Used For Bombing , Spoofing and Anonymity Available For Linux And Android(Termux)

HPomb v2020.02 Coming Soon Created By Secanonm HPomb Is Socail Engineering Tool , Used For Bombing , Spoofing and Anonymity Available For Linux And An

Secanonm 10 Jul 25, 2022
Group P-11's submission for the University of Waterloo's 2021 Engineering Competition (Programming section).

P-11-WEC2021 Group P-11's submission for the University of Waterloo's 2021 Engineering Competition (Programming section). Part I Compute typing time f

TRISTAN PARRY 1 May 14, 2022