SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Tutorial on Chatbot Development
with Xatkit
Easiest way to create advanced (chat)bots and digital assistants - #OSS #low-code
@xatkit – xatkit.com
Why Chatbots
“Business Insider experts predict that by 2020, 80% of enterprises will use chatbots. … by 2022, banks can
automate up to 90% of their customer interaction using chatbots … 40% of large companies employing more
than 500 people plan to implement one or more intelligent assistant…” - https://chatbotsmagazine.com/chatbot-report-
2019-global-trends-and-analysis-a487afec05b
Chatbot market to surpass 1B USD by 2021
But what is exactly a Chatbot?
• Chatbot = Bot + Conversational Interface
CI = Chat interface OR voice interface
• Chatbot = Digital Assistant
Challenges in building Chatbots
Let’s create a chatbot to help
newcomers to write issues on Github!
Alright! It’s just a set of questions &
answers, this will be pretty simple!
Narrator It wasn’t.
Once upon a time
(when we were naïve enough to think that creating a chatbot would be easy)
Chatbot applications
Our idea of the kind of rules we were hoping to write
User Intent
Action Parameters
If the User Wants To Open Issue
Reply « In which repository? » on Slack
Platform
What went wrong? – Many pieces to put
together
Input/Output
Messaging channels
External
Platforms
NLU Engine
Chatbots are complex systems
Conversation Logic
Text Processing
External Services
Messaging
Platforms
Deployment
Evolution
Maintenance
Tests
At the core: NLP/NLU component
• NLP: Natural Language Processing. NLU: Natural Language
Understanding. In theory, NLU is a more sophisticated version of
NLP. In practice they are both used mostly indistinctintly
• Two key missions
• Classify the user utterance in one of the intents defined in the
bot
• Identify the parameters (called « entities ») from the
utterance
NLU approaches
• Regular expressions
• Require an almost exact match. Not used
• Grammar-based approaches
• Useful for small domains with a very specific vocabulary and constructs
• E.g. Stanford Parser
• Neural Networks - Multiclass classifiers
• You provide some training sentences for each intent (the "classes" ). The
classifier learns from these sentences and tries to assign any new input text to
one of the classes.
• It’s most common approach nowadays
Common tricks in NLUs
• Tokenizers split the sentences into words
• Stemmers identify the lemma of the word (e.g. to focus on the verb, not on
the tense of the verb for matching purposes)
• Synonyms are an automatic way to expand the training sentences
• Entity augmentation also generalize training sentences
• E.g. What’s the weather in Barcelona -> What’s the weather in @city (the intent will
match no matter what city the user asks for, no need to train the classifier with all
the cities of the world as it will already know the list of cities itself).
• Augmentation is possible for a large number of data types and common concepts
(measures, countries, dates,…)
https://medium.com/@jseijas/how-to-build-your-own-nlp-for-chatbots-9b4c08eb03a9
Chatbot Development
Platforms
The AI
ecosystem
is huge
>100 chatbot platforms
• Rasa, BotPress, Chatfuel, Inbenta, Botsify,
Flow XO,…
• And quite a few NLU providers: DialogFlow,
Lex, LUIS, Watson, NLP.js
… but
• Only around 15% are open source
• Not flexible (i.e. difficult to integrate other platforms)
• Not interoperable
• Low-level (as soon as you need the bot to do some
action you end up programming in JS)
• Grady Booch – history of softwre engineering
The entire history of software engineering is that of
the rise in levels of abstraction
- Grady Booch
Also true for AI/chatbots ->
Chatbot Modeling to the rescue!
The Xatkit solution
Xatkit – Key Concepts
Xatkit Framework
• Raise the level of abstraction at what chatbots are defined
• Focus on the core logic of the chatbot
• Conversation and user interactions
• Action computations
• Independent from specific implementation technologies
• Automatize the deployment and execution of the modeled chatbot
• Deploy over multiple platforms
• Execute the chatbot logic
Xatkit is:
• A model-based & low-code chatbot development platform
• Where chatbots are defined using a couple of external DSLs
• And with a runtime engine that deploys and executes the bots over
the desired platforms
In Xatkit, platforms are
• An abstraction of any input/output messaging tool and any external
service. Platform interfaces are also defined with a DSL
• Platforms offer actions (that the bot can execute) and events (whom the
bot can subscribe to)
• PIM/PSM : Bots can be defined using generic platforms that are then
concretely instantiated during the deployment. No need to change the bot
• Any new platform becomes immediately available to any existing bot
Voice support
• Voice interfaces (like Alexa) are just another platform
• Voice is translated into text (speech2text tools) and then processed as
if the user had written it.
Xatkit Architecture
Xatkit Framework
Chatbot
Designer
Intent Recognition NLU Providers
(platform-specific)
Platform Package
Intent Package
Xatkit Modeling Language
Chatbot
User
Instant
Messaging
Platforms
Xatkit Runtime
Execution Package
uses
uses
Platform-independent
chatbot definition
External
Services
Deployment
Configuration
Platform
Designer
Intent Language (example bot to create new issues in a GH repo)
intent OpenBug {
inputs {
"The plugin is not working"
"I have a problem with the plugin"
"I'd like to report an error"
"I want to open a bug"
"There is an error in the plugin"
}
}
intent DescribeBug {
inputs { "My error is Error"
"The problem is Error"
"I get this error: Error"
"I get the error Error“ }
creates context bug {
sets parameter title from fragment Error (entity any)
}
}
• Inputs defines the set of training sentences for the intent
• A context records variables to be used later on in the execution model. Here we
store the info about the error in the title attribute of the Repository context.
• Entity defines the type of the value to be matched (any is anything, number would match
numeric values,…). You can also define your own enumeration (e.g. cities) to be even
more precise
Execution language
• The execution model follows state machine-like semantics
• Each state in the execution language contains 3 sections
• Body (optional): the bot reaction, executed when entering the state.
• Next (mandatory): the outgoing transitions defined as condition –> State. The
conditions are evaluated when an event/intent is received. If a transition is
navigable the execution engine moves to the specified state. Transition
conditions can be as complex as you want.
• Fallback (optional): Arbitrary code (as the Body section) that will be executed
if the engine cannot find a navigable transition.
Execution language
• An execution model also contains 2 special states:
• Init: a regular state that is entered when the user session is created. It can
contain a Body, Next, and Fallback section.
• Default_Fallback: This state represents the default fallback code to execute
when there is no local fallback defined in a state. It can be used to print a
generic error message (“Sorry I didn’t get it“), while local fallback can print a
custom message tailored to the current state (“Please reply by yes or no“).
• States can define a single wildcard transition (using the reserved
character _ as the condition) that will be automatically navigated
when the state’s body has been computed.
Execution Language Example
import platform "GithubPlatform"
import platform "SlackPlatform"
use provider SlackPlatform.SlackIntentProvider
use provider GithubPlatform.GithubWebhookEventProvider
Init {
Next {
event == Issue_Opened --> HandleIssueOpened
intent == GetIssue --> HandleGetIssue
intent == OpenBug --> HandleOpenBug
}
}
• The import platform allows you to easily interact with any existing platform, e.g.
replying on Slack or asking GH to create the issue
• The init state checks whether the user wants to get information about an issue, open a
new bug, or it is GitHub itself that sends us an event to notify of changes in the repo
Execution Language Example
HandleOpenBug {
Body { SlackPlatform.Reply("Can you please describe what is wrong in a few words?")}
Next { intent == DescribeBug --> HandleDescribeBug }
}
Default_Fallback {
Body { SlackPlatform.Reply("Sorry, I didn't get it") }
}
• If the user wants to open the new bug we start the process of collecting the required
data
• If we don’t manage to understand what the users says, the default fallback will be
executed instead.
Platform definition
• The execution model can directly refer to all predefined platforms in
Xatkit. 10+ right now: Slack, Zapier, Alexa, UML, Giphy, GitHub,
Neo4j,…
• Chatbot designers only need to define a new platform if they have
special needs. This implies:
• Declaring the platform interface
• Implementing the platform itself as a Java class in the proper place in the
platform hierarchy
• Plenty of auxiliary classes and boilerplate code facilitate this implementation
Platform Language
Abstract platform Chat
actions {
PostMessage(message, channel)
Reply(message)
}
}
Platform Slack extends Chat
Platform Discord extends Chat
Platform Github
actions {
OpenIssue(repository, title, content)
GetIssue(user, repository, issueNumber)
…
}
event Issue_Opened
event Issue_Edited
…
• Platforms are also declaratively defined
• Platform hierarchy facilitates reusability and genericity
• Platforms offer actions to be executed and events to subscribe to
The compute
method
shows how
we
implemented
the
PostMessage
action in
Slack
Xatkit Framework Intent Recognition Providers
(platform-specific)
Platform Package
Intent Package
Xatkit Modeling Language
Instant
Messaging
Platforms
Xatkit Runtime
Execution Package
uses
uses
Platform-independent
chatbot definition
External
Services
Deployment
Configuration
Chatbot
Designer Chatbot
User
Platform
Designer
Runtime Component
• Generic event-based execution engine
• Loads the platform-specific connectors referenced in the bot definition
• Automatic deployment
• Execution life-cycle
• Inputs
• Chatbot model (defined with the Xatkit modeling language)
• Configuration file (Oauth tokens, API keys, platform-specific parameters,…)
Runtime configuration example
// Intent Recognition Provider Configuration
xatkit.intent.recognition = DialogFlow
xatkit.dialogflow.project = dialogflow_project_id
xatkit.dialogflow.credentials = key.json
// Platform configuration
xatkit.slack.credentials = slack_oauth_token
xatkit.discord.credentials = discord_credentials
xatkit.github.credentials = github_oauth_token
Xatkit Tool
Tool Support
• Available on GitHub as an independent organization:
https://github.com/xatkit-bot-platform/ to facilitate external
contributions
• Open source (EPL v2)
• With tutorials and examples to help you get started building bots!
It comes with an Eclipse Editor – Xtext-based
Care to contribute?
• With your own examples
• Improving our platform support
• Extensions to the current platforms with new actions or events
• New platforms
• Our own NLP connectors
• Adding support for new providers
• Or in any of the many other ways you can help an OSS project
https://livablesoftware.com/5-ways-to-thank-open-source-
maintainers/

