SlideShare a Scribd company logo
1 of 9
Download to read offline
A Guide to Rasa and Rasa X
Vasishtha Ingale
Software Engineer
Vasishtha is a Software Engineer at Nitor Infotech. He has a keen interest in
assimilating statistical approaches for Data Science. He is p... Read More
I hope you read and enjoyed my previous blog titled ‘Introduction to
Rasa X’ since it is a precursor to this one. In case you haven’t, you can
read it here.
In this blog, I am going to lead you through the installation, folder
structure, controls, and features of Rasa as well as Rasa X to develop an
assistant.
Let’s first dive into installing Rasa.
Installation of Rasa
To install Rasa, you require Python 3.7 or Python 3.8. Firstly, you need to
create and activate a new virtual environment by giving this command:
C:> python3 -m venv ./rasaenv
Activate it with: C:> .rasaenvScriptsactivate
Once the installation is done, generate a folder structure for the Rasa
project by typing rasa init in command prompt.
After initializing the structure, a developer can start customizing the
basic chatbot that is included in the initialized folder.
Training Data in Different Files of Rasa
Folder
1. NLU File: Intent is a class for a given set of examples which helps the
assistant identify the user query. These examples are specified in the
nlu.yml file. For example, if a user wants to stop a conversation, then you
can define the examples as follows.
2. Domain file: The file domain.yml includes the following things:
1. Entities and slots: These are examples like City, Size of Pizza, Email
Addresses, etc.
2. Form: This includes a structure to fill information automatically from user input
3. Responses: Here all the possible responses are defined, and a name is given
to each one of them. Responses are named starting with utter for e.g. If a
response is ‘order’, then conventionally it is written as utter_order.
3. Stories file: This file includes all the conversational flows designed
and developed by a developer which helps the chatbot to make
decisions in accordance with the stories. Stories are some ideal paths
which illustrate the flow of the conversation can be. By gaining expertise
in writing these stories, you can improve the performance of an
assistant.
4. Rules file: The rules.yml file has rules for a specific conversation. For
example, if a user wants something which is out of scope for the bot to
answer, then any rule can handle the situation. Once the training data is
updated, you must train the model on top of it which is saved in the
folder.
The following image shows the folder structure of a Rasa chatbot. Every
time the training is done, the new model is saved so all the past models
can also be utilized.
Now it’s time to explore the second tool in our arsenal – Rasa X!
Installation of Rasa X
For Rasa X installation in Windows OS, we need to first install the
Microsoft Visual C++ compiler. After that, we can go to the command
prompt, activate the virtual environment created while installing Rasa
and type the following command:
To check whether it has been installed correctly or not, navigate to the
chatbot folder, open the command prompt and type rasa x. It will open a
window in your default browser with GUI.
Features of Rasa X
1. Easy writing of training data:
Instead of writing the training examples in a code editor or IDE, you can
directly specify your data using GUI. In the above example, we defined
the book_flight intent and gave an example of what a user can say. You
can add as many examples as you want and save them.
2. Interactive learning:
Interactive learning involves looking into what the intent was (identified
by the bot) and then correcting it and manually guiding the bot to give
responses. This way the bot creates automatic stories and can train
itself further.
3. Records all previous conversations:
To analyze earlier conversations and their flow and performance, Rasa X
stores all conversations. In a live deployment monitoring user response
and accordingly making changes in the training stories is a crucial step
to have a successful chatbot in place.
4. Visualizes what’s going on in backend:
The above image shows the Rasa X chatbot in the image. When the user
said ‘Hello’, you can see that the bot identified the user intent as ‘greet’
which can be seen through this beautiful UI. Also, the next intent is to
book a flight and then at the end you can see that a form is initialized to
ask the user about the city from which he wants to book a flight and so
on.
5. Slots identification:
In the above example, once the user has confirmed that he wants to
book a flight and the form has started to fill, the assistant asks about the
departing city and automatically extracts the city from user input text
with a confidence of (1.0) which means 100 percent sure.
6. Buttons:
In the above image, you can see that once the user gives all the details
about cities that he wants to depart and land at, the assistant gives a
query in backend and communicates the dates available and shows the
buttons of available dates and asks the user to select a suitable date
which makes the conversation very easy. In case the user is not
interested in these dates, then the bot can identify it and will
recommend some new flights or just close the conversation as per the
story.
7. Actions:
actions.py is a Python file which handles connection with external
sources like database, csv file or API. It tracks the slots and can read or
write to files in accordance.
All the actions are defined as a class in the file. The above code snippet
is an example of saving all the slot information in a csv file once the
conversation is done.
I hope that after reading this blog, you are quite familiar with the
controls and features of Rasa and Rasa X, and a sample as well. Now
once you have understood the structure, you can develop and customize
a chatbot according to your use case.
Do read this case study about how we came up with an AI-based chatbot
solution to efficiently log, track, and monitor compliance requests for a
leading European business management solutions company.
Feel free to get in touch with us at Nitor Infotech if you’d like to share your
experience and suggestions. You can also discover more about how
artificial intelligence and machine learning can make a real difference
for your products, solutions, and services here.

