Buy:
|
NLP: Chatting Robot
Note: Lesson plan and resources for this activity can be found at the bottom of this page.
Overview
Introduction
Can computers think? This was a question posed by computer pioneer and artificial intelligence (AI) theorist, Alan Turing. Turing proposed that, given time, a computer with sufficient computational power would acquire the abilities to rival human intelligence. In order to test his theory, Turing devised a test.
The Turing Test was based on a Victorian parlour game in which a judge (or interrogator) asks a series of questions to a man and a woman in a separate room. By reading a series of typed answers, the judge must determine which replies were from the man and which were from the woman.
Turing adapted the test by replacing the woman with a computer - the aim being to decide whether the answers were from a man or computer thus determining if a computer was able to think for itself.
To find out more about Alan Turing and the Turing Test, click on the links below:
The Turing Test was based on a Victorian parlour game in which a judge (or interrogator) asks a series of questions to a man and a woman in a separate room. By reading a series of typed answers, the judge must determine which replies were from the man and which were from the woman.
Turing adapted the test by replacing the woman with a computer - the aim being to decide whether the answers were from a man or computer thus determining if a computer was able to think for itself.
To find out more about Alan Turing and the Turing Test, click on the links below:
- http://www.turing.org.uk - Online biography about Alan Turing
- http://en.wikipedia.org/wiki/Alan_Turing - Alan Turing wikipedia page
- http://www.bbc.co.uk/history/people/alan_turing - BBC History: Alan Turing
- http://en.wikipedia.org/wiki/Turing_test - The Turing Test wikipedia page
- http://www.turing.org.uk/scrapbook/test.html - Alan Turing Scrapbook: The Turing Test
Natural Language Processing (NLP)
Natural language processing (NLP) refers to the branch of computer science—and more specifically, the branch of artificial intelligence (or AI)—concerned with giving computers the ability to understand text and spoken words in much the same way humans can.
Chatbots A chatbot is a computer program that simulates and processes human conversation (either written or spoken), allowing humans to interact with digital devices as if they were communicating with a real person. Have you ever wondered why chatbots are created? They are meant to make it feel as if we are talking to a real human because this is what we are comfortable with. |
Lesson Plan
Lesson Plan: Chatting Robot
Creating a Machine Learning Sentiment Analysis Bot
This lesson is aligned with the National Curriculum in England: Secondary Curriculum (Key Stage 2/3)
Overview
In this lesson, students will create a chatting robot using machine learning and NLP.
Learning Objectives
Materials Needed
Lesson Outline
Starter (10 mins)
Direct students to one of the online chat bots listed below. Instruct students to ask the chat bots a series questions and note down any unusual or unexpected answers.
Note: Some online chat-bots learn from previous conversations. As a result, there may be some cases where what the chat bot says may be deemed as inappropriate. Use these sites at your own risk. TeachwithICT.weebly.com is not responsible for the content of external Internet sites.
Online chat bots:
After a few minutes, stop the class and ask them to feedback their findings to the rest of the class.
Note down some of the students’ findings and ask the students why they think the chat bot could not answer all of their questions.
Ask the students why you think it is so hard to make a computer appear as if it able to think like a human. Try to draw out answers such as “Computers can only follow a given sequence of instructions” or “Computers can only respond to questions they have been programmed to answer” – give students prompts where necessary.
Explain to students about the Turing Test and discuss the concept of Artificial Intelligence (AI). Finally, inform students that they are going to create a chatting robot (chat bot) and that there will be a prize for the most convincing robot (the prize is optional).
Introduction (10 mins)
Introduce the concept of Natural Language Processing (See description above) and it's applications in everyday life (e.g., virtual assistants, translation tools, predictive text etc.).
Inform the students that they will be creating an NLP-powered chatbot, using an experimental version of Scratch and machine learning techniques.
Hands-On Activity (30 mins)
Plenary (10 mins)
Direct students to swap places with a partner or person next to them and try out their chat bot. Instruct the students to leave a comment in their partner’s code suggesting at least one improvement. After a few minutes, ask the students to return to their seats and make any suggested improvements.
As an extra incentive, you could offer a prize for the most convincing chat bot (almost like a mini Loebner Prize - http://en.wikipedia.org/wiki/Loebner_Prize) However, rather than rewarding the students with $6,000 for creating the most convincing chat bot, I suggest some chocolate instead!
Assessment Criteria
Creating a Machine Learning Sentiment Analysis Bot
This lesson is aligned with the National Curriculum in England: Secondary Curriculum (Key Stage 2/3)
Overview
In this lesson, students will create a chatting robot using machine learning and NLP.
Learning Objectives
- Understand the basic principles of machine learning and its applications
- Understand and use sequence in an algorithm
- Understand and use iteration in an algorithm (FOR and WHILE loops)
- Understand and use selection in an algorithm (IF, Else and Else if)
- Develop skills in creating and training a machine learning model.
- Create an NLP chatbot using Scratch and machinelearningforkids.co.uk.
Materials Needed
- Computers with internet access
- Access to machinelearningforkids.co.uk
- Scratch 3 (online version via machinelearningforkids.co.uk)
- Projector and screen for demonstration
- Handouts with step-by-step instructions (see resources below)
Lesson Outline
Starter (10 mins)
Direct students to one of the online chat bots listed below. Instruct students to ask the chat bots a series questions and note down any unusual or unexpected answers.
Note: Some online chat-bots learn from previous conversations. As a result, there may be some cases where what the chat bot says may be deemed as inappropriate. Use these sites at your own risk. TeachwithICT.weebly.com is not responsible for the content of external Internet sites.
Online chat bots:
- Evie (recommended!) - http://www.existor.com
- Jabberwacky - http://www.jabberwacky.com
- Brain Bot - http://www.botlibre.com/chat.jsp
- SkyNet Ai - http://home.comcast.net/~chatterbot/bots/AI/SkynetV5/
- Clever Bot - http://www.cleverbot.com
After a few minutes, stop the class and ask them to feedback their findings to the rest of the class.
Note down some of the students’ findings and ask the students why they think the chat bot could not answer all of their questions.
Ask the students why you think it is so hard to make a computer appear as if it able to think like a human. Try to draw out answers such as “Computers can only follow a given sequence of instructions” or “Computers can only respond to questions they have been programmed to answer” – give students prompts where necessary.
Explain to students about the Turing Test and discuss the concept of Artificial Intelligence (AI). Finally, inform students that they are going to create a chatting robot (chat bot) and that there will be a prize for the most convincing robot (the prize is optional).
Introduction (10 mins)
Introduce the concept of Natural Language Processing (See description above) and it's applications in everyday life (e.g., virtual assistants, translation tools, predictive text etc.).
Inform the students that they will be creating an NLP-powered chatbot, using an experimental version of Scratch and machine learning techniques.
Hands-On Activity (30 mins)
- Direct students to machinelearningforkids.co.uk and have them click on 'try it now'.
- Guide students through creating a machine learning project that recognises text.
- Share the instructions for creating an AI chatbot (below) and challenge students to create their own chatbot on a topic of their choice.
- Once the training is complete, have students test their model using the examples they supplied and new ones.
Plenary (10 mins)
Direct students to swap places with a partner or person next to them and try out their chat bot. Instruct the students to leave a comment in their partner’s code suggesting at least one improvement. After a few minutes, ask the students to return to their seats and make any suggested improvements.
As an extra incentive, you could offer a prize for the most convincing chat bot (almost like a mini Loebner Prize - http://en.wikipedia.org/wiki/Loebner_Prize) However, rather than rewarding the students with $6,000 for creating the most convincing chat bot, I suggest some chocolate instead!
Assessment Criteria
- Understanding of machine learning concepts and applications.
- Ability to create and train a machine learning model with appropriate examples.
- Successful creation of an NLP chatbot using Scratch.
Step-by-step instructions:

chatbot_worksheet__scratch_.pdf |