Weitere ähnliche Inhalte

Ähnlich wie Chatbot Tutorial - Create your first bot with Xatkit

#OSSPARIS19 - Création facile de chatbots - Créez votre chatbot en 20 minutes...
#OSSPARIS19 - Création facile de chatbots - Créez votre chatbot en 20 minutes...#OSSPARIS19 - Création facile de chatbots - Créez votre chatbot en 20 minutes...
#OSSPARIS19 - Création facile de chatbots - Créez votre chatbot en 20 minutes...Paris Open Source Summit
 
ICONUK 2018 - Do You Wanna Build a Chatbot
ICONUK 2018 - Do You Wanna Build a ChatbotICONUK 2018 - Do You Wanna Build a Chatbot
ICONUK 2018 - Do You Wanna Build a ChatbotPaul Withers
 
Cómo construir un chatbot inteligente sin morir en el intento
Cómo construir un chatbot inteligente sin morir en el intentoCómo construir un chatbot inteligente sin morir en el intento
Cómo construir un chatbot inteligente sin morir en el intentoFacultad de Informática UCM
 
Using Chatbots in Extension Programming
Using Chatbots in Extension ProgrammingUsing Chatbots in Extension Programming
Using Chatbots in Extension ProgrammingAmy Cole
 
IRJET - A Study on Building a Web based Chatbot from Scratch
IRJET - A Study on Building a Web based Chatbot from ScratchIRJET - A Study on Building a Web based Chatbot from Scratch
IRJET - A Study on Building a Web based Chatbot from ScratchIRJET Journal
 