More Related Content

Similar to a guide to install rasa and rasa x | Nitor Infotech

Frequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answersFrequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answersnishajj
 
OpenWhisk by Example - Auto Retweeting Example in Python
OpenWhisk by Example - Auto Retweeting Example in PythonOpenWhisk by Example - Auto Retweeting Example in Python
OpenWhisk by Example - Auto Retweeting Example in PythonCodeOps Technologies LLP
 
Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30
Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30
Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30MysoreMuleSoftMeetup
 
IRJET- Artificial Intelligence Based Chat-Bot
IRJET-  	  Artificial Intelligence Based Chat-BotIRJET-  	  Artificial Intelligence Based Chat-Bot
IRJET- Artificial Intelligence Based Chat-BotIRJET Journal
 
ChatGPT and Slack Integration with MuleSoft
ChatGPT and Slack Integration with MuleSoftChatGPT and Slack Integration with MuleSoft
ChatGPT and Slack Integration with MuleSoftshyamraj55
 
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...ijtsrd
 
IRJET- An Intelligent Behaviour Shown by Chatbot System for Banking in Ve...
IRJET-  	  An Intelligent Behaviour Shown by Chatbot System for Banking in Ve...IRJET-  	  An Intelligent Behaviour Shown by Chatbot System for Banking in Ve...
IRJET- An Intelligent Behaviour Shown by Chatbot System for Banking in Ve...IRJET Journal
 
The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018Amit Ashwini
 
Cs121 Unit Test
Cs121 Unit TestCs121 Unit Test
Cs121 Unit TestJill Bell
 
DynamicsPower! Melbourne AI for everyone: Virtual Agent & AI Builder
DynamicsPower! Melbourne AI for everyone: Virtual Agent & AI BuilderDynamicsPower! Melbourne AI for everyone: Virtual Agent & AI Builder
DynamicsPower! Melbourne AI for everyone: Virtual Agent & AI BuilderAndre Margono
 
How to build your in-house ChatGPT
How to build your in-house ChatGPT How to build your in-house ChatGPT
How to build your in-house ChatGPT Citynow Asia Inc
 
System design for Web Application
System design for Web ApplicationSystem design for Web Application
System design for Web ApplicationMichael Choi
 
LangChain Intro by KeyMate.AI
LangChain Intro by KeyMate.AILangChain Intro by KeyMate.AI
LangChain Intro by KeyMate.AIOzgurOscarOzkan
 
LanGCHAIN Framework
LanGCHAIN FrameworkLanGCHAIN Framework
LanGCHAIN FrameworkKeymate.AI
 
WhatsApp Chat Hacking/Stealing POC
WhatsApp Chat Hacking/Stealing POCWhatsApp Chat Hacking/Stealing POC
WhatsApp Chat Hacking/Stealing POCE Hacking
 
Saloni jaiswal mba-2nd semester_miniproject
Saloni jaiswal mba-2nd semester_miniprojectSaloni jaiswal mba-2nd semester_miniproject
Saloni jaiswal mba-2nd semester_miniprojectRohanSilvenia
 
