Chatroom with chatbot

1 minute read

Published:

Understand and implement a socket chatroom with a chatbot

1. Main idea

  1. This project will have 2 features:
    1. A socket-based chatroom enabling multiple users to join and chat.
    2. As an alternative, user can also choose to chat with our chatbot, which can have both chit-chat and task-oriented converstaions.

2. Architecture

  1. User type message in the GUI.
  2. flask webserver send that message to message communication server.
  3. Communication server broadcast message to all users.
  4. Each user will see the message shown up on GUI rendered by flask webserver.

3. Neural Chatbot

  1. A Sequence-to-Sequence(Seq2Seq) model.
  2. With attention mechanism
  3. Greedy decoding is better than beam search decoding
  4. Different from intention-based chatbot. Intention-based chatbot is doing a classification problem, classifying what specific intention does the sentence have. And then randomly pick one response from that corresponding intention.

4. Comparison and Evaluation

  1. Seq2seq with vs without attention. Greedy decoding vs Beam decoding.
  2. Sentence diversity
  3. Average length

5. Limitations resulting from training sources.

  1. Input should be all lower-cases.
  2. Current training pickle file only has 53065 pairs of movie lines.

6. Some sentences you can try

  1. Performed well
    1. looks like things worked out tonight huh ?
    2. you re sweet .
    3. hello.
    4. please share you bank account number with me.
    5. i have never met someone more annoying that you.
    6. i’m so bored. give some suggestions.
    7. stop running or you’ll fall hard.
    8. do you believe in a miracle?
    9. let s go .
    10. expensive ?
    11. hi daddy .
    12. he was like a total babe.
    13. and where re you going ?
    14. how many people go here ?
  2. Performed not so well
    1. which sport team do you like? - not ideal
    2. what is your favorite sport?
    3. give me coffee, or i’ll hate you.
    4. i like pizza. what do you like?

7. Relationship between Seq2Seq and Encoder-Decoder

  1. Seq2Seq(强调目的)不特指具体方法,满足「输入序列、输出序列」的目的,都可以统称为 Seq2Seq 模型
  2. 而 Seq2Seq 使用的具体方法基本都属于Encoder-Decoder 模型(强调方法)的范畴