SlideShare uma empresa Scribd logo
1 de 11
Sviluppare Agenti
Conversazionali con
Rasa
Claudio G. Giancaterino
Rasa
❖ Perchè Rasa?
E’ scalabile e flessibile, consente di
realizzare soluzioni personalizzate
❖ Che cos’è Rasa?
E’ una piattaforma open-source
strutturata su librerie di Python
❖ Chi può utilizzarlo?
E’ semplice da utilizzare però sono
richieste conoscenze di
programmazione & machine learning
Rasa Stack
Rasa
NLU
Rasa
Core
Rasa X
The car is broken!
I have to call a tow
truck, please
The number to
call is: 800-185-
001
❖ Come funziona?
● Rasa NLU addestra l’agente a comprendere i
messaggi dell’utente
● Rasa Core addestra l’agente a rispondere ai
messaggi dell’utente
● Rasa X migliora le prestazioni dell’agente
sfruttando conversazioni reali e gestisce il
passaggio in produzione
Rasa NLU
➔ Classificazione degli intenti
(finalità)
➔ Estrazione delle entità (parole
chiave)
➔ Ottimizzazione degli
iperparametri
Rasa NLU: Natural Language Understanding
The car is broken!
I have to call a
tow truck, please
Intent Classification Pipeline
“The car is broken! I have to call a tow truck, please” {“intent”:”emergency_road_help”}
Entity Extraction Pipeline
“The car is broken! I have to call a tow truck, please” {“road_help”:”tow truck”}
Vectorization Intent Classification
Tokenizer
Part of Speech
Tagger Chunker
Named Entity
Recognition
Entity Extraction
-NLU model: viene generato un dataset di dati che raggruppa i messaggi
dell’utente per finalità e mette in evidenza i termini chiave con i relativi
sinonimi.
-NLU pipeline: Rasa NLU consente di personalizzare il modello attraverso una
pipeline di librerie definita nel file config.yml:
language: “en”
pipeline
-name: “nlp_spacy” #loads the spacy language model
-name: “tokenizer_spacy” #split the sentence into tokens
-name: ”ner_crf” #defines the model which will be used for entity extraction
-name: “intent_featurizer_spacy” #transform the sentence into a vector representation
-name: “intent_classifier_sklearn” #uses the vector representation to classify using SVM
-name: “ner_synonyms” #trains the synonyms
Rasa Core
➔ Pianificazione dei dialoghi
➔ Gestione del dominio
*greet
U: Hello!
-utter_greet
B: Hello, I can offer you
assistance on emergency situations,
what number are you looking for?
*emergency_road_help{“Road_help”:“tow truck”}
U: The car is broken!
I need to call a tow truck, please
-utter_action_road_help_
B: The number to call for any type
of emergency in Europe is: 112.
Depending of your country
you can call the following numbers:
Austria - 120
. . . . .
*affirm
U: Many thanks
-utter_affirm
B: You're welcome
Stories: viene generato uno schema di conversazioni reali tra utente e agente
Intents: actions:
-greet -utter_greet
-emergency_ambulance -utter_action_help_ambulance
-emergency_insurance_number -utter_action_help_insurance
-emergency_fire -utter_action_help_fire
-emergency_police -utter_action_help_police
-emergency_road_help -utter_action_road_help
-emergency_air_rescue -utter_action_help_air_rescue
-affirm -utter_affirm
-__main__.ApiAction
entities:
-ambulance
-insurance
-fire
-police
-road_help
-air_rescue
Domain: viene specificata l'architettura del dialogo con le finalità, i termini chiave, le
azioni e le risposte utilizzate dall’agente e gli slot che aiuteranno l’agente a tenere
traccia del contesto.
Rasa X
➔ Apprendimento dalle reali
conversazioni
➔ Passaggio in produzione
References:
https://github.com/claudio1975/chatbot
https://bit.ly/2HdJwA8
Grazie!!!
c.giancaterino@gmail.com

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Sunil kumar resume
Sunil kumar resumeSunil kumar resume
Sunil kumar resume
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
Databricks Overview for MLOps
Databricks Overview for MLOpsDatabricks Overview for MLOps
Databricks Overview for MLOps
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
 