Using pandas library for data analysis in python
Using pandas library for data analysis in pythonUsing pandas library for data analysis in python
Using pandas library for data analysis in pythonBruce Jenks
 

Similar to a guide to install rasa and rasa x | Nitor Infotech (20)

Frequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answersFrequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answers
 
OpenWhisk by Example - Auto Retweeting Example in Python
OpenWhisk by Example - Auto Retweeting Example in PythonOpenWhisk by Example - Auto Retweeting Example in Python
OpenWhisk by Example - Auto Retweeting Example in Python
 
Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30
Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30
Slack and ChatGPT Integration using MuleSoft | MuleSoft Mysore Meetup #30
 
IRJET- Artificial Intelligence Based Chat-Bot
IRJET-  	  Artificial Intelligence Based Chat-BotIRJET-  	  Artificial Intelligence Based Chat-Bot
IRJET- Artificial Intelligence Based Chat-Bot
 
ChatGPT and Slack Integration with MuleSoft
ChatGPT and Slack Integration with MuleSoftChatGPT and Slack Integration with MuleSoft
ChatGPT and Slack Integration with MuleSoft
 
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
Advanced Virtual Assistant Based on Speech Processing Oriented Technology on ...
 
IRJET- An Intelligent Behaviour Shown by Chatbot System for Banking in Ve...
IRJET-  	  An Intelligent Behaviour Shown by Chatbot System for Banking in Ve...IRJET-  	  An Intelligent Behaviour Shown by Chatbot System for Banking in Ve...
IRJET- An Intelligent Behaviour Shown by Chatbot System for Banking in Ve...
 
The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018The Guide to becoming a full stack developer in 2018
The Guide to becoming a full stack developer in 2018
 
Cs121 Unit Test
Cs121 Unit TestCs121 Unit Test
Cs121 Unit Test
 
DynamicsPower! Melbourne AI for everyone: Virtual Agent & AI Builder
DynamicsPower! Melbourne AI for everyone: Virtual Agent & AI BuilderDynamicsPower! Melbourne AI for everyone: Virtual Agent & AI Builder
DynamicsPower! Melbourne AI for everyone: Virtual Agent & AI Builder
 
How to build your in-house ChatGPT
How to build your in-house ChatGPT How to build your in-house ChatGPT
How to build your in-house ChatGPT
 
System design for Web Application
System design for Web ApplicationSystem design for Web Application
System design for Web Application
 
Raptor 2
Raptor 2Raptor 2
Raptor 2
 
LangChain Intro by KeyMate.AI
LangChain Intro by KeyMate.AILangChain Intro by KeyMate.AI
LangChain Intro by KeyMate.AI
 
LanGCHAIN Framework
LanGCHAIN FrameworkLanGCHAIN Framework
LanGCHAIN Framework
 
Ad507
Ad507Ad507
Ad507
 
WhatsApp Chat Hacking/Stealing POC
WhatsApp Chat Hacking/Stealing POCWhatsApp Chat Hacking/Stealing POC
WhatsApp Chat Hacking/Stealing POC
 
NEURAL NETWORK BOT
NEURAL NETWORK BOTNEURAL NETWORK BOT
NEURAL NETWORK BOT
 
Saloni jaiswal mba-2nd semester_miniproject
Saloni jaiswal mba-2nd semester_miniprojectSaloni jaiswal mba-2nd semester_miniproject
Saloni jaiswal mba-2nd semester_miniproject
 
Using pandas library for data analysis in python
Using pandas library for data analysis in pythonUsing pandas library for data analysis in python
Using pandas library for data analysis in python
 

More from servicesNitor

five best practices for technical writing
five best practices for technical writingfive best practices for technical writing
five best practices for technical writingservicesNitor
 
How to integrate salesforce data with azure data factory
How to integrate salesforce data with azure data factoryHow to integrate salesforce data with azure data factory
How to integrate salesforce data with azure data factoryservicesNitor
 
