Core concepts of artificial intelligence

Foundation

AI ⊃ machine learning ⊃ deep learning. Machine learning finds patterns from mass examples; training learns (feeding data, tuning parameters), inference uses (answering new inputs). Data quality decides model quality; AI errs and hallucinates, so people review the big calls.

For:Secondary 3 Information & Communication Technology · Unit:AI basics · Lesson 11 of 13 in the learning path

After this lesson, you can:
  • Three layers: AI contains machine learning; machine learning contains deep learning.
  • Machine learning = deriving patterns from mass examples, not hard-coding rules.
  • Training learns (predict, check, adjust); inference uses (judge new inputs).
文體:原理講解課有聲朗讀

文體小知識:原理講解課先講清楚概念和規則,再用實例演示,令抽象的設計方法變得具體易明。

資訊及通訊科技Information & Communication Technology

§Text Passage

1Artificial intelligence (AI) is the technology of making machines do work that needs human intelligence: understanding speech, recognising images, playing chess, translating. The mainstream way to achieve it is machine learning: instead of programmers hard-coding every rule, computers are fed vast examples and find the patterns themselves. Deep learning, a branch of machine learning, uses neural networks imitating brain connections — the core behind image recognition and chatbots. The nesting runs: AI contains machine learning, machine learning contains deep learning.

2Two key terms to separate: training is the learning stage — feed a model a hundred thousand labelled cat-and-dog photos, and it predicts, checks against answers and adjusts its internal parameters until the pattern emerges. Inference is the using stage — the finished model meets a brand-new photo and outputs 'cat, 92% confident'. Like a student: revising is training, sitting an unseen exam is inference.

3AI already fills Hong Kong daily life: face unlock reads images, Siri and voice input understand speech, shopping platforms guess what you want with recommendation systems, email services block scam mail with spam filters, public hospitals use AI to help read X-rays. Behind them all sit machine-learning models that learn patterns from mass data.

4Yet AI is not all-powerful. It only knows the patterns in its training data: biased data bends the learned rules; it does not grasp real meaning, so it can state nonsense in perfect confidence — called a hallucination. A model is only as good as its data: garbage in, garbage out. So people must review the important calls, and AI can only ever assist.

1Summary 重點摘要

AI ⊃ machine learning ⊃ deep learning. Machine learning finds patterns from mass examples; training learns (feeding data, tuning parameters), inference uses (answering new inputs). Data quality decides model quality; AI errs and hallucinates, so people review the big calls.

2Vocabulary cards Vocabulary

A
Artificial Intelligence (AI)人工智能

Technology letting machines perform tasks needing human intelligence, e.g. speech, vision and translation.

M
Machine Learning機器學習

The mainstream approach to AI: no hard-coded rules — computers derive patterns from mass examples.

D
Deep Learning深度學習

A branch of machine learning using brain-like neural networks, strong at images, speech and language.

N
Neural network神經網絡

A layered computing structure imitating brain connections — the building block of deep learning.

T
Training訓練

The stage teaching a model with mass examples: predict, check, adjust parameters, repeat.

I
Inference推斷

The stage where a trained model answers new inputs.

M
Model模型

The trained product: it holds the learned patterns and parameters and judges new inputs.

D
Dataset資料集

The batch of examples used in training, e.g. a hundred thousand photos labelled cat or dog.

H
Hallucination幻覺

An AI stating falsehoods in confident prose — it tracks patterns, not truth.