Chatbot with RASA | Valuebound
Chatbot with RASA | ValueboundChatbot with RASA | Valuebound
Chatbot with RASA | Valuebound
 
Elements of Java Language
Elements of Java Language Elements of Java Language
Elements of Java Language
 
BERT introduction
BERT introductionBERT introduction
BERT introduction
 
Building a Pipeline for State-of-the-Art Natural Language Processing Using Hu...
Building a Pipeline for State-of-the-Art Natural Language Processing Using Hu...Building a Pipeline for State-of-the-Art Natural Language Processing Using Hu...
Building a Pipeline for State-of-the-Art Natural Language Processing Using Hu...
 
Java Developer resume
Java Developer resume Java Developer resume
Java Developer resume
 
Scott Allen Williams Résumé - Senior Java Software Developer - Agile Technolo...
Scott Allen Williams Résumé - Senior Java Software Developer - Agile Technolo...Scott Allen Williams Résumé - Senior Java Software Developer - Agile Technolo...
Scott Allen Williams Résumé - Senior Java Software Developer - Agile Technolo...
 
Java oop by_salem_adrugi
Java oop by_salem_adrugiJava oop by_salem_adrugi
Java oop by_salem_adrugi
 
GPT-2: Language Models are Unsupervised Multitask Learners
GPT-2: Language Models are Unsupervised Multitask LearnersGPT-2: Language Models are Unsupervised Multitask Learners
GPT-2: Language Models are Unsupervised Multitask Learners
 
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
BERT: Pre-training of Deep Bidirectional Transformers for Language UnderstandingBERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
 
Machine Learning Overview
Machine Learning OverviewMachine Learning Overview
Machine Learning Overview
 
Thomas Wolf "Transfer learning in NLP"
Thomas Wolf "Transfer learning in NLP"Thomas Wolf "Transfer learning in NLP"
Thomas Wolf "Transfer learning in NLP"
 
Stable Diffusion path
Stable Diffusion pathStable Diffusion path
Stable Diffusion path
 
Build an LLM-powered application using LangChain.pdf
Build an LLM-powered application using LangChain.pdfBuild an LLM-powered application using LangChain.pdf
Build an LLM-powered application using LangChain.pdf
 
Vijay kumar java developer_resume
Vijay kumar java developer_resumeVijay kumar java developer_resume
Vijay kumar java developer_resume
 
Ai chatbot
Ai chatbotAi chatbot
Ai chatbot
 
BERT QnA System for Airplane Flight Manual
BERT QnA System for Airplane Flight ManualBERT QnA System for Airplane Flight Manual
BERT QnA System for Airplane Flight Manual
 

Semelhante a Sviluppare agenti conversazionali con Rasa

Gianfrasoft Corso Di Php Parte 1
Gianfrasoft   Corso Di Php   Parte 1Gianfrasoft   Corso Di Php   Parte 1
Gianfrasoft Corso Di Php Parte 1
Gianfranco Fedele
 

Semelhante a Sviluppare agenti conversazionali con Rasa (9)

Thanatos - Parallel & Distributed Computing
Thanatos -  Parallel & Distributed ComputingThanatos -  Parallel & Distributed Computing
Thanatos - Parallel & Distributed Computing
 
Thanatos
ThanatosThanatos
Thanatos
 
Prototipazione Low-Code con AWS Step Functions
Prototipazione Low-Code con AWS Step FunctionsPrototipazione Low-Code con AWS Step Functions
Prototipazione Low-Code con AWS Step Functions
 
Come sviluppo le applicazioni web
Come sviluppo le applicazioni webCome sviluppo le applicazioni web
Come sviluppo le applicazioni web
 
Linux@Unina
Linux@UninaLinux@Unina
Linux@Unina
 
Jc06 Antonio Terreno Fluidtime
Jc06 Antonio Terreno FluidtimeJc06 Antonio Terreno Fluidtime
Jc06 Antonio Terreno Fluidtime
 