substrate: A framework to efficiently build blockchains
substrate: A framework to efficiently build blockchainssubstrate: A framework to efficiently build blockchains
substrate: A framework to efficiently build blockchainsservicesNitor
 
The three stages of Power BI Deployment Pipeline
The three stages of Power BI Deployment PipelineThe three stages of Power BI Deployment Pipeline
The three stages of Power BI Deployment PipelineservicesNitor
 
IP Centric Solutioning Whitepaper | Nitor Infotech
IP Centric Solutioning Whitepaper | Nitor InfotechIP Centric Solutioning Whitepaper | Nitor Infotech
IP Centric Solutioning Whitepaper | Nitor InfotechservicesNitor
 
Quality engineering Services | Nitor Infotech
Quality engineering Services | Nitor InfotechQuality engineering Services | Nitor Infotech
Quality engineering Services | Nitor InfotechservicesNitor
 
Cloud and devops.pdf
Cloud and devops.pdfCloud and devops.pdf
Cloud and devops.pdfservicesNitor
 
Product engineering services_seo.pdf
Product engineering services_seo.pdfProduct engineering services_seo.pdf
Product engineering services_seo.pdfservicesNitor
 
Regression Testing How It Works (1).pdf
Regression Testing How It Works (1).pdfRegression Testing How It Works (1).pdf
Regression Testing How It Works (1).pdfservicesNitor
 

More from servicesNitor (10)

five best practices for technical writing
five best practices for technical writingfive best practices for technical writing
five best practices for technical writing
 
How to integrate salesforce data with azure data factory
How to integrate salesforce data with azure data factoryHow to integrate salesforce data with azure data factory
How to integrate salesforce data with azure data factory
 
substrate: A framework to efficiently build blockchains
substrate: A framework to efficiently build blockchainssubstrate: A framework to efficiently build blockchains
substrate: A framework to efficiently build blockchains
 
The three stages of Power BI Deployment Pipeline
The three stages of Power BI Deployment PipelineThe three stages of Power BI Deployment Pipeline
The three stages of Power BI Deployment Pipeline
 
IP Centric Solutioning Whitepaper | Nitor Infotech
IP Centric Solutioning Whitepaper | Nitor InfotechIP Centric Solutioning Whitepaper | Nitor Infotech
IP Centric Solutioning Whitepaper | Nitor Infotech
 
Quality engineering Services | Nitor Infotech
Quality engineering Services | Nitor InfotechQuality engineering Services | Nitor Infotech
Quality engineering Services | Nitor Infotech
 
Cloud and devops.pdf
Cloud and devops.pdfCloud and devops.pdf
Cloud and devops.pdf
 
Product engineering services_seo.pdf
Product engineering services_seo.pdfProduct engineering services_seo.pdf
Product engineering services_seo.pdf
 
02.pdf (2).pdf
02.pdf (2).pdf02.pdf (2).pdf
02.pdf (2).pdf
 
Regression Testing How It Works (1).pdf
Regression Testing How It Works (1).pdfRegression Testing How It Works (1).pdf
Regression Testing How It Works (1).pdf
 

Recently uploaded

mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 

Recently uploaded (20)

Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

