본문 바로가기

Labs · AI history · rule-based chatbots

Build a Chatbot: Patterns and Replies

Write the rules of your own chatbot: if the message has these words, give this reply. Use stars to catch the user's words and turn 'my' into 'your', the trick that made ELIZA (1966) seem to understand.

5 levelsFree bench

In the exam

9618/12 May/June 2023 · Question 7(d) · 3 marks

One section of the program being developed will convert the user's speech into commands. Explain how Artificial Intelligence (AI) can be used in this program.

Points that gain marks

  • It uses speech recognition.
  • It identifies key words or phrases that were spoken.
  • It matches them to a database.
  • It produces the most likely sentence, command or word.

9618/13 May/June 2024 · Question 7(b) · 3 marks

A robot uses Artificial Intelligence (AI) to communicate with customers, who speak to it to order their food and drinks. Explain how AI will be used in this part of the robot.

Points that gain marks

  • Voice (speech) recognition: the sound is recorded and analysed.
  • The recording is compared to a database of words and sound waves, and the word with the highest probability is chosen.
  • Natural language recognition: the words are combined and compared to known sentences.
  • The programmed action for the matching sentence is carried out.

In this lab: Your rules are the last two points: the bot looks for key words in the message, compares them with its known patterns, and carries out the action (the reply) of the first pattern that matches.

IGCSE 0478/12 October/November 2025 · Question 7(c) · 4 marks

A smart speaker has machine learning capabilities. Explain how the smart speaker can use machine learning to improve the voice command input.

Points that gain marks

  • It gathers data from many different voices, or asks the user to say lots of words.
  • It analyses and identifies patterns in the user's voice, and adapts its own processes.
  • It stores successful and unsuccessful voice commands.
  • It can learn different ways of making the same request, different accents, and to ignore background noise.

In this lab: Level 4 shows why learning matters: your rule bot needs a new rule for every way of saying “tired”. A machine-learning speaker learns those ways from many examples instead.

More real experiments

로그인 또는 계정 만들기

IGCSE, A-Level & AP