Profilazione di applicazioni PHP con XHProf.
Profilazione di applicazioni PHP con XHProf.Profilazione di applicazioni PHP con XHProf.
Profilazione di applicazioni PHP con XHProf.
 
Antonio Bonanno - Il Cliente Agile
Antonio Bonanno - Il Cliente AgileAntonio Bonanno - Il Cliente Agile
Antonio Bonanno - Il Cliente Agile
 
Gianfrasoft Corso Di Php Parte 1
Gianfrasoft   Corso Di Php   Parte 1Gianfrasoft   Corso Di Php   Parte 1
Gianfrasoft Corso Di Php Parte 1
 

Mais de Paolo Montrasio

Mais de Paolo Montrasio (20)

Il Chatbot come guida di viaggio: Travelchat
Il Chatbot come guida di viaggio: TravelchatIl Chatbot come guida di viaggio: Travelchat
Il Chatbot come guida di viaggio: Travelchat
 
Costruire chatbot conversazionali ed intelligenti con Xenioo
Costruire chatbot conversazionali ed intelligenti con XeniooCostruire chatbot conversazionali ed intelligenti con Xenioo
Costruire chatbot conversazionali ed intelligenti con Xenioo
 
Diving deep into NLP
Diving deep into NLPDiving deep into NLP
Diving deep into NLP
 
Voicebot: i Chatbot crescono e imparano a parlare
Voicebot: i Chatbot crescono e imparano a parlareVoicebot: i Chatbot crescono e imparano a parlare
Voicebot: i Chatbot crescono e imparano a parlare
 
IBM Watson, un caso reale
IBM Watson, un caso realeIBM Watson, un caso reale
IBM Watson, un caso reale
 
Gardy, un chatbot multilingua
Gardy, un chatbot multilinguaGardy, un chatbot multilingua
Gardy, un chatbot multilingua
 
Il più intelligente Chatbot Bancario in Italia!
Il più intelligente Chatbot Bancario in Italia!Il più intelligente Chatbot Bancario in Italia!
Il più intelligente Chatbot Bancario in Italia!
 
Chatbot, a chi proporli e come ... scegli il giusto target
Chatbot, a chi proporli e come ... scegli il giusto targetChatbot, a chi proporli e come ... scegli il giusto target
Chatbot, a chi proporli e come ... scegli il giusto target
 
Cicerus - una piattaforma per lo sviluppo di chatbot
Cicerus - una piattaforma per lo sviluppo di chatbotCicerus - una piattaforma per lo sviluppo di chatbot
Cicerus - una piattaforma per lo sviluppo di chatbot
 
Esplorando Google Assistant e Dialogflow
Esplorando Google Assistant e DialogflowEsplorando Google Assistant e Dialogflow
Esplorando Google Assistant e Dialogflow
 
Hubot + wit.ai, un chatbot aziendale per Slack
Hubot + wit.ai, un chatbot aziendale per SlackHubot + wit.ai, un chatbot aziendale per Slack
Hubot + wit.ai, un chatbot aziendale per Slack
 
Making Chatbots
Making ChatbotsMaking Chatbots
Making Chatbots
 
L'AI per Sales & Marketing B2B
L'AI per Sales & Marketing B2BL'AI per Sales & Marketing B2B
L'AI per Sales & Marketing B2B
 
Chatbot per i musei
Chatbot per i museiChatbot per i musei
Chatbot per i musei
 
Innovazione digitale e i chatbot 2017
Innovazione  digitale e i chatbot  2017Innovazione  digitale e i chatbot  2017
Innovazione digitale e i chatbot 2017
 
Trovare clienti con un chatbot
Trovare clienti con un chatbotTrovare clienti con un chatbot
Trovare clienti con un chatbot
 
Innovare la relazione con i clienti nel retail
Innovare la relazione con i clienti nel retailInnovare la relazione con i clienti nel retail
Innovare la relazione con i clienti nel retail
 
Moose.ai: migliorare la customer experience delle banche con un chatbot B2C &...
Moose.ai: migliorare la customer experience delle banche con un chatbot B2C &...Moose.ai: migliorare la customer experience delle banche con un chatbot B2C &...
Moose.ai: migliorare la customer experience delle banche con un chatbot B2C &...
 