a guide to install rasa and rasa x | Nitor Infotech

  • 1. A Guide to Rasa and Rasa X Vasishtha Ingale Software Engineer Vasishtha is a Software Engineer at Nitor Infotech. He has a keen interest in assimilating statistical approaches for Data Science. He is p... Read More
  • 2. I hope you read and enjoyed my previous blog titled ‘Introduction to Rasa X’ since it is a precursor to this one. In case you haven’t, you can read it here. In this blog, I am going to lead you through the installation, folder structure, controls, and features of Rasa as well as Rasa X to develop an assistant. Let’s first dive into installing Rasa. Installation of Rasa To install Rasa, you require Python 3.7 or Python 3.8. Firstly, you need to create and activate a new virtual environment by giving this command: C:> python3 -m venv ./rasaenv Activate it with: C:> .rasaenvScriptsactivate Once the installation is done, generate a folder structure for the Rasa project by typing rasa init in command prompt. After initializing the structure, a developer can start customizing the basic chatbot that is included in the initialized folder. Training Data in Different Files of Rasa Folder 1. NLU File: Intent is a class for a given set of examples which helps the assistant identify the user query. These examples are specified in the nlu.yml file. For example, if a user wants to stop a conversation, then you can define the examples as follows.
  • 3. 2. Domain file: The file domain.yml includes the following things: 1. Entities and slots: These are examples like City, Size of Pizza, Email Addresses, etc. 2. Form: This includes a structure to fill information automatically from user input 3. Responses: Here all the possible responses are defined, and a name is given to each one of them. Responses are named starting with utter for e.g. If a response is ‘order’, then conventionally it is written as utter_order. 3. Stories file: This file includes all the conversational flows designed and developed by a developer which helps the chatbot to make decisions in accordance with the stories. Stories are some ideal paths which illustrate the flow of the conversation can be. By gaining expertise in writing these stories, you can improve the performance of an assistant. 4. Rules file: The rules.yml file has rules for a specific conversation. For example, if a user wants something which is out of scope for the bot to answer, then any rule can handle the situation. Once the training data is
  • 4. updated, you must train the model on top of it which is saved in the folder. The following image shows the folder structure of a Rasa chatbot. Every time the training is done, the new model is saved so all the past models can also be utilized. Now it’s time to explore the second tool in our arsenal – Rasa X! Installation of Rasa X For Rasa X installation in Windows OS, we need to first install the Microsoft Visual C++ compiler. After that, we can go to the command prompt, activate the virtual environment created while installing Rasa and type the following command: To check whether it has been installed correctly or not, navigate to the chatbot folder, open the command prompt and type rasa x. It will open a window in your default browser with GUI. Features of Rasa X
  • 5. 1. Easy writing of training data: Instead of writing the training examples in a code editor or IDE, you can directly specify your data using GUI. In the above example, we defined the book_flight intent and gave an example of what a user can say. You can add as many examples as you want and save them. 2. Interactive learning: Interactive learning involves looking into what the intent was (identified by the bot) and then correcting it and manually guiding the bot to give responses. This way the bot creates automatic stories and can train itself further. 3. Records all previous conversations: To analyze earlier conversations and their flow and performance, Rasa X stores all conversations. In a live deployment monitoring user response and accordingly making changes in the training stories is a crucial step to have a successful chatbot in place. 4. Visualizes what’s going on in backend:
  • 6. The above image shows the Rasa X chatbot in the image. When the user said ‘Hello’, you can see that the bot identified the user intent as ‘greet’ which can be seen through this beautiful UI. Also, the next intent is to book a flight and then at the end you can see that a form is initialized to ask the user about the city from which he wants to book a flight and so on. 5. Slots identification:
  • 7. In the above example, once the user has confirmed that he wants to book a flight and the form has started to fill, the assistant asks about the departing city and automatically extracts the city from user input text with a confidence of (1.0) which means 100 percent sure. 6. Buttons: In the above image, you can see that once the user gives all the details about cities that he wants to depart and land at, the assistant gives a query in backend and communicates the dates available and shows the buttons of available dates and asks the user to select a suitable date which makes the conversation very easy. In case the user is not interested in these dates, then the bot can identify it and will
  • 8. recommend some new flights or just close the conversation as per the story. 7. Actions: actions.py is a Python file which handles connection with external sources like database, csv file or API. It tracks the slots and can read or write to files in accordance. All the actions are defined as a class in the file. The above code snippet is an example of saving all the slot information in a csv file once the conversation is done. I hope that after reading this blog, you are quite familiar with the controls and features of Rasa and Rasa X, and a sample as well. Now once you have understood the structure, you can develop and customize a chatbot according to your use case. Do read this case study about how we came up with an AI-based chatbot solution to efficiently log, track, and monitor compliance requests for a leading European business management solutions company. Feel free to get in touch with us at Nitor Infotech if you’d like to share your experience and suggestions. You can also discover more about how
  • 9. artificial intelligence and machine learning can make a real difference for your products, solutions, and services here.