Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Research and development of dialogue systems wi...

Research and development of dialogue systems with Rasa

Presenting an overview of the Rasa platform.
- A complete platform for dialogue systems
- Suitable for research, tech transfer, and product development
- Highly modular and extensible
- Open-source and has an active and growing community

Alexis Smirnov

September 17, 2019
Tweet

More Decks by Alexis Smirnov

Other Decks in Technology

Transcript

  1. Expert guidance in the complex healthcare systems Dialogue: a full-stack

    virtual clinic INTAKE DISPATCH CONSULT NAVIGATION FOLLOW-UP Patient evaluation with bots and human-in-the-loop conversational UI Dispatch to the right medical resource: a nurse, MD or out-referral Assured efficacy and continuity of care Live chat, call or video for advice, counselling, diagnosis or prescription
  2. Rasa: a platform for dialogue systems Rasa is a set

    of open-source ML tools for research and development of dialogue systems • NLU: a pipeline for intent classification and entity extraction • Core: a framework for ML-based sequential, contextual decision making
  3. A single system for research, technology transfer and product development

    Backend, CRM, database, API, etc. Dialogue Management State Tracker Policy pipeline Actions NLU Pipeline Featurization, intent classification, entity extraction NLG Natural text, Target Language Suggested replies, structured messages Connector Modules Web, In-App, Messenger, Phone SMS, Slack, Alexa, etc. “Hello! I want to change my address.” (User Request via text or voice) “You don’t have one on file. What’s your address?” (AI response via text or voice) User Backend Data Control Developers and researchers keep complete control of their data and user interactions Via communication channel:
  4. NLU: extract the structured data from unstructured user inputs, given

    context Training data intent: order_pizza - Deliver a large pizza to my place - Want some pizza please for lunch in the office intent: greet - Hello - hi Context: User profile - home address - work address
  5. Extending NLU pipeline: Supervised Word Embeddings Learn embeddings for both:

    intents and the words simultaneously. Then, rank the similarity between an input sentence and all of the intents. - Low memory footprint - Detects multiple intents - Fewer out-of-vocabulary issues Reference: StarSpace (Wu et al) Baseline bag-of-word-vectors approach: Represent sentences as a sum of pre-trained word vectors, and train a classifier on that representation supervised_embeddings
  6. Extending NLU pipeline: Components and extensions Tokenizers: WhitespaceTokenizer, MitieTokenizer, SpacyTokenizer,

    … Word Vector Sources: Mitie, Spacy, ... Featurizers: Mitie, Spacy, NGram, Regex, CountVectors, ... Intent Classifiers: KeywordIntentClassifier, MitieIntentClassifier, SklearnIntentClassifier, EmbeddingIntentClassifier, ... Entity Extractors: MitieEntityExtractor, SpacyEntityExtractor, EntitySynonymMapper, CRFEntityExtractor, DucklingHTTPExtractor … https://rasa.com/docs/rasa/nlu/components/
  7. Rasa Dialogue Management Modular and extensible architecture: All components and

    models can be changed. Multi-Agent: Integrate multiple dialogue policies and actions. Support multi-agent scenarios and ensemble policies. Online Training: Learn from real conversational data. Close the feedback loop using the real-time user feedback.
  8. Dialogue as event sequence U: Hello B: Hello. I am

    Sara and I would like to help you get started with Rasa. What is your name? U: I am Juste B: And where are you from? U: From Berlin B: Have you used Rasa before? U: Yes. B: Then, you should check out our latest blog. U: Thanks. *greet utter_greet * name {firstnname: Juste} utter_ask_home_location * location {city: Berlin} utter_used_rasa * affirm utter_send_blog * thanks
  9. Dialogue state handling “What’s the weather like tomorrow?” Intent Classification

    Entity Extraction next_best_action: action_weather, 87% utter_greet, 5% utter_goodbye, 4% Entities: date: 09/18/2019, 75% Intent: weather: 98% “It will likely be sunny and 20°C.” Response generator Response Slots: temp: 20 deg., sunny 70% Calls a weather service LSTM Policy history state slots previous_states: max_history: 3 current_state NLG Inference Policy Handoff Policy NLU Tracker Policy ensemble Action runtime
  10. Extending dialogue management: Components and extensions Tracker store: In-memory, Redis,

    Postgres, etc. Event sink: RabbitMQ, Kinesis, Segment, ... Policy: LSTM, REDP, Forms, Patient evaluation policy,…. Actions: retrieval-based response selection NLG: Template-based NLG, external service,...
  11. Takeaways June 2019 Review • Rasa is a complete platform

    for dialogue systems • Suitable for research, tech transfer, and product development • Highly modular and extensible • Open-source and has an active and growing community
  12. Dialogue is looking for a Principal Applied Research Scientist [email protected]

    rasa.com/research Rasa Developer Summit in San Francisco, September 24th Thank you!