Serverless chatbot: from idea to production at blazing speed
Serverless chatbot: from idea to production at blazing speedServerless chatbot: from idea to production at blazing speed
Serverless chatbot: from idea to production at blazing speed
 
I chatbot come sostituti delle app
I chatbot come sostituti delle appI chatbot come sostituti delle app
I chatbot come sostituti delle app
 

Sviluppare agenti conversazionali con Rasa

  • 2. Rasa ❖ Perchè Rasa? E’ scalabile e flessibile, consente di realizzare soluzioni personalizzate ❖ Che cos’è Rasa? E’ una piattaforma open-source strutturata su librerie di Python ❖ Chi può utilizzarlo? E’ semplice da utilizzare però sono richieste conoscenze di programmazione & machine learning
  • 3. Rasa Stack Rasa NLU Rasa Core Rasa X The car is broken! I have to call a tow truck, please The number to call is: 800-185- 001 ❖ Come funziona? ● Rasa NLU addestra l’agente a comprendere i messaggi dell’utente ● Rasa Core addestra l’agente a rispondere ai messaggi dell’utente ● Rasa X migliora le prestazioni dell’agente sfruttando conversazioni reali e gestisce il passaggio in produzione
  • 4. Rasa NLU ➔ Classificazione degli intenti (finalità) ➔ Estrazione delle entità (parole chiave) ➔ Ottimizzazione degli iperparametri
  • 5. Rasa NLU: Natural Language Understanding The car is broken! I have to call a tow truck, please Intent Classification Pipeline “The car is broken! I have to call a tow truck, please” {“intent”:”emergency_road_help”} Entity Extraction Pipeline “The car is broken! I have to call a tow truck, please” {“road_help”:”tow truck”} Vectorization Intent Classification Tokenizer Part of Speech Tagger Chunker Named Entity Recognition Entity Extraction
  • 6. -NLU model: viene generato un dataset di dati che raggruppa i messaggi dell’utente per finalità e mette in evidenza i termini chiave con i relativi sinonimi. -NLU pipeline: Rasa NLU consente di personalizzare il modello attraverso una pipeline di librerie definita nel file config.yml: language: “en” pipeline -name: “nlp_spacy” #loads the spacy language model -name: “tokenizer_spacy” #split the sentence into tokens -name: ”ner_crf” #defines the model which will be used for entity extraction -name: “intent_featurizer_spacy” #transform the sentence into a vector representation -name: “intent_classifier_sklearn” #uses the vector representation to classify using SVM -name: “ner_synonyms” #trains the synonyms
  • 7. Rasa Core ➔ Pianificazione dei dialoghi ➔ Gestione del dominio
  • 8. *greet U: Hello! -utter_greet B: Hello, I can offer you assistance on emergency situations, what number are you looking for? *emergency_road_help{“Road_help”:“tow truck”} U: The car is broken! I need to call a tow truck, please -utter_action_road_help_ B: The number to call for any type of emergency in Europe is: 112. Depending of your country you can call the following numbers: Austria - 120 . . . . . *affirm U: Many thanks -utter_affirm B: You're welcome Stories: viene generato uno schema di conversazioni reali tra utente e agente
  • 9. Intents: actions: -greet -utter_greet -emergency_ambulance -utter_action_help_ambulance -emergency_insurance_number -utter_action_help_insurance -emergency_fire -utter_action_help_fire -emergency_police -utter_action_help_police -emergency_road_help -utter_action_road_help -emergency_air_rescue -utter_action_help_air_rescue -affirm -utter_affirm -__main__.ApiAction entities: -ambulance -insurance -fire -police -road_help -air_rescue Domain: viene specificata l'architettura del dialogo con le finalità, i termini chiave, le azioni e le risposte utilizzate dall’agente e gli slot che aiuteranno l’agente a tenere traccia del contesto.
  • 10. Rasa X ➔ Apprendimento dalle reali conversazioni ➔ Passaggio in produzione