An Intelligent Chatbot for College Enquiry with Amazon Lex
An Intelligent Chatbot for College Enquiry with Amazon LexAn Intelligent Chatbot for College Enquiry with Amazon Lex
An Intelligent Chatbot for College Enquiry with Amazon LexIRJET Journal
 
AI and Web-Based Interactive College Enquiry Chatbot
AI and Web-Based Interactive College Enquiry ChatbotAI and Web-Based Interactive College Enquiry Chatbot
AI and Web-Based Interactive College Enquiry ChatbotIRJET Journal
 
Graphel: A Purely Functional Approach to Digital Interaction
Graphel: A Purely Functional Approach to Digital InteractionGraphel: A Purely Functional Approach to Digital Interaction
Graphel: A Purely Functional Approach to Digital Interactionmtrimpe
 
Azure Bot Services - Malaysia
Azure Bot Services - MalaysiaAzure Bot Services - Malaysia
Azure Bot Services - MalaysiaCheah Eng Soon
 
Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?Jordi Cabot
 
IRJET- Recruitment Chatbot
IRJET- Recruitment ChatbotIRJET- Recruitment Chatbot
IRJET- Recruitment ChatbotIRJET Journal
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Making PHP Smarter - Dutch PHP 2023.pptx
Making PHP Smarter - Dutch PHP 2023.pptxMaking PHP Smarter - Dutch PHP 2023.pptx
Making PHP Smarter - Dutch PHP 2023.pptxAdam Englander
 
