Introduction to AI
Understand how modern AI works, from the basics of machine learning to the tools people use every day: large language models, prompt engineering, RAG, AI agents, MCP and skills, and fine-tuning. Each lesson pairs the theory (the main idea in plain words) with practice: interactive demos you drive yourself, short code sketches that light up step by step, and quizzes. Then pass the final quiz to earn your certificate. Don't worry if these names are new: each one is explained, step by step, in its own lesson.
What you'll learn
- How machines learn from data, from a simple line to neural networks and LLMs.
- How to use generative AI well: prompting, context engineering, RAG, agents, MCP and fine-tuning (all explained in Part B).
- When AI can be wrong, its main risks, and when a person must check it.
Theory
The main ideas behind modern AI in plain words, with everyday examples, simple diagrams, and when to use what.
Practice
Interactive demos: train a model, watch a network learn, see how an AI writes one word at a time, write better instructions for it, let it search your documents, and watch it use tools. A quiz in every lesson.
Certificate
Score 80% or more on the final quiz to get a certificate with your name, ready to print, save as PDF or download as an image.
- 10 lessons in 2 parts
- 30 lesson quiz questions
- 12-question final quiz
- No coding or maths background needed
- Self-paced · works offline
How the course works
- Part A: Foundations (about 20% of your time)a short, high-level tour of AI, machine learning and neural networks.
- Part B: Generative AI in practice (about 80%)the main focus: LLMs, prompting, RAG, agents, MCP and skills, fine-tuning, and the risks to watch for.
- In each lessonread the idea, try the interactive demo, follow the code sketch beside it, then take the lesson quiz.
- Take the final quiz12 questions on the main concepts. Score 10 of 12 or more (80%) to earn your certificate.
Colour key for the demos
When a demo runs, boxes change colour to show what's happening at that moment:
- NormalAn item that isn't involved in the current step.
- Working on itThe step, item or tool being used right now.
- Retrieved / rememberedSomething looked up, chosen or kept for later.
- ResultThe answer, prediction or finished step.
Course map
The small grey words are the key terms each lesson explains.
Part A · Foundations
Part B · Generative AI in practice
Part A · Foundations
A short, high-level tour: what AI is, how machines learn from data, and how neural networks work.
1. What is AI? (and how machines learn)
Artificial intelligence (AI) is the field of building computer systems that do tasks we usually link to human intelligence: understanding language, recognising images, making decisions. Machine learning (ML) is the part of AI where the system learns patterns from data instead of following rules a person wrote by hand. The program that learns is called a model: think of it as a formula that turns inputs into an answer (lesson 2 shows exactly what that means).
Think of teaching a child to recognise cats. You don't write a list of rules about whiskers and ears; you show many pictures and say "cat" or "not cat". Machine learning works the same way: show examples, and the system finds the pattern itself.
Deep learning and neural networks are explained in lesson 3, and generative AI in lesson 4.
Three ways machines learn
There are three main ways a machine can learn. Pick one below and press Run to see it; the table under the demo sums them up.
| Type | Learns from | Simple example |
|---|---|---|
| Supervised | examples with the right answers (labels) | emails marked "spam" (unwanted junk mail) or "not spam" → classify new emails |
| Unsupervised | examples without answers | customer data → discover groups of similar customers |
| Reinforcement | trial and error, with rewards and penalties | a robot or game player learns which moves lead to a win |
Clustering means letting the computer sort examples into groups of similar ones. It is the most common kind of unsupervised learning. In practice: a shop groups its customers by behaviour, then treats each group differently: a discount to win back occasional shoppers, deals for bargain hunters, early access for big spenders. Nobody labelled the customers first; the groups came from the data, and the shop chose how many groups were useful.
Classification and regression
Supervised learning answers two kinds of questions. Classification picks a category from a fixed list. Regression predicts a number that can take any value.
| Classification | Regression | |
|---|---|---|
| Predicts | a category from a fixed list | a number that can take any value, such as 254.7 (called a continuous number) |
| Asks | "Which one?" | "How much?" or "Where?" (see the car camera below) |
| Example | spam or not spam (the demo above) | a house price (lesson 2) |
Both together: a car's front camera
Many real systems do both at once. In object detection, the front camera of a car finds every object in each picture the camera takes. For each one it predicts what it is and where it is.
The label person 94%. The model picks one category from a fixed list (car, person, bike, stop sign…) and says how sure it is.
Four numbers: x, y, width and height. x and y give the box's top-left corner, counted in pixels (the tiny dots that make up the image) from the top-left of the picture; width and height give its size. They are continuous values, so predicting them is regression.
For every object, the model predicts both at once: a category (classification) and four numbers (regression). The car needs both, what is ahead and where it is, to decide whether to slow down. It learns this from thousands of road images where people drew the boxes and wrote the labels, so it is supervised learning.
Where it shows up
- Supervised: spam filters, image recognition, predicting prices or delivery times, and object detection in car cameras.
- Unsupervised: customer segments, grouping similar news articles, spotting unusual transactions.
- Reinforcement: game-playing AI, robotics, and part of how chat assistants are tuned to give helpful answers (lesson 4).
2. Learning from Data (models find relations)
A model is a formula with parameters: numbers that set its exact shape. Training means finding the parameter values that make the model's outputs match the examples, so it can make predictions for new cases.
A real-estate agent (someone whose job is selling houses) who has seen hundreds of sales can guess a new house's price from its size. They learned the relation from experience. A model does the same from data: it finds the pattern, then uses it on houses it has never seen. Because a price is a number, this is regression (lesson 1).
y = a·x + b. Here x is the house size and y is its price.
- Model: the shape we assume, here a straight line.
- Parameters:
ais how steep the line is: how much the price rises for each extra m².bis the price the line gives for a size of 0, its starting height. - Training: find the values of
aandbthat make the line fit the data best. - Prediction: put a new size into the trained formula to get a price.
Training is iterative: 60 small steps, each nudging a and b to reduce the error a little. Lesson 3 shows why this works.
Predictions can be wrong
- Bad data: errors, missing values or old data teach the model the wrong pattern. Tick "add bad data" above and train again: a few wrong prices pull the whole line off. Garbage in, garbage out.
- Unrepresentative data: a model trained only on small apartments (flats) will guess badly for mansions, and one trained on last decade's prices won't know today's market.
- Wrong model: a model that's too simple or too complex for the pattern, as the next demo shows.
Overfitting and underfitting
To check a model honestly, we keep some data aside as a test set that it never sees during training. A good model does well on both training and test data. Pick the model's complexity below and compare the two errors.
Complexity here means the number of parameters. Complexity 1 is the straight line, with 2 parameters (a and b); complexity 9 is a curve with 10. More parameters make a more flexible model, which can fit the real pattern, or the noise: the small random errors in each example (a typo, a lucky sale) that are not part of the real pattern.
This demo uses new, made-up data (not house prices). Its real pattern is a smooth wave, and each point has a little random noise added. Filled dots (●) are the training data the model learns from; hollow dots (○) are test data, kept hidden during training so we can check the model on examples it hasn't seen. The error is the average squared distance between the curve and the points: smaller is better.
| Training error | Test error | What's happening | |
|---|---|---|---|
| Underfitting | high | high | the model is too simple to capture the pattern |
| Good fit | low | low | it learned the real pattern and generalises to new data |
| Overfitting | very low | high | it memorised the training data, noise included, and fails on new data |
Where it shows up
- Every ML project splits data into training and test sets before trusting a model.
- Data quality work (cleaning, checking, updating) is often most of the effort in real AI projects.
3. Neural Networks (layers of neurons)
A neural network is a model made of layers of simple units called neurons. Each connection has a weight, a number that says how much one neuron's output matters to the next. Learning means finding good weights.
Think of a team passing a decision along. The first row reads the inputs, each next row combines what the row before reported, giving more say to colleagues it trusts more (bigger weights). The last row gives the answer. Training is the team learning whom to trust.
b in the line). Two things change: it has many more parameters, and each neuron bends its result, so together they can draw curves instead of a straight line (nonlinear). Training is the same: find the parameter values that make the predictions right.The task in the demo below: a light should be on when exactly one of two switches is on (this is called XOR). Each switch is a number: 0 = off, 1 = on. No single straight line can separate the "on" cases from the "off" ones, so the network needs an extra middle layer of neurons (a hidden layer, explained below the demo).
| Model | Parameters | Shape | Output |
|---|---|---|---|
| Line (lesson 2) | 2 (a, b) | straight | a price: a number (regression) |
| The network below | 13: 9 weights (2 inputs × 3 hidden neurons, plus 3 hidden × 1 output) and 4 biases (one in each hidden and output neuron) | curved (nonlinear) | light on or off: a category (classification) |
| A large language model (LLM, lesson 4) | billions | very flexible | the next word or word piece (a token), picked from a fixed vocabulary |
Whether the output is a category or a number, training works the same way: adjust the parameters to reduce the error.
In the demo, the network has 2 inputs (the switches), 3 hidden neurons in the middle, between input and output, and 1 output (the light). Each line is a weight: a blue line is a positive weight, an orange line is a negative weight (it pushes the next neuron's value down), and a thicker line means a bigger weight.
The parts of a network
- Input layer: the numbers you feed in (pixels, words turned into numbers, measurements).
- Hidden layers: each neuron multiplies its inputs by weights, adds them up, and passes the result through an activation function that bends it. Stacking layers lets the network learn complex patterns.
- Output layer: the answer, such as a probability or a predicted number.
How it learns: adjusting weights from examples
- Forward pass: run an example through the network to get a prediction.
- Measure the error: compare the prediction with the right answer.
- Backpropagation: work out how much each weight contributed to the error.
- Update: nudge every weight a little in the direction that reduces the error (gradient descent). Repeat over many examples, many times.
Training is iterative: the network goes through the examples many times, and each time it nudges every parameter a little, until the error stops falling. The small network above needs 1,500 rounds (called epochs; one epoch is one pass through all the examples) for its 13 parameters. An LLM has billions of parameters and learns from trillions of words (tokens, lesson 4), which adds up to an enormous number of simple multiplications. GPUs (graphics chips, first made for video games) can do thousands of these at the same time (in parallel), which is why training large models needs many powerful GPUs, often running for weeks or months.
Where it shows up
- Image recognition, speech recognition and translation.
- Recommendations on video and shopping sites.
- Large language models (Part B): a very large network trained on huge amounts of text.
Part B · Generative AI in practice
The main focus: how large language models work, and how people build useful, safe systems with them.
4. Generative AI and Large Language Models (LLMs)
Generative AI creates new content (text, images, audio, video, code) instead of only sorting or predicting labels. A large language model (LLM) is a generative model for text: a very large neural network trained on huge amounts of text to predict what comes next. It is the same idea as the line in lesson 2: a model whose parameters are learned from data, only with billions of them.
Think of an extremely well-read autocomplete. Your phone's keyboard suggests the next word from a few common phrases. An LLM does the same job at a vastly larger scale, having read a large share of the public internet and many books, so its "next word" can continue a story, answer a question or write working code.
Not only text
| Generative AI creates | Example request → result |
|---|---|
| Text | "Summarise this report" → a short summary (LLMs, the focus of this course) |
| Code | "Write a function that checks an email address" → working code |
| Images | "A cat astronaut, in watercolour" → a picture |
| Audio | a written text → natural-sounding speech, or a description → a short piece of music |
| Video | "A video filmed from high above a beach at sunset" → a short clip |
Many models are also multimodal: they can read images, audio or documents, not only create them. The rest of this course focuses on text and LLMs, because most AI tools at work are built on them.
Tokens and the context window
LLMs don't read letters or whole words; they read tokens, common chunks of text such as learn, ing or the. In English, one token is about 4 characters, or about ¾ of a word. The context window is the most tokens the model can work with at once: your prompt (the text you send the model), the conversation so far, any documents you add, and its answer.
How an LLM is made: pre-training, then tuning
predict the next token, trillions of times→ 2. Instruction tuning
learn from examples of good answers→ 3. Preference tuning
people rate answers (e.g. RLHF)→ Helpful assistant
- Pre-training teaches language, facts and patterns by predicting the next token across a huge amount of text. The result, a base model, can continue any text but doesn't reliably follow instructions.
- Instruction tuning trains it further on examples of instructions paired with good responses, so it learns to act as an assistant.
- Preference tuning (for example RLHF, reinforcement learning from human feedback) uses people's ratings of answers to make it more helpful, honest and safe.
| Trained to | You type: "What is the capital of France?" | |
|---|---|---|
| Base model | predict the next token | "What is the capital of Germany? What is the capital of Italy?…" (it just continues the text) |
| Instruction-tuned model | answer questions and follow instructions | "The capital of France is Paris." |
The Transformer, at a high level
Most LLMs are built on the Transformer architecture (a particular design for the network, introduced in 2017). Its key idea is attention: when processing each token, the model looks at all the other tokens in the context and decides which ones matter most for understanding it.
Why is that needed? Many words only make sense in context. In "The animal didn't cross the street because it was too tired", you know at once that it means the animal. Change one word, "…because it was too wide", and it now means the street. Think of reading with a highlighter: for each word, you highlight the other words that help you understand it. Attention is the model's highlighter.
numbers for each token (more in lesson 6)→ Transformer layers × many
attention + small neural nets→ Probabilities for
the next token
Attention, step by step
- Start with a general meaning. Each token gets its embedding, a list of numbers for its usual meaning. At this point "it" is just "it", the same in every sentence.
- Score the other tokens. For each token, the model scores how relevant every other token is to it. The scores are turned into percentages that add up to 100%: the attention weights.
- Mix in what matters. The token's meaning is updated with information from the tokens it attends to most. After this step, "it" in "…too tired" carries the meaning "the animal".
- Repeat, many times. This happens in every layer, with many attention heads working side by side, each looking for a different kind of link (grammar, who did what, what "it" refers to). Layer after layer, the model builds an understanding of the whole text, and then predicts the next token from it.
How to read it: the highlighted word is the one being understood. The bar and percentage under every word show how much attention it gets from that word; they add up to 100%. Grey words can't be clicked here. The weights are set by hand to show the idea: a real model learns, during training, the parameters that produce them.
Next-token prediction and temperature
An LLM writes one token at a time. At each step it gives every possible next token a probability, picks one, adds it to the text, and repeats. Usually it samples (picks at random, weighted by probability), which is why the same prompt can give different answers. Temperature controls how adventurous the picks are: low temperature almost always takes the most likely token; high temperature spreads the chances out.
Think of asking two friends to finish a sentence. The careful one always picks the obvious word. The adventurous one surprises you: sometimes brilliantly, sometimes oddly. Low temperature is the careful friend; high temperature is the adventurous one.
| Temperature | Behaviour | Use it for |
|---|---|---|
| Low (about 0–0.3) | consistent: picks the most likely tokens | facts, code, extracting data, classifying |
| Medium (about 0.5–0.8) | balanced | everyday chat, explanations, emails |
| High (about 1 or more) | varied and surprising, but can drift or make more mistakes | brainstorming, story ideas, slogans, poems |
Chat apps choose the temperature for you. Developers set it when they build their own apps on top of an LLM.
The demo below uses a tiny, made-up language model that knows only a few words, just to show the idea: at each step it shows the probability of every possible next token, then picks one.
Where it shows up
- Chat assistants, writing and summarising, translation, and coding assistants.
- Image and video generators work on the same "generate step by step" idea with different model types.
5. Prompt Engineering (asking well)
A prompt is everything you send the model. Prompt engineering is writing prompts that reliably get the result you need: clear, specific and structured.
Think of briefing a smart new colleague who knows a lot but nothing about your situation. "Look at this" gets you a guess. "You're our feedback analyst; label this review as positive, negative or mixed, like these two examples, and give me JSON" gets you exactly what you need. (JSON is a simple, structured text format that programs can read.)
In the demo, we ask a model to label the sentiment of one product review (the feeling it expresses: positive, negative or mixed). Each box adds one technique to the prompt; the table below the demo explains each one.
The main techniques
| Technique | What you add | Why it helps |
|---|---|---|
| Clear instructions | exactly what to do, the options, length and audience | removes guessing; vague in, vague out |
| Role | "You are a…" (often in the system prompt: standing instructions the app sends before your messages) | sets expertise, tone and point of view |
| Context | background, goal, who will read it, constraints | the model can't know your situation unless you say it |
| Examples (few-shot) | a few input → output pairs | shows the exact labels, style and format you want |
| Step by step | "think step by step", or list the steps | helps with reasoning tasks; makes the logic easy to check |
| Structured output | "answer as a table / list / JSON with keys…" | easy to read, and easy for programs to use |
From prompt engineering to context engineering
A prompt is only part of what the model sees. Context engineering is deciding everything that goes into the context window for each request to the model: the instructions, but also the right documents, the tools it may use and memories of earlier chats (both in lesson 7), the conversation so far, and what to leave out or summarise so the important parts fit.
| Prompt engineering | Context engineering | |
|---|---|---|
| Focus | how you write the request | what the model sees when it answers |
| Includes | instructions, role, examples, output format | all of that, plus retrieved documents (RAG), tool definitions and results, memories, chat history |
| Done by | mostly a person, once per task | mostly the app, or the program around an agent (its harness, lesson 7), automatically, at every step |
| Analogy | writing a clear brief | also packing the right folder of papers to go with it, and nothing extra |
The model only knows what's in its context, so a great prompt with the wrong documents still gives a wrong answer, and too much irrelevant text can bury the important part. RAG (lesson 6) and agents (lesson 7) are context engineering in action.
Where it shows up
- Everyday chat use: better questions get better answers.
- Apps built on LLMs: a carefully tested system prompt plus structured (often JSON) output that the app's code reads.
- RAG and agents (next lessons) rely on context engineering: they put the right information and tools into the context.
6. RAG (Retrieval-Augmented Generation)
RAG lets an LLM answer from your documents: first retrieve the most relevant passages, then add them to the prompt, then let the model generate an answer based on them.
Think of an open-book exam. The student (the LLM) is clever but can't know your company's handbook (the document of staff rules and policies) by heart. With RAG, a librarian quickly finds the right pages and puts them on the desk before the student writes the answer.
Why LLMs need external knowledge
- Old knowledge: a model only knows what was in its training data, up to its training cut-off date.
- Private knowledge: it has never seen your company's policies, contracts, emails or databases.
- Trust: answers based on retrieved sources can show where they came from, so people can check them. This also reduces hallucinations (made-up answers).
Embeddings: meaning as numbers
An embedding model turns a piece of text into a list of numbers (a vector) that captures its meaning. Picture each list of numbers as an arrow. Texts with similar meanings get arrows pointing the same way, even if they share no words. Cosine similarity scores how alike two arrows' directions are: 1 = same direction (same meaning), 0 = unrelated. That's why a search for "cheap flights" can find a page about "low-cost airfares", even though they share no words.
In the demo, each sentence gets 3 numbers: how much it is about animals, about money and about weather. To fit them on a flat map, the 3 numbers are squeezed into 2 positions, so sentences with similar meanings land close together.
Real embeddings have hundreds or thousands of numbers. Here each sentence has 3 (how much it's about animals, money and weather), so you can see the idea.
Chunking and the vector database
Documents are usually too long to embed or retrieve as one piece, so they're split into chunks (for example a few paragraphs each, often with a little overlap). Each chunk is embedded and stored in a vector database, which can quickly find the chunks closest to any question's vector.
Size matters: chunks that are too big bring in unrelated text and waste the context window; chunks that are too small lose meaning, like cutting a recipe in the middle of a step. A few paragraphs, with a little overlap, is a common starting point.
The flow: retrieve, augment, generate
Where it shows up
- Company assistants that answer from handbooks, internal web pages and support requests.
- Customer support bots that answer only from the product documentation, with links to sources.
- "Chat with your PDF" tools and AI search engines that cite web pages.
7. AI Agents (LLMs that take action)
An AI agent is an LLM plus a harness: the program around the model that gives it tools (search, calculators, calendars, code, other apps) and keeps it working in a loop toward a goal. The model decides what to do; the harness does it, shows the model the result, and they repeat until the task is done.
A chatbot is like a knowledgeable friend on the phone: they can only talk. An agent is like an assistant at a desk with a computer and a phone: they can look things up, calculate, and get things done, checking each result before the next step. The LLM is the assistant's brain; the harness is everything around it: the desk, the computer, the phone, the to-do list and the office rules.
The demo shows an agent answering a weather question. Watch three things: the loop (think, act, observe), the tools it calls, and its memory. Each is explained below the demo.
Agent = LLM + harness
The LLM is the brain: it reads, reasons and decides. On its own it can only turn text into text. The harness is the program around it that does everything else:
| Harness job | What it means | In the demo above |
|---|---|---|
| Tools | offers the model a list of tools, and runs the ones it asks for | get_weather, calculator |
| The loop | sends the conversation to the model again and again, until the task is done or a limit is hit | think → act → observe, at most 10 steps |
| Context and memory | decides what goes into the context window (context engineering, lesson 5), and saves and recalls long-term memories | "home city: Paris" |
| Safety | sets permissions and limits, and asks a person to approve risky actions | only two harmless tools |
Tools are small programs (called functions) the harness can run, each with a name, a description and the inputs it needs, so the model knows when and how to use it:
Tool calling: how the model asks to use a tool
- The harness sends the conversation plus the list of tools to the model.
- If a tool would help, the model replies with a tool call: the tool's name and its arguments (the input values it needs, such as the city), usually as JSON, for example
get_weather({"city": "Paris"}). - The harness, not the model, runs the tool and sends back the result.
- The model reads the result and either calls another tool or writes the final answer.
Reasoning, planning and the agentic loop
Before acting, the agent reasons about the goal and plans the steps ("first get the forecast, then convert the temperature"). Then it runs the loop: think → act → observe → repeat, adjusting the plan when a result is surprising, until it can answer or hits a limit set by the harness (for example a maximum number of steps). This cycle is often called the agent loop, and the pattern behind it is known as ReAct (Reason + Act): the model alternates between reasoning about what to do next and acting with a tool, and uses each result to decide its next step.
Memory: short-term and long-term
| Memory | Where it lives | Example |
|---|---|---|
| Short-term | the context window: the current conversation, tool calls and results | the forecast it just looked up |
| Long-term | outside the model (a database, files, a vector database as in lesson 6), retrieved when relevant | "home city: Paris", "prefers °F" (Fahrenheit), saved from earlier chats |
Short-term memory is limited by the context window and is gone when the session ends. Long-term memory is saved and fetched by the harness, usually just like RAG.
Chat, RAG or agent?
| What you need | Use | Example |
|---|---|---|
| an answer from general knowledge | plain chat | "Explain how a rainbow forms." |
| answers from your own documents | RAG (lesson 6) | "How many vacation days do I get?" |
| several steps, or real actions | an agent | "Find the three cheapest flights, check my calendar and draft an email." |
Agents are slower and cost more, so use the simplest option that does the job.
Where it shows up
- Coding agents that read code, check that it works and fix errors.
- Research agents that search, read sources and write a report.
- Assistants that manage email, calendars and support requests, with a person approving important actions.
8. MCP and Skills (access and know-how)
MCP (Model Context Protocol) is an open standard (a shared, public set of rules anyone may use) for connecting AI applications to tools and data. Skills are packaged instructions that teach an agent how to do a task. MCP gives the agent access; Skills give it know-how.
Think of a new employee. MCP is their set of keys and logins: the shared code folder, the sales records, the calendar. Skills are the team's how-to guides: "this is how we write release notes". Keys without guides lead to messy work; guides without keys can't get anything done.
The diagram below shows an AI app (left) connected to three outside systems (right) through MCP, plus three skills. The words client, server and host are explained under the demo. Task 1 is a software team's job: writing release notes (a short list of what changed in a new version, here v2.0). The changes are stored on GitHub, a website where teams keep their code; each change is called a pull request (PR).
MCP: a standard way to connect agents to tools and data
- Before MCP, every AI app needed custom code for every tool. MCP is like a USB-C port for AI (the one plug shape that fits many devices): build a connector once, use it in any app that supports MCP.
- Client and server: a server is a small program that sits in front of one system (GitHub, a database, the files on a computer, a calendar) and offers its tools. The AI app (the host; for an agent, its harness) talks to each server through a client, a connector inside the app.
- Servers mainly offer tools (actions the model can call), resources (data it can read) and prompts (ready-made templates). The app first asks "what do you offer?" (
tools/list), then calls a tool when the model asks for it (tools/call). The messages use JSON. - MCP was introduced by Anthropic (the AI company that makes Claude) in late 2024 as an open standard and is now supported by many AI apps and tools.
Skills: packaged know-how
- A skill is a folder with a
SKILL.mdfile (a plain-text file; .md means Markdown, a simple text format): a short name and description at the top, then step-by-step instructions. It can also include scripts, templates and examples. - The agent only sees each skill's short description at first. When a task matches, it loads the full instructions, so many skills can be available without filling the context window.
- Skills capture how your team does things: formats, checklists, your team's own writing style and rules, and the right order of steps.
How they work together
| MCP | Skills | |
|---|---|---|
| Gives the agent | access: tools and data in other systems | know-how: how to do a task well |
| What it is | a protocol: clients talk to servers | a folder of instructions (SKILL.md) plus optional files |
| Example | a GitHub server with a list_merged_prs tool | a "release-notes" skill with the team's format |
| Together | the skill says what to gather and how to present it; MCP tools fetch the data. | |
Where it shows up
- Coding assistants that connect to your repository, issue tracker and docs through MCP servers.
- Company assistants with skills for reports, slide decks, spreadsheets or reviews in the house style.
9. Fine-tuning (specialising a model)
Fine-tuning means training an already pre-trained model a bit more on your own examples, so it learns a specific behaviour, style or task. It changes the model's weights, unlike prompting and RAG, which only change its input. It can also teach a small, cheap model to do one task as well as a big one.
Think of a doctor who finished medical school (pre-training) and then spends a few more years training in one specialty, such as children's medicine (fine-tuning). They keep their general knowledge, but become fast and consistent at one kind of work.
hundreds to thousands of input → ideal output pairs→ Extra training→ Specialised model
Choosing the approach: prompt engineering vs. RAG vs. fine-tuning
Describe your situation:
| Prompt engineering | RAG | Fine-tuning | |
|---|---|---|---|
| Changes | the instructions | the information in the prompt | the model's weights |
| Best for | most tasks; always start here | up-to-date or private knowledge, with sources | consistent behaviour, style or format; narrow tasks |
| Effort and cost | low: minutes | medium: split, embed and store your documents | higher: collect data, train, evaluate |
| Updating | edit the prompt | update the documents | train again |
Where it shows up
- Sorting customer support requests (tickets) into a company's own categories, in a fixed format, at large volume.
- Matching a brand's writing style, or a specialised medical or legal vocabulary.
- Training a small, cheap model to do one task as well as a big general one. Efficient methods update only a small part of the model (one popular method is called LoRA), which keeps fine-tuning affordable.
10. Limitations and Risks (use AI wisely)
AI is powerful but not perfect. Knowing its main limitations (hallucinations, bias, privacy and prompt injection) is what lets you use it safely, and decide when a person must check the result.
Think of AI as a very fast, very confident new trainee. Great for drafts and research, but you wouldn't let them sign contracts or send money without someone checking.
| Risk | What it is | How to reduce it |
|---|---|---|
| Hallucinations | confident, fluent answers that are false or made up (fake facts, quotes, sources) | ground answers with RAG and sources, ask for citations, verify important facts |
| Bias | models learn patterns from human data, including unfair ones, and can repeat them | check results across groups, use balanced data, have a person check decisions about people |
| Privacy and data security | sensitive data put into prompts may be stored or seen by others, or leak through outputs | follow your organisation's rules, use approved tools, remove personal and secret data |
| Prompt injection | instructions hidden in content the AI reads (web pages, emails, files) that try to take control of it | treat outside content as data, give tools only the permissions needed, require approval for risky actions |
Prompt injection: a key risk for agents
An agent that reads outside content can't always tell your instructions from instructions hidden in that content. Here an agent is asked to summarise a web page that contains a hidden command. The red text is hidden inside the page's code, so a person viewing the page never sees it, but an AI reading the page does. Turn the defences on and off to see what happens.
Human review: when not to trust AI output on its own
- High stakes: medical, legal, financial or safety decisions, and decisions about people (hiring, grading, lending). Having a person review or approve these is called keeping a human in the loop.
- Actions that are hard to undo: sending messages, payments, deleting data, publishing.
- Facts you can't easily check, especially numbers, quotes, names and sources.
- When it's outside the model's knowledge: very recent events or your private data without RAG.
Spot the risk
For each situation, choose which of the four risks in the table above it shows.
AI glossary
The key terms from the course on one page. Filter by topic to revise before the final quiz.
Final quiz & certificate
This is the last step of the course: one list of 12 questions on the main concepts of every lesson. After each answer you'll see the correct option and why it's right. Score 80% or more (10 of 12) to earn a certificate with your name.