💻 Computing

How AI Works: Machine Learning and Chatbots for Students

Understand machine learning, training data and large language models, plus the limits of AI and how to use it responsibly.

  • ⏱ 3 min read
  • ✏️ 3 worked examples
  • 🎯 5 practice questions
  • 📶 Beginner
KS3GCSEMiddle SchoolHigh School

Curriculum fit: KS3 and GCSE Computing (the National Curriculum computing programmes of study cover algorithms, data and responsible use of technology). US: no US standards source is linked here: check your school's computer science curriculum.

On this page

What Is It?

Artificial intelligence (AI) is software that performs tasks that normally need human intelligence, such as recognising images or understanding language. Most modern AI uses machine learning, where a program finds patterns in many examples instead of following rules written by a programmer.

A large language model (LLM) is a type of AI trained on huge amounts of text to predict what comes next, one small piece of text (a token) at a time. This lets it write, summarise and answer questions, but it does not guarantee that what it says is true.

DatalabelledexamplesTraininglearnspatternsModelthe trainedresultInferencenew input,new outputLimits to remembercan be wrong (hallucinations)can reflect bias in its training data
AI models find patterns in example data. They can still make mistakes, called hallucinations, and can repeat bias that was in the data they learned from.

Key Formulas and Ideas

  • Training: the model learns patterns from example data. The result is called the model.
  • Inference: using the trained model on new input.
  • Supervised learning uses labelled examples (for instance emails marked 'spam' or 'not spam').
  • Limits: AI can make errors, called hallucinations, and can reflect bias in its training data.

Worked Examples

Example 1

Spam Filter

Question

Explain how a spam filter could use machine learning.

  1. Collect many emails already labelled spam or not spam.
  2. Train a model to find patterns in the wording and senders.
  3. Use the model to label new emails.

✓ Answer It learns patterns from labelled examples and applies them to new emails

Example 2

Why Check AI Answers?

Question

A chatbot gives a confident answer with a made-up reference. What has happened and what should you do?

  1. The model predicts plausible text, so it may produce false details (a hallucination).
  2. Check the claim and source using reliable references.

✓ Answer It is a hallucination, so verify the information elsewhere

Example 3

Bias

Question

How could bias enter an AI system?

  1. Training data may not represent everyone fairly.
  2. The model can then perform worse for some groups.

✓ Answer Unrepresentative training data can lead to unfair results

Common Mistakes to Avoid

  • Treating AI output as always correct.
  • Thinking AI 'understands' like a person.
  • Submitting AI-written work as your own when your school forbids it.
  • Sharing personal information with an AI tool.

Practice Questions

0 of 5 answered
Q1Training an AI produces a…
Q2An LLM works mainly by…
Q3A sensible habit when using AI is to…
Q4Supervised learning uses…
Q5Bias in AI can come from…

Frequently Asked Questions

Does AI understand like a person?

It finds statistical patterns in data. Whether that counts as understanding is debated, but it can be wrong in ways a person would not be, so always verify.

Can I use AI for homework?

Follow your teacher's and school's rules. Using it to explain a topic is different from handing in its work as your own.

Take This Guide With You

Get a free printable PDF with the worked examples and quiz answers. Enter your email and the download starts straight away.

Sources and Review

Reviewed by StudyMorrow editorial review on 5 Nov 2026.