ChatGPT and AI for web developers - Maximiliano Firtman
ChatGPT and AI for web developers - Maximiliano FirtmanChatGPT and AI for web developers - Maximiliano Firtman
ChatGPT and AI for web developers - Maximiliano FirtmanWey Wey Web
 
How to build a Chatbot with Google's Dialogflow
How to build a Chatbot with Google's DialogflowHow to build a Chatbot with Google's Dialogflow
How to build a Chatbot with Google's DialogflowMoses Sam Paul Johnraj
 

Ähnlich wie Chatbot Tutorial - Create your first bot with Xatkit (20)

#OSSPARIS19 - Création facile de chatbots - Créez votre chatbot en 20 minutes...
#OSSPARIS19 - Création facile de chatbots - Créez votre chatbot en 20 minutes...#OSSPARIS19 - Création facile de chatbots - Créez votre chatbot en 20 minutes...
#OSSPARIS19 - Création facile de chatbots - Créez votre chatbot en 20 minutes...
 
ICONUK 2018 - Do You Wanna Build a Chatbot
ICONUK 2018 - Do You Wanna Build a ChatbotICONUK 2018 - Do You Wanna Build a Chatbot
ICONUK 2018 - Do You Wanna Build a Chatbot
 
Cómo construir un chatbot inteligente sin morir en el intento
Cómo construir un chatbot inteligente sin morir en el intentoCómo construir un chatbot inteligente sin morir en el intento
Cómo construir un chatbot inteligente sin morir en el intento
 
Using Chatbots in Extension Programming
Using Chatbots in Extension ProgrammingUsing Chatbots in Extension Programming
Using Chatbots in Extension Programming
 
IRJET - A Study on Building a Web based Chatbot from Scratch
IRJET - A Study on Building a Web based Chatbot from ScratchIRJET - A Study on Building a Web based Chatbot from Scratch
IRJET - A Study on Building a Web based Chatbot from Scratch
 
Introduction to .Net
Introduction to .NetIntroduction to .Net
Introduction to .Net
 
An Intelligent Chatbot for College Enquiry with Amazon Lex
An Intelligent Chatbot for College Enquiry with Amazon LexAn Intelligent Chatbot for College Enquiry with Amazon Lex
An Intelligent Chatbot for College Enquiry with Amazon Lex
 
ms_3.pdf
ms_3.pdfms_3.pdf
ms_3.pdf
 
AI and Web-Based Interactive College Enquiry Chatbot
AI and Web-Based Interactive College Enquiry ChatbotAI and Web-Based Interactive College Enquiry Chatbot
AI and Web-Based Interactive College Enquiry Chatbot
 
SRE_Chatbot_workflow.pptx
SRE_Chatbot_workflow.pptxSRE_Chatbot_workflow.pptx
SRE_Chatbot_workflow.pptx
 
Graphel: A Purely Functional Approach to Digital Interaction
Graphel: A Purely Functional Approach to Digital InteractionGraphel: A Purely Functional Approach to Digital Interaction
Graphel: A Purely Functional Approach to Digital Interaction
 
C# and dot net framework
C# and dot net frameworkC# and dot net framework
C# and dot net framework
 
Azure Bot Services - Malaysia
Azure Bot Services - MalaysiaAzure Bot Services - Malaysia
Azure Bot Services - Malaysia
 
Bot design AIsatPN 2018
Bot design AIsatPN 2018Bot design AIsatPN 2018
Bot design AIsatPN 2018
 
Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?Software Modeling and Artificial Intelligence: friends or foes?
Software Modeling and Artificial Intelligence: friends or foes?
 
IRJET- Recruitment Chatbot
IRJET- Recruitment ChatbotIRJET- Recruitment Chatbot
IRJET- Recruitment Chatbot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Making PHP Smarter - Dutch PHP 2023.pptx
Making PHP Smarter - Dutch PHP 2023.pptxMaking PHP Smarter - Dutch PHP 2023.pptx
Making PHP Smarter - Dutch PHP 2023.pptx
 
ChatGPT and AI for web developers - Maximiliano Firtman
ChatGPT and AI for web developers - Maximiliano FirtmanChatGPT and AI for web developers - Maximiliano Firtman
ChatGPT and AI for web developers - Maximiliano Firtman
 
How to build a Chatbot with Google's Dialogflow
How to build a Chatbot with Google's DialogflowHow to build a Chatbot with Google's Dialogflow
How to build a Chatbot with Google's Dialogflow
 

