Frontiers of dialogue technology

Building Chatbots in Python

Alan Nichol

Co-founder and CTO, Rasa

A neural conversational model

"What do you think of Cleopatra?" "Oh, she's very regal"

"What do you think of Messi?" "He's a great player"

Building Chatbots in Python

Seq2seq

  • Machine translation
  • Completely data driven, no hand-crafting
  • Requires large amount of data
  • No guarantee that output is coherent
  • Difficult to integrate DB / API calls & other logic
Building Chatbots in Python

Grounded dialogue systems

  • Systems you've built in this course: hand-crafted
  • Seq2seq: Data driven
  • ML based dialogue systems:
    • NLU
    • Dialogue state manager
    • API logic
    • Natural language response generator
  • Human pretend to be a bot: "Wizard of Oz" technique
  • Reinforcement learning
    • Receives a reward for a successful conversation
Building Chatbots in Python

Language generation

  • Not recommended if building a bot
  • Pre-trained neural network which can generate text
  • Scripts of every episode of The Simpsons
Building Chatbots in Python

Generating sample text

generated = sample_text(
    saved_params,
    temperature,
    num_letters=num_letters,
    init_text=text
)
Building Chatbots in Python

Let's practice!

Building Chatbots in Python

Preparing Video For Download...