3Step by step Steps

  1. Set out the three layersArtificial intelligence (AI), machine learning and deep learning are often conflated, but they nest like circles. AI is the largest circle: any technique making machines do work that needs human intelligence, including early chess programs and expert systems. Machine learning is a subset of AI — methods that learn patterns from data by themselves. Deep learning is a branch of machine learning, using neural networks that imitate brain connections. For example, phone face unlock is deep learning, hence also machine learning and hence AI; but an early maze-walking robot was AI without any machine learning. This three-layer nesting is a favourite multiple-choice topic.
  2. Hard rules versus machine learningThe difference between traditional programming and machine learning is clearest in spam filtering. The traditional way (hard-coded rules): a programmer writes 'block any mail containing free prize'. It works at first, but the moment scammers reword the phrase or hide text inside images, the rule dies and the programmer chases repairs forever. The machine-learning way: feed ten thousand mails already labelled spam or not by people, and let the system find the tell-tale features itself — wording, links, sending patterns. When a mail with a brand-new trick arrives, the learned general patterns still catch most of it. Real email services use machine learning exactly this way, updating continuously as new data arrive.
  3. Watching training step by stepTraining a cat-versus-dog classifier shows the five steps of machine learning. Step one: prepare a dataset — a hundred thousand photos, each labelled cat or dog by people; the labels are the answer key. Step two: the model looks at a photo and predicts, say, 'dog'. Step three: check the answer — it was a cat, so the prediction is wrong. Step four: the model adjusts its millions of internal parameters according to the error, so the next prediction lands closer to correct. Step five: repeat steps two to four a hundred thousand times, and accuracy climbs from random guessing to over ninety per cent. The keys are volume and quality of data: the more examples and the cleaner the labels, the more reliable the learned pattern.
  4. How inference happensOnce training ends, inference begins: the model is applied to data it has never seen. For example, the trained cat-versus-dog classifier receives a new photo; internally it matches features — fur colour, ear shape, face proportions, whiskers — against its learned patterns and outputs 'cat, 92% confident'. The point: the model has not memorised a hundred thousand photos; it has learned a way of judging, just as a student masters methods rather than memorising every exercise. That is why it can handle brand-new pictures — and also why pictures too unlike its training data, such as an abstract sketch of a cat, can defeat it: it only knows the world it has seen.
  5. Four families of daily useMachine learning already fills Hong Kong daily life in four families. Image recognition: face unlock, photo albums sorting pictures into people and scenery automatically, and public hospitals using AI to help read X-rays. Speech recognition: voice keyboards typing Cantonese, smart speakers following spoken commands. Recommendation systems: a shopping platform's 'you may like' or a video app auto-playing the next episode — models predicting your taste from your browsing history. Natural language processing: chatbots answering customer enquiries and translation apps reading a menu on the spot. A good habit: when meeting any smart feature, ask 'what data did it learn what pattern from' and you can usually name the technology behind it.
  6. Data quality decides everythingThe quality ceiling of a model is set by its data — 'garbage in, garbage out'. Example one: a model trained to judge fruit ripeness from a dataset of only green apples will judge every red apple unripe or abnormal, never having seen red. Example two: a face-recognition dataset dominated by one skin tone shows markedly lower accuracy on others — an unfairness built in by the data. Three requirements govern dataset building: large (enough examples), accurate (labels correct), and broad coverage (all conditions — lighting, angles, varieties). If you ever train a model, expect to spend far more time preparing the data than training on it.
  7. Two great limits of AIAI has two fundamental limits. First, it invents when it does not know: a large language model essentially predicts the most plausible next word, so asked about a historical event that never happened, it may state a year, names and details in perfect confidence — a hallucination, fluent and entirely fictional. Second, it knows only seen patterns: trained on daytime traffic photos, it may fail on night shots; biased patterns bend every judgement built on them. So in medical diagnosis, legal advice and credit decisions, AI may only assist, and a person must review the final call. The right attitude: treat AI as a well-read but fallible assistant — verify its answers, never swallow them whole.
  8. Using AI properlyAs a student, knowing AI includes using it properly. Good learning uses: asking AI to explain a concept you cannot grasp (say, three different explanations of perfect squares), or generating practice questions to test yourself. Copying AI-written homework breaks school rules and forfeits your own practice — and in the exam hall AI cannot help you. Privacy rule: never feed personal data (name, student number, address, photos) into public AI services, where it may be stored or used for training. Verification habit: check AI answers against textbooks and official websites. Hong Kong schools are folding AI literacy into the curriculum, and sound habits built in junior forms pay off through electives, university and careers.

4Diagrams Diagrams

AI・機器學習・深度學習:大圈包細圈人工智能 AI機器學習 ML深度學習由規則寫死 → 從數據自己學(ML)→ 用神經網絡學得更深(DL)機器學習:唔係寫規則教佢,係俾大量例子佢自己搵規律(認相・推薦影片)訓練數據:AI 學幾多睇幾多例子——例子有偏差,AI 就學埋偏差
Fig. 1: AI concepts

5Worked example Example

Example: sort four items into machine learning or traditional programming — (a) a calculator adding numbers, (b) phone face unlock, (c) converting Celsius to Fahrenheit by formula, (d) email spam filtering.

  1. (a) Calculator: addition follows a fixed algorithm, hard-coded by programmers → traditional.
  2. (b) Face unlock: must recognise faces across endless lighting and angles — impossible to hard-code; trained on masses of face data → machine learning.
  3. (c) Celsius to Fahrenheit: the formula F = C × 95 + 32 never changes → traditional.
  4. (d) Spam filtering: scams keep evolving, so patterns must be learned from labelled mail and updated → machine learning.
  5. Answer: (b) and (d) are machine learning; (a) and (c) are traditional. The test: learning patterns from data means machine learning; rules writable once and for all mean traditional.

6Common mistakes Mistakes

✗ Believing AI means a robot with self-awareness.
✓ Real AI is a statistical system learning patterns from data — no consciousness, no feelings; keep science fiction apart from reality.
✗ Placing deep learning beside machine learning as parallel methods.
✓ Deep learning is the neural-network branch of machine learning; the relation is containment, not parallelism.
✗ Thinking a trained model answers by matching old photos.
✓ At inference the model applies learned rules to brand-new inputs; it memorised patterns, not the pictures.
✗ Treating AI answers as authority to trust wholesale.
✓ AI errs and hallucinates, stating falsehoods in fine prose; factual claims need checking against reliable sources.
✗ Believing more data always makes a better model.
✓ It must also be accurate and representative: a million mislabelled photos teach a broken model; quality and quantity both count.

7Quick check Quick check

Q1Which nesting is right? A. deep learning ⊃ AI ⊃ machine learning B. AI ⊃ machine learning ⊃ deep learning C. unrelated

Q2What separates training from inference?

Q3Which family does face unlock belong to? A. image recognition B. speech recognition C. recommendation

Q4What is an AI 'hallucination'?

Q5Why must important decisions (e.g. medical diagnosis) never be left wholly to AI?

8Recap Recap

  • Three layers: AI contains machine learning; machine learning contains deep learning.
  • Machine learning = deriving patterns from mass examples, not hard-coding rules.
  • Training learns (predict, check, adjust); inference uses (judge new inputs).
  • Four daily families: image recognition, speech recognition, recommendation, natural language.
  • Data quality decides model quality; AI errs and hallucinates, so people review the important calls.

Other subjects in this grade

Same subject, other grades