Mehr von Jordi Cabot

AI and Software consultants: friends or foes?
AI and Software consultants: friends or foes?AI and Software consultants: friends or foes?
AI and Software consultants: friends or foes?Jordi Cabot
 
Model-driven engineering for Industrial IoT architectures
Model-driven engineering for Industrial IoT architecturesModel-driven engineering for Industrial IoT architectures
Model-driven engineering for Industrial IoT architecturesJordi Cabot
 
Smart modeling of smart software
Smart modeling of smart softwareSmart modeling of smart software
Smart modeling of smart softwareJordi Cabot
 
Modeling should be an independent scientific discipline
Modeling should be an independent scientific disciplineModeling should be an independent scientific discipline
Modeling should be an independent scientific disciplineJordi Cabot
 
¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...
¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...
¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...Jordi Cabot
 
How to sustain a tool building community-driven effort
How to sustain a tool building community-driven effortHow to sustain a tool building community-driven effort
How to sustain a tool building community-driven effortJordi Cabot
 
All Researchers Should Become Entrepreneurs
All Researchers Should Become EntrepreneursAll Researchers Should Become Entrepreneurs
All Researchers Should Become EntrepreneursJordi Cabot
 
Low-code vs Model-Driven Engineering
Low-code vs Model-Driven EngineeringLow-code vs Model-Driven Engineering
Low-code vs Model-Driven EngineeringJordi Cabot
 
Future Trends on Software and Systems Modeling
Future Trends on Software and Systems ModelingFuture Trends on Software and Systems Modeling
Future Trends on Software and Systems ModelingJordi Cabot
 
Ingeniería del Software dirigida por modelos -Versión para incrédulos
Ingeniería del Software dirigida por modelos -Versión para incrédulosIngeniería del Software dirigida por modelos -Versión para incrédulos
Ingeniería del Software dirigida por modelos -Versión para incrédulosJordi Cabot
 
An LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model TransformationsAn LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model TransformationsJordi Cabot
 
WAPIml: Towards a Modeling Infrastructure for Web APIs
WAPIml: Towards a Modeling Infrastructure for Web APIsWAPIml: Towards a Modeling Infrastructure for Web APIs
WAPIml: Towards a Modeling Infrastructure for Web APIsJordi Cabot
 
Is there a future for Model Transformation Languages?
Is there a future for Model Transformation Languages?Is there a future for Model Transformation Languages?
Is there a future for Model Transformation Languages?Jordi Cabot
 
Temporal EMF: A temporal metamodeling platform
Temporal EMF: A temporal metamodeling platformTemporal EMF: A temporal metamodeling platform
Temporal EMF: A temporal metamodeling platformJordi Cabot
 
UMLtoNoSQL : From UML domain models to NoSQL Databases
UMLtoNoSQL : From UML domain models to NoSQL DatabasesUMLtoNoSQL : From UML domain models to NoSQL Databases
UMLtoNoSQL : From UML domain models to NoSQL DatabasesJordi Cabot
 
Model-driven Round-trip Engineering of REST APIs
Model-driven Round-trip Engineering of REST APIsModel-driven Round-trip Engineering of REST APIs
Model-driven Round-trip Engineering of REST APIsJordi Cabot
 
Robust Hashing for software models
Robust Hashing for software models Robust Hashing for software models
Robust Hashing for software models Jordi Cabot
 
Cognifying model-driven software engineering
Cognifying model-driven software engineeringCognifying model-driven software engineering
Cognifying model-driven software engineeringJordi Cabot
 
The secret life of rules in Software Engineering
The secret life of rules in Software EngineeringThe secret life of rules in Software Engineering
The secret life of rules in Software EngineeringJordi Cabot
 
Automatic discovery of Web API Specifications: an example-driven approach
Automatic discovery of Web API Specifications: an example-driven approachAutomatic discovery of Web API Specifications: an example-driven approach
Automatic discovery of Web API Specifications: an example-driven approachJordi Cabot
 

Mehr von Jordi Cabot (20)

AI and Software consultants: friends or foes?
AI and Software consultants: friends or foes?AI and Software consultants: friends or foes?
AI and Software consultants: friends or foes?
 
Model-driven engineering for Industrial IoT architectures
Model-driven engineering for Industrial IoT architecturesModel-driven engineering for Industrial IoT architectures
Model-driven engineering for Industrial IoT architectures
 
