AI Curriculum for Junior Secondary Students
AI Curriculum for Junior Secondary Students
The Education Bureau actively promotes innovation and technology (I&T) education
for all students. Through the continuous incorporation of I&T learning elements into
both the primary and secondary curricula, it strengthens the cultivation of students’
interest in and capability of learning information technology and I&T from an early age,
equips students with the 21st century skills, and unleash their creativity and potential.
To enhance I&T education, the Education Bureau has launched the “Module on
Artificial Intelligence for Junior Secondary Level” for schools to adopt. This curriculum
module aims to help teachers integrate I&T elements into classroom learning more
systematically. Schools should conduct appropriate curriculum planning to incorporate
10 to 14 hours of artificial intelligence learning into the junior secondary curriculum in
the “Information and Communication Technology” category under Technology
Education Key Learning Area so as to further cultivate students’ computational thinking
and strengthen their innovative technology learning.
The “Module on Artificial Intelligence for Junior Secondary Level” is adapted from
“CUHK Jockey Club AI for the Future Project” funded by The Hong Kong Jockey Club
Charities Trust and jointly organised by Faculty of Engineering and Faculty of
Education of The Chinese University of Hong Kong. The Education Bureau is grateful
for the collaboration with The Hong Kong Jockey Club Charities Trust in consolidating
and drawing on the experience accumulated by the schools in the project to develop the
“Module on Artificial Intelligence for Junior Secondary Level” for adoption by all
publicly-funded schools in Hong Kong. The Technology Education Section,
Curriculum Support Division of the Education Bureau collaborated with Faculty of
Engineering and Faculty of Education of The Chinese University of Hong Kong in
developing the curriculum module based on the deliverables produced and experience
gained in the project. Views on the content of the curriculum module were collected
from the Curriculum Development Council Committee on Technology Education and
their support was sought.
The “Module on Artificial Intelligence for Junior Secondary Level” aims to provide an
Artificial Intelligence (AI) curriculum for junior secondary students. AI permeates our
daily lives, and the development of technology is also advancing rapidly. It is, therefore,
of utmost importance that our young students get exposure to AI as early as possible,
understand its capabilities and limitations, and become able to further envision its
possible future development. By learning about AI and its applications, students will
gain a better understanding of how their studies and lives relate to AI. Under the
guidance of teachers, they may also think more deeply about ethical considerations
regarding AI technology and its applications, thereby learning to become ethical
technology users.
This curriculum module provides relatively foundational AI learning content suitable
for meeting the learning needs of junior secondary students and building up their
understanding of AI and related topics, thus stimulating their interest in learning
innovative technology, enhancing their capability to apply innovation and technology,
as well as enabling them to benefit society and the world by utilising AI.
The “Module on Artificial Intelligence for Junior Secondary Level” covers topics such
as AI basics, AI ethical principles, computer vision, computer speech and language, AI
computer simulation, AI in robotics reasoning, societal impact of AI, and AI and future
of work. The curriculum is organised into three different levels (please refer to Table 1
for details), and teachers can arrange the teaching sequence according to learning and
teaching needs. The key components of the curriculum module include AI ethical
principles, societal impact of AI, and AI and future of work. In addition to the core
teaching materials, this curriculum module also includes worksheets, assessment
exercises, supplementary materials, and hardware support, in order to meet the needs of
learning and teaching.
Table 1 Course modules and suggested schedule
Booklet 1
7 lessons; 35 minutes each
Introduction to AI
AI Basics (I)
AI Ethical Principles
Computer Vision (I)
Computer Speech & Language (I)
AI and Computer Simulation (I)
AI in Robotic Reasoning (I)
Booklet 2
8 lessons; 35 minutes each
AI Basics (II)
AI Ethical Issues
Computer Vision (II)
Computer Speech & Language (II)
AI in Robotic Reasoning (II)
AI and Future of Work (I)
Societal Impact of AI (I)
Group Project Design, Development and Presentations (I)
Booklet 3
6 lessons; 35 minutes each
Team members from The Chinese University of Hong Kong (CUHK)’s Faculty of
Engineering and the Faculty of Education:
Professor CS CHAI,
Professor Philip FU,
Professor Irwin KING,
Professor Wai LAM,
Professor Darwin LAU,
Professor Dahua LIN,
Professor Xunying LIU,
Professor Anthony SO,
Professor Tien Tsin WONG,
Professor Savio WONG,
Dr. Chandni SAXENA,
Dr. Simon WONG,
Dr. Symphony XING,
Dr. Sammi YAU,
Mr. Zhe XU,
Mr. Derek CHEUNG,
Miss Mandy TAM and
Mr. Michael CHUI.
In addition, the Pioneering Schools of the CUHK Jockey Club AI for the Future
Project.
Table of Content
8
9
Lesson Plan
Expected lesson time: 35 mins
Time
(minutes in class / Learning
Topic *Task
pre-lesson / after Resources
lesson)
Web-based tool
1.1 Model Training and Testing 1 5 mins
and dataset
Web-based tool
2 5 mins
and dataset
1.2 Problems in Training Data
Web-based tool
3&4 10 mins
and dataset
*Remarks
Teachers can assign tasks flexibly (pre-lesson, in-class, or assessment), and not all tasks are required
to be involved in lesson time.
Prior to playing any reference video in a unit, it is important for teachers to carefully review the content
to ensure its suitability for teaching purposes before proceeding with playing it.
9
10
Model Training
Machine learning is a subfield of AI, with the aim to automatically “learn” models from data such that the
models can mimic human intelligence in performing certain tasks. Figure 1.1 shows an example of a model
training process. In this task, we want to train a model to classify whether the images show dogs or cats. The
training inputs are images of dogs or cats, and are labelled accordingly. These labels are the correct answers
that we want the model to output, so we call them reference outputs. The output generated from an input
image is called generated output. We denote the model before training as the initial model (M0). During
training, the machine learning algorithm will update the model parameters, aiming to obtain an optimal model
with minimum error between the generated output and the reference output. We will refer to the model
after training as the trained model (M*).
10
11
Model Testing
Figure 1.2 shows the process of model testing. After training, we have the trained model (M*). The input
to test this model is an image. The trained model (M*) should be able to classify the image to be showing a
dog or a cat. The testing images should be images that the model has never seen before. If the model is trained
well, the generated output will likely be the correct label.
Figure 1.3: Training and testing the “cat versus dog” image classifier
1. Please enter the following link or scan the QR code to visit the website.
[Link]
2. Collect images of dogs and cats, and use them as training or testing data.
3. Train the model with the training data, and test the trained model with testing data samples.
4. What is the output?
The trained model usually can recognize the images as showing cats or dogs correctly.
11
12
In machine learning, the AI model learns from data. Therefore, the training data is a very important factor
that determines the quality of the trained AI model. Various qualities of the training data may influence the
AI model.
1. Please use only ONE dog image and ONE cat image as the training data
2. Re-train the model and test with a testing image.
3. What is the output?
The model trained on the small training dataset generates incorrect output for the testing data sample(s).
12
13
1. Please add other animal images (e.g. rabbit, elephant) to the training dataset
2. Re-train the model and test with a new image
3. What is the output?
The model trained on the noisy training dataset may still generate the correct output for some of the
testing data samples, but the overall performance of the model has dropped.
13
14
1. Please use ONE cat image and TEN dog images as the training data
2. Re-train the model and test with a testing image
3. What is the output?
The model trained on the unbalanced training dataset does not perform as well.
14
15
An artificial neural network (ANN), or neural network, is a class of machine learning models that is inspired
by the human brain. A deep neural network (DNN) is an ANN with many layers and therefore is described
as “deep”. Just like other machine learning models, DNN can learn from data to perform intelligent tasks.
Human intelligence originates from the human brain, which consists of numerous connected neurons. At a
very high level, neural networks resemble the human brain because they consist of many connected
perceptrons. The DNN accepts input through the input layer and computations take place throughout the
hidden layers to generate output delivered via the output later (Figure 1.8).
15
16
1.4 Generative AI
Generative AI (such as ChatGPT and Midjourney) refers to a subfield of AI where complex neural networks
(named “Transformers”) can be used to generate new content, such as text, images, audio, code, music,
videos, etc. Recent breakthroughs in generative AI have the potential to revolutionize many fields such as
arts, design and entertainment.
ChatGPT belongs to the family of language models named GPT (Generative Pre-trained Transformers).
ChatGPT can understand human inputs (referred to as “prompts”) and respond with generated, human-like
response in real-time. With the help of ChatGPT, generative agents can simulate human-like behaviour and
interact in a virtual town like the game The Sims.
16
17
17
18
18
19
Learning Summary
• AI model training and testing: AI can learn from labelled training data to produce a trained model for a
given task, and apply the trained model on new testing data.
• The quality of training data is important: A well-trained AI model requires a large amount of data,
accurately labelled (i.e. with low noise), and well-balanced to cover different variations in the data. The
quality of the training data affects the performance of the AI model.
• Artificial neural network: A class of machine learning models that is inspired by the human brain. A deep
neural network (DNN) is an ANN with many layers. Just like other machine learning models, a DNN
can learn from data to perform intelligent tasks.
• Generative AI refers to a subfield of AI where complex neural networks (named “Transformers“) can be
used to generate new content, such as text, images, audio, code, music, videos, etc.
19
20
1. The quality of the training data is important. The performance of a model may typically degrade with
small training datasets, noisy training datasets and unbalanced training datasets.
2. A perceptron in a neural network resembles a neuron in the human brain.
2. Which of the following is the most likely to IMPROVE model performance? (A)
3. Which of the following does NOT belong to artificial neural networks? (B)
A. Input layer
B. Neurons
C. Output layer
D. Hidden layer
C. Short questions
20
21
2. Give an example of a real-life situation where it is difficult to train machine learning model that
performs well.
A student wants to train a classification model to recognize different kinds of birds. However, the student
is unable to find a sufficient number of clear photos of rare bird species. The model he / she trains is
probably unable to recognize the rare bird species well.
21
22
Lesson Plan
Expected lesson time: 35 mins
B. Skills:
1. Apply the AI ethical principles and identify the possible risks in the use of AI technologies.
C. Attitudes:
1. Be aware of possible risks of AI technologies and applications.
Time
(minutes in class / Learning
Topic *Task
pre-lesson / after Resources
lesson)
2.1 UNESCO Recommendation on the Ethics
3 mins
of AI
2.2 AI Principles and Ethical Issues
*Remarks
Teachers can assign tasks flexibly (pre-lesson or in-class activities), and not all tasks are required to
be involved in lesson time.
Prior to playing any reference video in a unit, it is important for teachers to carefully review the content
to ensure its suitability for teaching purposes before proceeding with playing it.
22
23
AI is developing rapidly and shaping our future. The most important consideration in the development of AI
is to ensure sustainable benefits -- to be “human-friendly” and “earth-friendly”. Recently, United Nation’s
Education, Scientific, and Cultural Organisation (UNESCO) has developed a guideline of ethical AI and
provided the recommendations of AI ethical principles. The recommendations also outlined support of
concrete policy actions to achieve the goal of developing ethical AI systems.
In the next section, we will have an in-depth discussion of issues related to five selected AI ethical principles
-- transparency, justice and fairness, beneficence, responsibility and privacy.
image recognition model, it will recognize it as a banana. However, if we place a colorful sticker next to the
banana, the model outputs the label “toaster”. Presently, the image recognition model lacks transparency
and it is difficult to explain why adding a sticker to the input image can cause this change. To counter these
problems, the development of transparent AI models will be a key direction of the future.
2.2.2 Justice and Fairness: The development of AI technologies and their applications must ensure
equality, inclusion and diversity. “Justice and fairness” can be considered as the rules of fair play. AI
should promote justice and seek to eliminate all types of discrimination.
[Link] [Link]
cons-of-using-ai-in-recruiting/ 55985943
24
25
Disadvantage(s):
AI may follow a set of patterns in an interview dialog and may not be able to conduct a dialog with
AI algorithms can be biased (e.g. gender bias or age bias) and AI models can make mistakes.
People going through the hiring process may not feel comfortable with a non-human interviewer.
2.2.3 Beneficence: “Beneficence” refers to the development and application of AI technologies that must
not do any harm. AI should promote well-being, preserve dignity, and enhance sustainability. AI should
ultimately be developed for the common good and benefit of all humanity – “do good and do no harm”.
25
26
[Link]
/
26
27
2.2.4 Responsibility: “Responsibility” refers to the development and application of AI technologies that
must uphold accountability and honesty. The development of AI systems and how they compare with the
fundamental human values should ensure well-being of humanity.
Figure 2.4: The trolley problem faced by a self-driving car (image source: [Link], link)
27
28
[Link] [Link]
[Link] [Link]/words-at-
l/[Link] play/trolley-problem-moral-
philosophy-ethics
The trolley problem MIT moral machines experiment The ethical dilemma of self-
driving cars
1. Moral decisions need to be programmed for self-driving cars. What should those decisions be?
E.g. consider humans versus pets, women versus men, healthy versus sick, young versus old,
high social status versus low social status, more lives versus fewer lives.
Possible parties may include AI programmers (who built the AI models making the decisions);
28
29
2.2.5 Privacy: While developing AI technologies and incorporating them into real applications, sensitive data
must be protected and secured. AI systems create new privacy and ethical challenges. AI and machine
learning consume massive volumes of data to learn to improve the AI model’s decision-making process.
However, there are numerous examples in which the power of AI algorithms results in privacy issues and
ethical dilemmas. The principle of privacy should be to protect and secure sensitive data.
1. What types of personal data can your phone collect about you?
Name; website visited; email address and other contact details; geolocation; social network contacts.
When I am clicking or typing; speaking; browsing or purchasing; taking or uploading photos and videos;
contacting friends, etc.
29
30
Learning Summary
• AI can help (i.e. do good) and AI can hurt (i.e. do harm). We need to consider possible benefits versus
harm in AI applications.
• In November 2021, UNESCO’s Recommendation on the Ethics of Artificial Intelligence was adopted by
the 193 Member States as the first global standard.
• The ethical principles raise awareness of possible risks of AI technologies and applications and guide the
ethical development and development of AI to benefit humanity.
30
31
1. Accidents involving self-driving cars raise concerns about accountability, which is related to the AI
ethical principle of responsibility .
1. Which of the following is an action in response to the principle of justice and fairness? (A)
A. Balance the data from female and male engineers to mitigate gender discrimination in AI hiring
assistants.
B. Make sure the applications do not bring any harm to people.
C. Include illustrations and explanations of AI applications and products to help users better
understand them.
D. Protect users’ personal information.
2. What is/are the possible outcome(s) for users in allowing virtual assistants to collect their personal
information? (C)
(1) The virtual assistants will be able to provide more personalised recommendations for their users.
(2) The AI technologies supporting the virtual assistant applications will be able to infer the users’ daily
routines based on their geolocation information.
(3) Their personal information, if insufficiently protected, may be easily accessed by third parties
without their knowledge.
A. Only
B. (2) and (3)
C. (1), (2) and (3)
D. None of the above
C. Short questions
1. How can we balance the need for more accurate algorithms with the need for transparency towards
people who are being affected by these algorithms?
31
32
Lesson Plan
Expected lesson time: 35 mins
B. Skills:
1. Indicate the potentials and limitations of CV technology.
Time
(minutes in class / Learning
Topic *Task
pre-lesson / after Resources
lesson)
*Remarks
Teachers can assign tasks flexibly (pre-lesson, in-class, or assessment), and not all tasks are required
to be involved in lesson time.
Prior to playing any reference video in a unit, it is important for teachers to carefully review the content
to ensure its suitability for teaching purposes before proceeding with playing it.
32
33
In the way that humans see the world, images are composed of shapes and colors. However, computers can
only process numeric values.
Pixels
If you zoom closely into an image, you will see that it is made up of squares at different positions and each
square only has one color. These squares are the smallest unit of an image and are called pixels. Figure 3.1
(left side) is an image of a parrot with 700×700 pixels. We further converted it into 36×36 pixels (Figure 3.1,
middle) and 18×18 pixels (Figure 3.1, right side) by averaging the colors so that you can see a pixel more
clearly.
Colors
Colors can be represented as numbers.
A grayscale image is made up of pixels with different shades of gray varying from black (represented as the
number 0) to white (represented as the number 255).
A color image is made up of pixels with a red component (R), a green component (G), and a blue
component (B). Each component can vary and is represented as a number from 0 to 255 (inclusive). A
combination of different RGB components becomes different colors.
33
34
34
35
These are actually the numbers that represent this 3×3 image in a computer. You can see that when an image
is represented as its RGB components, an image with 3×3 pixels is stored as 3×3×3 = 27 numbers. Can you
try to calculate how many numbers are there to represent the original image of 700×700 pixels (Figure 3.1
left)?
700×700×3 = 1,470,000
One popular task in Computer Vision (CV) is image classification. In Unit 1 of Booklet 1 entitled
“Introduction to AI”, the AI model which can classify an input image as “rock”, “paper” or “scissors” is an
image classification model. Image classification is the task of classifying an image to be a class among a set
of pre-defined classes. For example, if we have many images of either an apple, an orange, or a banana, a
trained AI model can classify them accordingly.
Images (a), (d), (f) and (h) are showing birds because a bird usually has a sharp beak and two legs.
Images (b), (c), (e) and (g) show zebras because they usually have black-and-white stripes on their skin
and each zebra has four legs.
We can classify objects using their distinctive characteristics and these characteristics are called features.
Features that help classify an image of a bird versus a zebra include: birds usually have sharp beaks, while
mouths of zebras are round. Also, zebras have a special black-and-white stripe pattern, while birds generally
do not. A third point is that each zebra has four legs, while each bird has two legs. A fourth point is that each
bird has two wings, while zebras do not have wings.
37
38
As you may imagine, if we can develop an AI model to extract the features used by humans to classify images,
then the AI model should also be able to perform image classification tasks. However, it is generally very
difficult to extract the exact features used by humans.
For example, it is difficult to specify precisely what the feathers of birds look like. In Figure 3.6, the feathers
of the birds may be very different: (a) has long feathers, (d) has colourful patterns, textures of feathers of (f)
can hardly be seen, and feathers of (h) look fluffy.
The Convolutional Neural Network (CNN) is a class of deep learning models which is frequently used in
CV tasks. Figure 3.7 illustrates a CNN. In a CNN, we may have multiple convolutional layers (i.e. dark
green blocks in Figure 3.7) and they are important for capturing the features from the input. This CNN
example takes an image as the input and can output the predicted class of the image.
38
39
Features in a CNN
A CNN can have multiple convolutional layers and each convolutional layer can have multiple filters.
Different filters can learn to capture different features during training. Figure 3.8 shows some images after
being processed by a convolutional layer of the CNN (please refer to Figure 3.7, second layer counted from
the input side), and are sampled from 3 randomly selected (out of a total of 64) filters in that layer.
Figure 3.8: Features from different input images, extracted by three randomly selected filters in a
convolutional layer (layer 2) of a trained CNN
39
40
Figure 3.9: Features from different input images, extracted by a randomly selected filter for each of the
earlier to later convolutional layers (layer 2, layer 5, layer 9, layer 13, and layer 17) in a trained CNN
Earlier convolutional layers look for features in a smaller region in the image (i.e. lower-level features). For
example, in Figure 3.9, the image in row 2 column 2 shows a filter in an early convolutional layer (i.e. layer
2 of the CNN in Figure 3.7) which captures the detailed texture of the peacock’s tail. Later convolutional
layers look for features in a larger region in the image (i.e. higher-level features). For example, in Figure
3.9, the image in row 4 column 5 shows a filter in a late convolutional layer (i.e. layer 13 of the CNN in Figure
3.7) which captures abstract features such as the shape of the zebra.
Using these features at different levels, the CNN can decide whether the image shows a bird versus a zebra
based on output quantitative values that are interpreted as probabilities. For example, the model output
specifies that for the input image in Figure 3.7, there is a probability of 97% that it shows a bird and a
probability of 3% that it shows a zebra.
40
41
Learning Summary
• An image is made up of pixels and each pixel only has one color. Each color can be represented as one
number (for a grayscale image) or three numbers (RGB components of a color image).
• Image classification is the task of classifying an image as one of a set of pre-defined classes.
• Humans can classify images by looking for features such as striped patterns of a zebra or wings of a bird.
Features are the distinctive characteristics of an object.
• AI can classify images by looking for features. A frequently used method being a class of deep learning
models called Convolutional Neural Network (CNN). Features used by AI are different from features
used by humans but are useful for making decisions such as performing image classification tasks.
• Earlier convolutional layers look for features in a smaller region in the image (i.e. lower-level features).
Later convolutional layers look for features in a larger region in the image (i.e. higher-level features).
41
42
1. A color image is made up of pixels with a red component (R), a green component (G) , and a
blue component (B).
2. Image classification is the task of classifying an image into a fixed set of pre-defined classes.
3. Features are the distinctive characteristics of an object.
B. Multiple-choice questions
A. Features used by AI in image classification are the same as features used by human.
B. In an image classification task, the possible classes are pre-defined.
C. Convolutional layers are important for capturing features.
D. Early convolutional layers look for features in a small region in the image.
C. Short questions
We can train an image classification model to classify if a hand gesture from a human represents a
“rock”, “paper” or “scissors”, so that the AI can play the game Rock-Paper-Scissors with the human.
42
43
Lesson Plan
Expected lesson time: 35 mins
Time
(minutes in class / Learning
Topic *Task
pre-lesson / after Resources
lesson)
Video and online
4.1 Basics of ASR 1 7 mins
application
*Remarks
Teachers can assign tasks flexibly (pre-lesson, in-class, or assessment), and not all tasks are required
to be involved in lesson time.
Prior to playing any reference video in a unit, it is important for teachers to carefully review the content
to ensure its suitability for teaching purposes before proceeding with playing it.
43
44
The ability to process human language is considered to be a sign of intelligence. Technologies that can
process speech input and generate speech output are core to AI. Previously we have learned how AI
generates speech output with text-to-speech (TTS) technologies. In this unit, let us look at how AI “listens”
to speech input with automatic speech recognition technologies and how AI “understands” and “generates”
natural language with natural language processing (NLP).
Automatic speech recognition (ASR) is a technology that enables computers to recognise and transcribe
human speech into text.
ASR is widely used in our daily lives as shown below in some common applications.
(Left) The user says -- “dear tom comma new paragraph how are you”.
(Right) The system recognizes the speech and converts it into text, as well as
executing instructions for punctuation, like “comma” and “new paragraph”, and
inserting capitalization automatically.
Computer-aided Allow users to practise speaking through the AI-enabled language learning system
language learning and get instant feedback to facilitate learning.
system
Notes for teachers:
References:
[Link]
44
45
Personal virtual
assistant
(Left) The user says, “set timer for ten minutes” to a phone.
(Right) The system recognizes the speech and then launches the timer application,
as well as set it for 10 minutes.
Link
The performance of ASR is affected by many factors, such as environmental characteristics (e.g. background
noise), quality of recording devices, etc., as shown in the table below:
Factors Examples
Speaker Style of speaking: fast, slow, spontaneous, enunciated, slurred, emotional, etc.
characteristics Spoken vocabulary: proper nouns, colloquial expressions
Pausing: hesitations, phrasal breaks, ends of sentences
Accent American, Australian, British accents, etc.
45
46
Clean:
Link
ASR 2: 每個星期三晚上我都要去上搏
擊操課。
Link
Link
ASR 1: 每個星期三晚上,我都要去上
搏擊催貨。誒?
Noisy:
Link
ASR 2: 每個星期三晚上我都要去上搏
擊槍貨。
Link
Link
46
47
A speech waveform is recorded using a microphone connected to the sound card of a computer, and is
transformed into a digital signal. This is input into an AI-model that is trained to perform ASR. We can adopt
different output units for training the model. Here are some possible output units:
English words, such as “the North wind”
English phonemes, such as “/ðə nɔrθ wɪnd/” – A phoneme is the smallest unit of sound that can
distinguish one word from another, e.g. “pat(/pæ t/)” versus pet (/pɛt /)”
Chinese characters, e.g. “香港是我家”
Cantonese syllables in Jyutping “/hoeng1 gong2 si6 ngo5 gaa1/”
Putonghua syllables in Pinyin “/xiang1 gang3 shi4 wo3 jia1/”
Note that for the Chinese language, the recognizer may output only the syllable, or the syllable with a tone.
Figure 4.1 provides an illustration of the ASR pipeline.
In order to recognize the different sounds as phonemes or syllables (in pinyin or Jyutping), the ASR model
needs to capture acoustic information. Furthermore, in order to recognizer words or characters, the ASR
model needs to capture linguistic information (covering the vocabulary and grammar). For example, “right”
and “write” have the same sounds in their pronunciations. In order for the ASR model to generate the correct
word in the output, it needs to capture contextual information from surrounding words in the sentence.
The ASR pipeline can be extended to recognize different characteristics from the speech signal, e.g. the gender,
age, or identity of the speaker, the language spoken, the accent of the speech, etc.
47
48
Now that we understand how ASR works, the next question to ask is how to measure performance. This is
known as performance evaluation.
Word Error Rate (WER) covers 1 substitution error, 1 deletion error and 1 insertion error, out of a total of 5
words in the input. Hence:
WER= 3/5 = 0.6 (or 60%)
唯我們暫時唔指証他**
為我們暫時--指証他了
For the given character sequence, “上海市長江大橋”, please try to segment it into a sequence of Chinese
words. What may be the possible Chinese word sequence(s)?
Suggested solutions:
1. 上海市│長江大橋
2. 上海市│長江│大橋
3. 上海市長│江大橋
4. 上海│市長│江大橋
5. 上海│市長│江│大橋
48
49
Please fill in table below and calculate the CER based on the ASR result: “為我們暫時指証他了” for the
speech “唯我們暫時唔指証他”.
Number of character 9
CER 1 (substitution) + 1 (deletion) + 1 (insertion) / 9 (number of characters in the
input)
= 0.3, i.e. 30%
49
50
Natural language processing (NLP) is a branch of AI that helps computers to understand, interpret and
process human language. Applications of NLP include plagiarism detection, text generation, text
summarisation, question answering, news recommendation, machine translation and grammar checking.
In the previous unit, we learned that computers can only process numeric values and images are represented
as numbers for computers. Similarly, we can represent words quantitatively, in order to be processed by
computers.
Word Embedding
Word embedding is an approach that involves complex computation to represent each word as a sequence of
numbers (which we call a vector). Word embedding vectors can be trained using large-scale (e.g. web-scale)
text data. Using the quantitative values in word embeddings, computers can calculate the meanings of words
and the relationships between words. The overall idea is illustrated in Figure 4.2. The use of word embeddings
enable computers to compute how strongly two words are associated with each other – for example, words
that have similar meanings will have a small distance between them in the word embedding space; and the
relationships among words may be reflected through angles, as illustrated in Figure 4.3.
50
51
Figure 4.3: The similarity and relationship between words can be reflected through word embeddings.
51
52
The following are some powerful NLP applications for you to try.
Cultural Centre, Avenue of Stars, and K11 Musea, Our friends on the shore will join in the fun,
you'll see. Together we'll bask in the warm setting sun.
(Chorus) (Chorus)
Bath time joy, happiness surrounds, Double ducks, double ducks, bring joy to our faces,
Friends together, there's no better sound, In the bath, we find our happy places.
Double duck is double luck, Double duck is double luck, we'll splash and play,
Get connected, let's all stay stuck. Get connected, together, let's seize the day.
(Verse 3) (Bridge)
Ngong Ping 360, the bubble bath ride, As the water dances, we'll sing and we'll laugh,
Flying Rubber Duck, by your side, There's nothing quite like a good, warm bath.
Star Ferry, duck-themed trip, Our hearts overflow with joy and delight,
Drenched in happiness, we'll all let it rip. Together we'll chase away the dark night.
(Chorus) (Chorus)
Bath time joy, happiness surrounds, Double ducks, double ducks, bring joy to our faces,
Friends together, there's no better sound, In the bath, we find our happy places.
Double duck is double luck, Double duck is double luck, we'll splash and play,
Get connected, let's all stay stuck. Get connected, together, let's seize the day.
(Outro) (Outro)
Rubber duck, double ducks, we'll never part, So take my hand, and let's dive on in,
Together forever, in our hearts, To a world of happiness, where we all win.
Bath time joy, happiness found, With our rubber ducks, and our hearts so light,
Friends together, forever bound. Together we'll make everything feel so right.
(Double Ducks, Double Ducks)
(Double Duck is Double Luck)
53
54
54
55
Option 3: 詩意悠悠樂自然,氣象萬千情韻橫。
Option 1:天生我材必有用,千錘百煉鑄英雄。
Option 3:天生我材必有用,春華秋實展宏圖。
Option 1: 星光璀璨月華明,天外仙樂夢中聽。
Option 3: 星光璀璨月華明,人間美景賞不盡。
55
56
The above task is empowered by AI generated content. Besides natural language, AI can also generate many
other content, e.g. translations, code, music, etc. This is referred to as “Generative AI”. Later in the projects,
we will also show you how to generate a talking avatar that can speak about a topic of your choice!
56
57
1. The performance of ASR is affected by many factors. Which kind of factors “Pauses” belong to? (A)
A. Speaker characteristics
B. Accents
C. Environmental factors
D. Recording quality
2. Which of the following element(s) can be found in human speech, including the Chinese language? (D)
A. Tones
B. Phrases
C. Words
D. (A), (B) and (C)
3. A/An _____ is the smallest unit of sound in a language that distinguishes one word from another. (C)
A. Tone
B. Vowel
C. Phoneme
D. Alphabet
I. Vocabulary
II. Grammar
III. Loudness
A. I and III
B. II and III
C. I and II
D. I, II, and III
57
58
5. Which of the following elements is not needed for evaluating the performance of a speech recognizer?
(C)
A. Substitution errors
B. Insertion errors
C. Completion errors
D. Deletion errors
C. Short questions
58
59
Lesson Plan
Expected lesson time: 35 mins
B. Skills:
1. Indicate the particulars of three types of reasoning, namely Skill-based reasoning, Rule-based
reasoning, and Knowledge-based reasoning.
Time
(minutes in class / *Learning
Topic *Task
pre-lesson / after Resources
lesson)
5.1 AI Robots and Levels of Reasoning 5 mins
1 6 mins
*Remarks
Teachers can assign tasks flexibly (pre-lesson or in-class activities), and not all tasks are required to
be involved in lesson time.
Prior to playing any reference video in a unit, it is important for teachers to carefully review the content
to ensure its suitability for teaching purposes before proceeding with playing it.
59
60
A robot is a machine, typically programmable by a computer, that can execute specific tasks automatically
with speed, precision and repeatability.
Similar to humans, a robot performing a task needs to repeatedly go through a three-step process until the task
is complete: sensing – observing the situation at hand; reasoning – deciding the next action to take; and acting
– executing the decision. Among these three, reasoning is the part that contributes mostly to the perceived
“intelligence” of a robot.
Robots may be designed and coded to incorporate different levels of reasoning depending on their intended
applications and desired capabilities. Among them, AI robots are considered as those that make decision
largely based on Knowledge-based reasoning. They are capable of learning from past experience and adapting
to uncertain circumstances, and hence can better handle complex and dynamic tasks. In return, AI robots
require more powerful coding and machine learning algorithm in their micro-processor, more data from past
processes to learn from, and more advanced sensors and actuators to support task execution.
Take the example of a self-driving car approaching a traffic light, it needs to decide whether to brake or not
to brake. When the signal is red, the car should brake and stop. When the signal is green, the car can continue
to move forward. The ambiguous situation is when the light turns from green to amber, the car needs to decide
whether to brake or to go forward. Either way, the goal of the self-driving car is not to violate any traffic rule,
i.e. the car should go past the traffic light, or it should come to a stop in front of the traffic light, before the
signal turns from amber to red.
60
61
In this Unit, students will use a Traffic Light Decision Simulator to see how a self-driving car makes braking
decisions under the three levels of reasoning and observe the respective outcomes. Figure 5.1 shows the screen
of the Simulator with the car approaching a traffic light which is in amber color. This is the situation under
which the car should make a decision on braking or not. Specifically, a traffic light stop line (in red) is shown.
If the car decides to brake, the car should stop in front of the stop line when the traffic light turns red. It will
be a violation if the car stops after going over the stop line. If the car decides not to brake, the car should go
past the stop line while the traffic light is still showing amber signal. It will be a violation if the car passes the
stop line after the traffic light turns red. Violation is recorded as failed attempt in the Simulator. Moreover, as
in real-life scenario, a driver should not stop the car too far away from the traffic light. Applying this concept
to the Simulator, the self-driving car should stop within the stopping zone, which is between the green and red
lines shown in Fig. 5.1.
61
62
Decision Line
Students are to conduct the braking experiments using the Simulator and answer the questions.
1. Conduct 20 runs with the Simulator and note the failed/successful result in each case.
3. What important information do you think Skill-based reasoning has omitted in its decision process?
The speed of the car will be a highly relevant parameter. Weather condition is also
something that has strong effect on the braking performance.
Both are not included in Skill-based Reasoning above.
62
63
In this case, a braking attempt will have a high chance of success should the randomly assigned starting speed
of the car happens to be on the low side, and that the traffic light also happens to show amber signal when the
car reaches the Green line. Given that a sample of 20 runs is statistically small, some students may encounter
more than their fair share of such runs in their braking attempts and end up with high percentages of success.
Figure 5.3 shows the user interface of the Simulator for Rule-based reasoning. The Simulator has been
embedded with a set of 4 rules for the braking decision once the car observes that the amber light is on:
Rule #1: If the car is moving at slow speed ≤ 20km/h and at a short
distance < 10m away from the traffic light, then apply half-braking;
Rule #2: If the car is moving at slow speed ≤ 20km/h and is at a long
distance ≥ 10m away the traffic light, then apply no braking;
Rule #3: If the car is moving at high speed > 20km/h and is at a short
distance < 10m away from the traffic light, then apply full-braking;
Rule #4: If the car is moving at high speed > 20km/h and is at a long
distance ≥ 10m away from the traffic light, then apply half-braking;
As the vehicle approaches the traffic light in amber, braking decisions are made automatically according to
the stored rules. Depending on the driving speed and distance from the traffic light, different levels (zero, half
or full) of braking are applied to the vehicle depending on which stored rules is being activated at the time. To
count as a successful attempt, the vehicle should stop between the green and red line.
63
64
Students are to conduct the braking experiments using the Simulator and answer the follow-up questions.
1. Conduct 20 runs of braking with the Simulator under Rule-based reasoning using the pre-set rules and
note the failed/successful result in each case. At the end, record the following numbers:
64
65
Rule #2 makes sense because the car is at appreciable distance from the traffic light and the speed is
not high. No action is needed until the car comes closer to the traffic light when Rule#1 will be
triggered to activate braking.
Rule #3 makes sense because the car is in high speed and the distance is short, full braking is applied
To result in the car stopping in front of the traffic light in compliance with the traffic rule.
4. Press the “Reset” button, then press the “Change Weather” button and conduct 20 runs of braking under
wet and rainy condition using the pre-set rules in Rule-based reasoning in the Simulator. Calculate the
percentage of successful cases.
5. Compare the performance of pre-set rules under the two different weather conditions. How would you
change the settings of the pre-set rules to improve the inferior one? You may verify your modifications
with the simulator.
In general, the pre-set rule has more successful attampts in dry and clear weather. Since the brake is
less effective in raining, modifications in rules like applying full-braking when the speed is low and
distance is short, or applying full-braking when the speed is high and distance is long can be
considered.
The Simulator has built-in another scenario for students to test the pre-set rules. It provides a “Change Weather”
button to change the weather from dry and clear to wet and rainy. Students can then observe how the pre-set
rules, designed for good performance under one kind of weather condition, would perform under a different
kind.
Also, the built-in pre-set rules in the Simulator uses the threshold of 20km/h to characterize between low and
high speed, and the threshold of 10m to characterize between short and long distance. The Simulator does
provide students the choice to design their own rules by varying the above threshold values characterizing
low/high speed and short/long distance with the button “Change Rule-Set.” Students can test how their own
designed rule set performs compared to the stored pre-set rules in the Simulator.
Moreover, instead of low/high and short/long for speed and distance, one may even add in additional
characterization of low, medium and high speed, and short medium and long distance through additional
threshold values to provide a finer handling of braking scenarios. This will result in 9 rules instead of the
current 4 rules, and an increase in the required computational load of running more rules.
65
66
66
67
3. When training is completed, press “Evaluation Model” button. The trained AI model is now in control of
the braking process. Conduct 20 runs and note the failed/successful result.
Number of Successful Attempts =
5. Press the “Change Weather” button and conduct 20 runs of braking under wet and rainy condition in the
Simulator and note the failed/successful result.
Number of Successful Attempts =
Number of Failed Attempts =
7. Compare the percentage of successful cases under dry and clear condition with that of the wet and rainy
condition. Can you explain the difference between them?
In general, the AI model performs better in dry and clear condition. This is because it is
trained solely with data under dry and clear condition in the first place. It is understandable
that the AI model will perform less effectively when being applied to a different weather
condition the data of which were not included in the training.
8. Can you suggest additional information that may influence the braking decision?
This is an open-ended question. All reasonable answers are acceptable. Examples include:
The time takes for the traffic light to go from amber to red; the lighting condition (day
time/night time); the performance of the on-board camera; the total weight of the car;
the condition of the tires, etc. In real life situation, we will also have other cars and
pedestrians on the road.
67
68
2. Fill in the following table comparing the particulars of the three types of reasoning.
68
69
reasoning does not allow room to include other relevant information (such as the speed of the car at the time)
in its decision.
Compared with Skill-based, Rule-based reasoning involves more “thinking” during the reasoning process and
provides a decision that includes more information (speed and distance) of the situation at hand. This is shown
in Figure 5.6. However, Rule-based reasoning also poses more requirements on the sensors and actuators to
be available. In this example, we need sensors capable of providing data on the car speed and distance away
from the traffic light (not needed in Skill-based reasoning) and also a braking system that can provide half-
braking, in additional to just full braking for Skill-based reasoning.
At Decision Line:
See Amber or Red traffic light, apply brake
See Green traffic Light, no braking
Decision Line
69
70
Traffic light
color
Distance to
other vehicles
70
71
Figure 5.8: Information generated by on-board AI-enabled camera system in real-time traffic situation
(Extracted from Plainsight video: [Link]
71
72
Learning Summary
AI robots are capable of learning from past experience and adapting to uncertain circumstances, and hence
can handle complex and dynamic tasks better. In return, they require more powerful coding and machine
learning algorithm in the micro-processor, big data from previous operations to learn from, and more advanced
sensors and actuators to support task execution.
The above learning summary is illustrated in Figure 5.9.
72
73
1. Reasoning is the process of ____arriving at decisions______ based on the observed information at hand.
2. In __Rule-based__ reasoning, we can increase number of instructions to allow the robot to handle the
situation with more precision.
A. To bring “intelligence” to robots, we can add human reasoning capabilities to their program.
B. Since Skill-based reasoning cannot handle complicated tasks, we should not use it in any robot.
C. In Rule-based reasoning, we can add more rules so that the robot can handle the task more precisely.
D. Knowledge-based reasoning makes use of domain knowledge of the task to come up with more
adaptive decisions.
C. Short questions
1. Which reasoning method enables AI to learn from past data and establish relationships between relevant
parameters for better solution(s)?
Knowledge-based reasoning.
73
74
Lesson Plan
Expected lesson time: 35 mins
B. Attitudes:
1. Be aware of the relationship between AI and work and develop a positive attitude to face the future
of work.
Time
(minutes in class / Learning
Topic *Task
pre-lesson / after Resources
lesson)
6.1 Past, Present and Future Jobs 1&2 10 mins Article
*Remarks
Teachers can assign tasks flexibly (pre-lesson, in-class, or assessment), and not all tasks are required
to be involved in lesson time.
Prior to playing any reference video in a unit, it is important for teachers to carefully review the content
to ensure its suitability for teaching purposes before proceeding with playing it.
74
75
AI is currently replacing humans in many tasks and such technological automation is replacing many jobs.
Have you heard of these jobs (see Figure 6.1)?
AI, automation, and innovations are changing the nature of work as they re-invent business processes,
operations and their execution. It is important to understand the future of work in different sectors.
Past A, D, F, H
Present B, G
Future C, E
The nature of jobs keeps changing over the time. Technology is a driver for such changes. Some jobs no
longer exist and have been replaced. We should not take the jobs we have now for granted or expect they will
last forever.
75
76
Vehicle powered by
Vehicle powered by petroleum
Driver of a animals (e.g. horses, Vehicle powered by petroleum
or electricity and driven by
Vehicle oxen) and driven by or electricity and driven by AI
humans
humans
76
77
Event Characteristics
First Technological breakthroughs: steam engines and metal forging
Industrial Revolution Manufacturing processes became mechanized
(18th century)
Second Technological breakthroughs: electricity
Industrial Revolution Standardization, mass production, and industrialization
(19th century) Mechanical production grew in speed
Third Technological breakthroughs: computers, internet, and software
Industrial Revolution Software system carried out management processes
(20th century)
Fourth Technological breakthroughs: AI, big data, cloud computing, machine
Industrial Revolution learning, Internet of Things (IoT), biotechnology, nanotechnology, etc.
(Today) Development of smart manufacturing and autonomous systems
77
78
People have adapted to the changes brought by each industrial revolution. As jobs continue to be reshaped
and changed by the emergence of new technologies, we should maintain a positive, inquisitive attitude and be
prepared to learn new knowledge and acquire new skills. This will increase our competitiveness in the job
market. Jobs related to developing and deploying new AI technologies are growing. New opportunities will
increasingly emerge.
AI offers automation which can hopefully free up humans from jobs that are Dull (i.e. repetitive and tedious),
Dirty, Dangerous and Dear (i.e. automation can do it faster and cheaper). Examples include cleaning, data
entry, inspecting pollutants, etc.
Please scan the QR code to learn more about jobs AI may replace.
78
79
While this chatbot can be a valuable tool for various industries, it is also important to consider both pros and
cons of this technology.
79
80
Learning Summary
80
81
1. The combination of advances in AI, robotics, the internet of things (IoT), genetic engineering, quantum
computing, and other new technologies have brought about the fourth industrial revolution.
A. All jobs will continue to exist as they are now and will not change.
B. AI will replace all human jobs.
C. When introducing AI technologies in the workplace, productivity is more important than ensuring
ethical use.
D. AI may replace some jobs and assist human in other jobs.
Job Period
1. AI engineers i. First industrial revolution
2. Computer programmers ii. Second industrial revolution
3. Electricians iii. Third industrial revolution
4. Firemen of steam engines iv. Fourth industrial revolution
A. 1: i; 2: ii; 3: iii; 4: iv
B. 1: iv; 2: iii; 3: i; 4: ii
C. 1: iv; 2: iii; 3: ii; 4: i
D. 1: iii; 2: iv; 3: i; 4: ii
C. Short questions
2. List one job that is MOST likely be replaced by AI in the near future.
Driver / security guard / cashier / waiter
3. List one job that is LEAST likely be replaced by AI in the near future.
Researcher / scientist / educator / artist / journalist
81
82
Lesson Plan
Expected lesson time: 35 mins
B. Skills:
1. Identify examples of social good brought about by AI.
2. Understand and apply the Five Steps of Design Thinking.
Time
(minutes in class / Learning
Topic *Task
pre-lesson / after Resources
lesson)
7.1 What is Social Good? 1&2 10 mins Video
*Remarks
Teachers can assign tasks flexibly (pre-lesson or in-class activities), and not all tasks are required to
be involved in lesson time.
Prior to playing any reference video in a unit, it is important for teachers to carefully review the content
to ensure its suitability for teaching purposes before proceeding with playing it.
82
83
Social good refers to something that benefit the public. Ideally, technologies should promote social good, i.e.
provide benefits and spread them widely. However, this depends on the proper design and management of the
technologies. AI can perform many tasks better than humans, which can be either beneficial or harmful.
83
84
Please scan the QR code to watch the video and discuss the following questions
in a group:
[Link]
qCMRGpHhH2W6XJZnJUBCLV6yuh6VXVIzHpdUrz-6g?e=vn1CM2
The TrailGuard Artificial Intelligence camera detects possible poachers and alerts park rangers in near
real-time, allowing rangers to take action before animals are harmed.
The TrailGuard Artificial Intelligence camera uses AI to identify the images with important information,
such as images with poachers. The AI-equipped camera is also small and easy to hide, allowing rangers
to identify possible poachers.
Yes, this camera can help reduce poaching or, no, the detection accuracy is not high enough
(open discussion).
84
85
AI in COVID-19
In 2021, a research team from the Chinese University of Hong Kong developed an AI system to detect
COVID-19 automatically, quickly and accurately based on 3D chest CT images. During COVID-19, the
workload to analyse and interpret medical image data has been unprecedentedly large and urgent. Such an AI
system can effectively facilitate the management of COVID-19.
85
86
Chatbot “Bonny”
“Bonny” is a chatbot launched in December 2019 on the website of the HKSAR Government. It helps users
conduct searches for government e-services, application forms and related URL links. “Bonny” is able to
respond in both Chinese and English and provide relevant information through an online chat box.
Figure 7.3: Digital health screening for secondary school students (source:
[Link]
86
87
Figure 7.4: Will AI replace humans in graphics design? (Image generated by Midjourney)
[Link]
Question: Can you think of other ways in which AI may bring detriment to society?
87
88
AI is often regarded as a key contributor to the fourth industrial revolution. The disruption from an industrial
revolution tend to cause many people to lose their jobs. Hence, we must prepare ourselves well for the future
as we live in the age of AI. To master AI technologies, it is important to have a knowledge of mathematics
and science and develop strong critical and creative thinking skills, especially in design thinking.
Design thinking is the creative use of existing knowledge / or technologies to address emerging problems.
Design thinking creates various ways of using AI technologies, designing for the benefit of others will help
us develop AI for the right reasons and become a better person. We will learn two types of design thinking
approaches, which are the five steps of design thinking and the double diamond model.
Please scan the QR code for more details about the five steps of design thinking:
5 Steps of the Design Thinking Process: A Step-by-Step Guide
[Link]
step-guide/
88
89
Task 4: Improve Swimming Pool Safety by Adopting the Five Steps of Design Thinking
Now that we have learnt about the Five Steps of Design Thinking, we can apply it in a real-life situation –
swimming pool safety. Using the design thinking approach, we will generate a real problem statement and a
feasible solution in order to achieve social good with AI.
Step 1: Empathize
We are concerned about the loss of lives in swimming pools because of the lack of lifeguards.
Step 2: Define
89
90
Swimmers:
People swimming in the swimming pool.
Sometimes accidents can happen even when there are lifeguards.
When there are no lifeguards, people suffering from cramps could drown.
Lifeguards:
Step 3: Ideate
How do you use AI to solve problems?
When should AI technologies be used to solve defined problems?
Suggest how AI technologies can solve the problems.
Imagine how the application of AI technologies can solve problems.
(Hints: What kind of functions should AI have for solving the problems?)
Step 4: Prototype
When you design an AI lifeguard system,
What sensory inputs does the system require?
To train the AI system, what data do you need and where can you obtain the data? What are the
challenges here?
How do you implement your design?
Install some cameras with audio receivers that cover the entire pool area.
Teach the machine to identify heads under water.
Teach the machine to distinguish between abnormal swim patterns and normal swim patterns.
90
91
Step 5: Test
Propose how you would test your ideas. (Hints: Would it be better to install the system under water? Could
it be used for coaching as well?)
Learning Summary
AI may bring benefits or cause harm to humans, so we must use the technologies carefully.
AI technologies can provide new ways to promote social good and improve the quality of peoples’ lives.
Design thinking is a possible approach to devise AI-enabled solutions in an attempt to solve (complex)
problems.
The five steps of design thinking: empathize, define, ideate, prototype and test.
91
92
1. Social good refers to things or events that can benefit the public widely.
2. In the Five Steps of Design Thinking, the first step is to empathize , which aims to understand the
problem.
3. In the Five Steps of Design Thinking, the fourth step is to prototype , which aims to make a sample
solution that users can experiment on.
4. A good AI design should devote considerations to ethical use and possible social impact.
1. What is the last step in the Five Steps of Design Thinking? (D)
A. Empathize
B. Define
C. Prototype
D. Test
C. Short questions
92
93
93
94
94
95
95
96
96