Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Free lesson

OS 1.5 (1 of 2): AI, biometrics and big data

The whole lesson, free. Read it and have a go at the activities. To work the tasks and labs in the real lesson, press Start lab, with no account needed.

50 minutes

A quick check that you are not a bot, then your own lab opens on the interactive lesson.

Already have an account? Sign in

Your phone knows your face

You look at your phone and it unlocks. You say "play music" and it plays. A photo app groups all your pictures of a friend.

Ten years ago, this was rare. Now it is normal. These new technologies change what developers build, and how they build it.

Key words

WordWhat it meansExample
Artificial intelligenceComputers doing tasks that usually need human thinking.recognising speech
Machine learningAI that learns from examples instead of fixed rules.a spam filter (a tool that blocks junk messages) that learns from past emails
Generative AIAI that makes new text, pictures or code.a chat tool that writes an email
Conversational AIAI you talk or type to.a help chat on a shop website
Computer visionAI that understands pictures and video.reading a number plate
Object recognitionFinding and naming things in a picture.finding a dog in a photo
BiometricsProving who you are with your body.fingerprint, face, voice
Data lakeA big store of raw data (data not yet organised) in many shapes.photos, logs, tables, all kept as they came
Data warehouseA store of tidy, organised data for reports.monthly sales tables

The cells students fill in are left blank in this preview.

The technologies at a glance

TechnologyWhat it doesExampleWhat it means for developers
Artificial intelligenceDoes tasks that need human thinkingA game opponentNew features, and new risks to test
Virtual intelligenceActs like a helper but follows set rules and does not learnA shop assistant that answers set questionsDevelopers write the rules and the answers
Conversational AITalks with peopleA bank chat helperNeeds clear replies, and a plan for when it does not understand
Generative AIMakes new text, pictures or codeA code helperDevelopers must check what it writes
Machine learningLearns from examplesFilm suggestionsNeeds good data, and fair data
Computer vision and object recognitionUnderstands picturesReading car number platesNeeds cameras and training pictures
BiometricsProves who you are by your bodyFingerprint loginMust protect very private data

The cells students fill in are left blank in this preview.

Match the example to the technology

Have a go

Loading…

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Check: name the technology

Have a go

Check: name the technology

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

A program learns spam words

Code: python
spam = ["win free prize", "free money now", "claim your prize"]
normal = ["lunch at one", "homework is due", "free time at lunch"]

normal_words = []
for message in normal:
    for word in message.split():
        normal_words.append(word)

# Keep a spam word only if no normal message uses it. Keep each word once.
learned = []
for message in spam:
    for word in message.split():
        if word not in normal_words and word not in learned:
            learned.append(word)
print(learned)

test = "you win a prize"
found = False
for word in test.split():
    if word in learned:
        found = True
print(found)

# Add a new spam message to the list and run it again.

Make a free account to save your work and track your progress.

The more examples, the better

Note

The program did not have a list of spam words typed in by a person. It worked the list out from the examples using a simple rule. With more examples it learns more. With poor or unfair examples, it learns poor or unfair things.

Build a spam filter that learns

Build a tiny spam filter that learns from examples. The first function finds the words that appear in spam but never in normal messages. The second says if a message has any of those words. Press Run Tests when you are ready.

Code: python
def learn_spam_words(spam_messages, normal_messages):
    # Look at the examples. Give back a list of the words that appear
    # in the spam messages but never in the normal messages.
    # Each word is in the list once, in the order you first meet it.
    # Hint: message.split() gives the list of words in a message.
    # Hint: "word not in my_list" is True when the word is missing.
    return None


def is_spam(message, spam_words):
    # Give back True if any word of the message is in spam_words.
    return None

Make a free account to save your work, or press Start lab to work through the whole lesson.

Where does all the data live?

AI needs lots of data. Companies keep it in two main ways.

A data lake keeps data in its raw shape: photos, messages, logs and tables. A data warehouse keeps tidy, organised data, ready for reports.

Lakes are flexible. Warehouses are fast and clear.

Data lake or data warehouse?

QuestionData lakeData warehouse
What shape is the data?Any shape, rawTidy rows and columns
Who uses it?Data scientists and developersManagers and analysts
ExampleMillions of customer photosMonthly sales by shop
Main riskIt becomes a mess if nobody organises itIt takes work to fit the data in

The cells students fill in are left blank in this preview.

Biometric data is very private

Warning

Many people think a fingerprint is just another password. You can change a password. You cannot change your fingerprint, so a stolen one is stolen forever. The law treats this data with extra care. Collect only what you must, and protect it well.

Explain how one technology changes a project

Choose one technology from this lesson: generative AI, machine learning, computer vision or biometrics. Imagine a team building a school app that uses it.

Use this template.

  1. The technology I chose:
  2. One useful thing it could do in the app:
  3. What the team would need (data, skills, equipment):
  4. One risk (for example, privacy, unfair results or cost):
  5. One thing the developers must test:

Example for 2: "Computer vision could scan a student card at the library door."

A teacher marks this in a college. Nothing you write here is kept: it goes when you leave the page.

Make a free account to save your work, or press Start lab to work through the whole lesson.

Final check

Have a go

Final check

5 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Teach this lesson with your class

On a college account your students work the tasks and the labs as well, and every mark is kept for you.