Smart modeling of smart software
Smart modeling of smart softwareSmart modeling of smart software
Smart modeling of smart software
 
Modeling should be an independent scientific discipline
Modeling should be an independent scientific disciplineModeling should be an independent scientific discipline
Modeling should be an independent scientific discipline
 
¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...
¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...
¿Quién va a desarrollar las Apps del futuro? (aviso: no serán los programador...
 
How to sustain a tool building community-driven effort
How to sustain a tool building community-driven effortHow to sustain a tool building community-driven effort
How to sustain a tool building community-driven effort
 
All Researchers Should Become Entrepreneurs
All Researchers Should Become EntrepreneursAll Researchers Should Become Entrepreneurs
All Researchers Should Become Entrepreneurs
 
Low-code vs Model-Driven Engineering
Low-code vs Model-Driven EngineeringLow-code vs Model-Driven Engineering
Low-code vs Model-Driven Engineering
 
Future Trends on Software and Systems Modeling
Future Trends on Software and Systems ModelingFuture Trends on Software and Systems Modeling
Future Trends on Software and Systems Modeling
 
Ingeniería del Software dirigida por modelos -Versión para incrédulos
Ingeniería del Software dirigida por modelos -Versión para incrédulosIngeniería del Software dirigida por modelos -Versión para incrédulos
Ingeniería del Software dirigida por modelos -Versión para incrédulos
 
An LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model TransformationsAn LSTM-Based Neural Network Architecture for Model Transformations
An LSTM-Based Neural Network Architecture for Model Transformations
 
WAPIml: Towards a Modeling Infrastructure for Web APIs
WAPIml: Towards a Modeling Infrastructure for Web APIsWAPIml: Towards a Modeling Infrastructure for Web APIs
WAPIml: Towards a Modeling Infrastructure for Web APIs
 
Is there a future for Model Transformation Languages?
Is there a future for Model Transformation Languages?Is there a future for Model Transformation Languages?
Is there a future for Model Transformation Languages?
 
Temporal EMF: A temporal metamodeling platform
Temporal EMF: A temporal metamodeling platformTemporal EMF: A temporal metamodeling platform
Temporal EMF: A temporal metamodeling platform
 
UMLtoNoSQL : From UML domain models to NoSQL Databases
UMLtoNoSQL : From UML domain models to NoSQL DatabasesUMLtoNoSQL : From UML domain models to NoSQL Databases
UMLtoNoSQL : From UML domain models to NoSQL Databases
 
Model-driven Round-trip Engineering of REST APIs
Model-driven Round-trip Engineering of REST APIsModel-driven Round-trip Engineering of REST APIs
Model-driven Round-trip Engineering of REST APIs
 
Robust Hashing for software models
Robust Hashing for software models Robust Hashing for software models
Robust Hashing for software models
 
Cognifying model-driven software engineering
Cognifying model-driven software engineeringCognifying model-driven software engineering
Cognifying model-driven software engineering
 
The secret life of rules in Software Engineering
The secret life of rules in Software EngineeringThe secret life of rules in Software Engineering
The secret life of rules in Software Engineering
 
Automatic discovery of Web API Specifications: an example-driven approach
Automatic discovery of Web API Specifications: an example-driven approachAutomatic discovery of Web API Specifications: an example-driven approach
Automatic discovery of Web API Specifications: an example-driven approach
 

Kürzlich hochgeladen

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 

Kürzlich hochgeladen (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 

Chatbot Tutorial - Create your first bot with Xatkit

  • 1. Tutorial on Chatbot Development with Xatkit Easiest way to create advanced (chat)bots and digital assistants - #OSS #low-code @xatkit – xatkit.com
  • 3.
  • 4. “Business Insider experts predict that by 2020, 80% of enterprises will use chatbots. … by 2022, banks can automate up to 90% of their customer interaction using chatbots … 40% of large companies employing more than 500 people plan to implement one or more intelligent assistant…” - https://chatbotsmagazine.com/chatbot-report- 2019-global-trends-and-analysis-a487afec05b Chatbot market to surpass 1B USD by 2021
  • 5. But what is exactly a Chatbot? • Chatbot = Bot + Conversational Interface CI = Chat interface OR voice interface • Chatbot = Digital Assistant
  • 7. Let’s create a chatbot to help newcomers to write issues on Github! Alright! It’s just a set of questions & answers, this will be pretty simple! Narrator It wasn’t. Once upon a time (when we were naïve enough to think that creating a chatbot would be easy)
  • 8. Chatbot applications Our idea of the kind of rules we were hoping to write User Intent Action Parameters If the User Wants To Open Issue Reply « In which repository? » on Slack Platform
  • 9. What went wrong? – Many pieces to put together Input/Output Messaging channels External Platforms NLU Engine
  • 10. Chatbots are complex systems Conversation Logic Text Processing External Services Messaging Platforms Deployment Evolution Maintenance Tests
  • 11. At the core: NLP/NLU component • NLP: Natural Language Processing. NLU: Natural Language Understanding. In theory, NLU is a more sophisticated version of NLP. In practice they are both used mostly indistinctintly • Two key missions • Classify the user utterance in one of the intents defined in the bot • Identify the parameters (called « entities ») from the utterance
  • 12. NLU approaches • Regular expressions • Require an almost exact match. Not used • Grammar-based approaches • Useful for small domains with a very specific vocabulary and constructs • E.g. Stanford Parser • Neural Networks - Multiclass classifiers • You provide some training sentences for each intent (the "classes" ). The classifier learns from these sentences and tries to assign any new input text to one of the classes. • It’s most common approach nowadays
  • 13. Common tricks in NLUs • Tokenizers split the sentences into words • Stemmers identify the lemma of the word (e.g. to focus on the verb, not on the tense of the verb for matching purposes) • Synonyms are an automatic way to expand the training sentences • Entity augmentation also generalize training sentences • E.g. What’s the weather in Barcelona -> What’s the weather in @city (the intent will match no matter what city the user asks for, no need to train the classifier with all the cities of the world as it will already know the list of cities itself). • Augmentation is possible for a large number of data types and common concepts (measures, countries, dates,…) https://medium.com/@jseijas/how-to-build-your-own-nlp-for-chatbots-9b4c08eb03a9
  • 16. >100 chatbot platforms • Rasa, BotPress, Chatfuel, Inbenta, Botsify, Flow XO,… • And quite a few NLU providers: DialogFlow, Lex, LUIS, Watson, NLP.js
  • 17. … but • Only around 15% are open source • Not flexible (i.e. difficult to integrate other platforms) • Not interoperable • Low-level (as soon as you need the bot to do some action you end up programming in JS)
  • 18. • Grady Booch – history of softwre engineering The entire history of software engineering is that of the rise in levels of abstraction - Grady Booch Also true for AI/chatbots -> Chatbot Modeling to the rescue!
  • 20. Xatkit – Key Concepts
  • 21. Xatkit Framework • Raise the level of abstraction at what chatbots are defined • Focus on the core logic of the chatbot • Conversation and user interactions • Action computations • Independent from specific implementation technologies • Automatize the deployment and execution of the modeled chatbot • Deploy over multiple platforms • Execute the chatbot logic
  • 22. Xatkit is: • A model-based & low-code chatbot development platform • Where chatbots are defined using a couple of external DSLs • And with a runtime engine that deploys and executes the bots over the desired platforms
  • 23. In Xatkit, platforms are • An abstraction of any input/output messaging tool and any external service. Platform interfaces are also defined with a DSL • Platforms offer actions (that the bot can execute) and events (whom the bot can subscribe to) • PIM/PSM : Bots can be defined using generic platforms that are then concretely instantiated during the deployment. No need to change the bot • Any new platform becomes immediately available to any existing bot
  • 24. Voice support • Voice interfaces (like Alexa) are just another platform • Voice is translated into text (speech2text tools) and then processed as if the user had written it.
  • 26. Xatkit Framework Chatbot Designer Intent Recognition NLU Providers (platform-specific) Platform Package Intent Package Xatkit Modeling Language Chatbot User Instant Messaging Platforms Xatkit Runtime Execution Package uses uses Platform-independent chatbot definition External Services Deployment Configuration Platform Designer
  • 27. Intent Language (example bot to create new issues in a GH repo) intent OpenBug { inputs { "The plugin is not working" "I have a problem with the plugin" "I'd like to report an error" "I want to open a bug" "There is an error in the plugin" } } intent DescribeBug { inputs { "My error is Error" "The problem is Error" "I get this error: Error" "I get the error Error“ } creates context bug { sets parameter title from fragment Error (entity any) } } • Inputs defines the set of training sentences for the intent • A context records variables to be used later on in the execution model. Here we store the info about the error in the title attribute of the Repository context. • Entity defines the type of the value to be matched (any is anything, number would match numeric values,…). You can also define your own enumeration (e.g. cities) to be even more precise
  • 28. Execution language • The execution model follows state machine-like semantics • Each state in the execution language contains 3 sections • Body (optional): the bot reaction, executed when entering the state. • Next (mandatory): the outgoing transitions defined as condition –> State. The conditions are evaluated when an event/intent is received. If a transition is navigable the execution engine moves to the specified state. Transition conditions can be as complex as you want. • Fallback (optional): Arbitrary code (as the Body section) that will be executed if the engine cannot find a navigable transition.
  • 29. Execution language • An execution model also contains 2 special states: • Init: a regular state that is entered when the user session is created. It can contain a Body, Next, and Fallback section. • Default_Fallback: This state represents the default fallback code to execute when there is no local fallback defined in a state. It can be used to print a generic error message (“Sorry I didn’t get it“), while local fallback can print a custom message tailored to the current state (“Please reply by yes or no“). • States can define a single wildcard transition (using the reserved character _ as the condition) that will be automatically navigated when the state’s body has been computed.
  • 30. Execution Language Example import platform "GithubPlatform" import platform "SlackPlatform" use provider SlackPlatform.SlackIntentProvider use provider GithubPlatform.GithubWebhookEventProvider Init { Next { event == Issue_Opened --> HandleIssueOpened intent == GetIssue --> HandleGetIssue intent == OpenBug --> HandleOpenBug } } • The import platform allows you to easily interact with any existing platform, e.g. replying on Slack or asking GH to create the issue • The init state checks whether the user wants to get information about an issue, open a new bug, or it is GitHub itself that sends us an event to notify of changes in the repo
  • 31. Execution Language Example HandleOpenBug { Body { SlackPlatform.Reply("Can you please describe what is wrong in a few words?")} Next { intent == DescribeBug --> HandleDescribeBug } } Default_Fallback { Body { SlackPlatform.Reply("Sorry, I didn't get it") } } • If the user wants to open the new bug we start the process of collecting the required data • If we don’t manage to understand what the users says, the default fallback will be executed instead.
  • 32. Platform definition • The execution model can directly refer to all predefined platforms in Xatkit. 10+ right now: Slack, Zapier, Alexa, UML, Giphy, GitHub, Neo4j,… • Chatbot designers only need to define a new platform if they have special needs. This implies: • Declaring the platform interface • Implementing the platform itself as a Java class in the proper place in the platform hierarchy • Plenty of auxiliary classes and boilerplate code facilitate this implementation
  • 33. Platform Language Abstract platform Chat actions { PostMessage(message, channel) Reply(message) } } Platform Slack extends Chat Platform Discord extends Chat Platform Github actions { OpenIssue(repository, title, content) GetIssue(user, repository, issueNumber) … } event Issue_Opened event Issue_Edited … • Platforms are also declaratively defined • Platform hierarchy facilitates reusability and genericity • Platforms offer actions to be executed and events to subscribe to
  • 35. Xatkit Framework Intent Recognition Providers (platform-specific) Platform Package Intent Package Xatkit Modeling Language Instant Messaging Platforms Xatkit Runtime Execution Package uses uses Platform-independent chatbot definition External Services Deployment Configuration Chatbot Designer Chatbot User Platform Designer
  • 36. Runtime Component • Generic event-based execution engine • Loads the platform-specific connectors referenced in the bot definition • Automatic deployment • Execution life-cycle • Inputs • Chatbot model (defined with the Xatkit modeling language) • Configuration file (Oauth tokens, API keys, platform-specific parameters,…)
  • 37. Runtime configuration example // Intent Recognition Provider Configuration xatkit.intent.recognition = DialogFlow xatkit.dialogflow.project = dialogflow_project_id xatkit.dialogflow.credentials = key.json // Platform configuration xatkit.slack.credentials = slack_oauth_token xatkit.discord.credentials = discord_credentials xatkit.github.credentials = github_oauth_token
  • 39. Tool Support • Available on GitHub as an independent organization: https://github.com/xatkit-bot-platform/ to facilitate external contributions • Open source (EPL v2) • With tutorials and examples to help you get started building bots!
  • 40. It comes with an Eclipse Editor – Xtext-based
  • 41. Care to contribute? • With your own examples • Improving our platform support • Extensions to the current platforms with new actions or events • New platforms • Our own NLP connectors • Adding support for new providers • Or in any of the many other ways you can help an OSS project https://livablesoftware.com/5-ways-to-thank-open-source- maintainers/