Learn AI /AI Foundations /Algorithm
Algorithm
- Starter
- AI Foundations
- Policy officers
Also called: algorithms.
Back to the milestone you came from
In five seconds
What it is
A set of step-by-step instructions for turning inputs into an output or action.
In plain words
An algorithm is a clear method for taking some information in and producing an answer or action out.
An everyday example
At a service desk, staff receive printed forms from many organisations. One clerk first checks the logo at the top, then looks for the page layout, then compares the photo of the form with a folder of standard templates. If the logo and layout match Template B, the clerk places the form in the blue tray; if not, the clerk sends it for manual review. Everyone follows the same checklist in the same order.
A human clerk can use broad judgement and may notice unusual context that was never written down. Many algorithms cannot do that unless such rules or learned patterns were built into the system, and some algorithms work through numerical calculations rather than explicit checklist steps.
Remember thisAn algorithm is an ordered, finite procedure that turns inputs into outputs through defined steps. It may use rules and calculations without being AI, and it is not the same as a model.
Understand it
Understand it
Why it matters
If you hear that a system uses an algorithm, you can ask useful questions: what inputs it uses, what steps it follows, what output it produces, and where errors or unfair effects might appear.
How an algorithm turns input into an output
After viewing this, a reader should be able to say that an algorithm takes input, applies ordered steps or rules, and produces an output.
01
Input arrives
The process starts with information such as text, numbers, an image or a click.
Draw a box on the left with icons for text, numbers and an image. Add the label 'Input'.
02
Relevant parts are identified
The algorithm uses the parts it needs, such as keywords, sizes, dates or layout features.
Draw a second box with a document and highlighted sections. Label it 'Read features'.
03
Rules or calculations are applied
The algorithm follows ordered instructions. Some steps are fixed rules; some involve mathematical calculations.
Draw a third box with a checklist and a simple decision diamond. Label it 'Apply steps'.
04
Result is produced
The output may be a label, score, ranking, prediction or action.
Draw a final box with two output trays labelled 'Template B' and 'Manual review'. Label the box 'Output'.
A left-to-right flow diagram with four boxes connected by arrows. Box 1 shows a document icon labelled 'Input'. Box 2 shows a magnifying glass and checklist labelled 'Read features'. Box 3 shows a decision diamond and ruler labelled 'Apply rules or calculations'. Box 4 shows two stacked trays labelled 'Output: template match or review'. Small text under the arrows says 'same steps each time, unless the algorithm includes branching conditions'.
On hover or tap, each box reveals one example input and output: a photographed form goes in; the result is either 'matches template B' or 'send for review'.
Describe this without the diagram
This diagram explains an algorithm as a four-stage flow. First, input arrives, such as text, numbers or an image. Second, the system identifies the relevant parts, such as keywords, dates or layout features. Third, it applies ordered rules or calculations, sometimes with branches such as yes or no checks. Fourth, it produces an output, such as a label, score, ranking or next action. The main point is that an algorithm is a process for transforming input into output through defined steps.
With reduced motion: A static four-box flowchart shows Input, Read features, Apply steps, and Output, with arrows between them and brief example labels under each box.
An algorithm tells a computer or a person what to do, in what order, to reach a result. The input is the information it starts with. The output is the answer, label, ranking or action it produces.
Some algorithms are simple and fixed. For example, they may sort names from A to Z or check whether a number is larger than 100. Others are more complex and use many steps, conditions and calculations.
An algorithm is not the same as artificial intelligence. Many algorithms have nothing to do with AI. A calculator, a spam filter based on fixed rules, and a route planner all use algorithms, but they work in different ways.
A model is also different from an algorithm. A model is a mathematical pattern learned from data. An algorithm may be used to train a model, and another algorithm may use that model later to produce an output.
How “Sorting paper forms at a service desk” maps onto the real thing
| In the story | In the AI system |
|---|---|
| the checklist the clerk follows | the ordered steps of an algorithm |
| the photographed form | the input data |
| the folder of standard templates | reference patterns or rules used during processing |
| blue tray or manual review | the output or next action |
A worked example
Producing a ranked shortlist of four public updates for a briefing note due for clearance at 6 p.m.
Starting from: Four updates, each labelled with its publication time, source type and keywords. The editorial rules specify two priority terms and a score for each recognised source type.
- For each update, check whether its keywords include at least one priority term. Exclude the update if neither term appears.
- For every remaining update, calculate a recency score from its publication time.
- Add the score assigned to its source type under the editorial rules.
- Sort the updates from highest to lowest total score. If two totals are equal, place the more recent update first.
Result: The communications officer receives an ordered shortlist for review. The output comes from a finite sequence of checks, calculations, repeated steps and comparisons. The algorithm ranks the updates, but it does not decide what the briefing note should say.
In a United Nations workplace
At 5.20 p.m., a communications officer in an inter-agency secretariat is preparing the briefing note for front-office clearance at 6 p.m. An approved monitoring tool ranks the afternoon's public updates before the officer selects what to include.
The ranking algorithm takes publication time, source type and keywords as inputs. It follows ordered rules to filter, score and sort each item, producing a shortlist. This can be a conventional rule-based procedure rather than AI.
Before you try thisOnly public material may enter this workflow. Restricted drafts, personal data and security-sensitive reporting must not be entered into a tool unless it is expressly approved for that material. The officer must review the shortlist and remains responsible for the note's accuracy, balance and tone.
Where you may hear it
- At a vendor demonstration in a procurement meeting
- In an information management working group reviewing a prioritisation tool
- During clearance of talking points on digital governance
- In an internal audit interview tracing how an automated recommendation was produced
Avoid confusion
Avoid confusion
Often confused with
Artificial intelligence
An umbrella term for computational systems using symbolic reasoning, search or learned models for tasks such as prediction, classification or content generation.
Model
A parameterised mathematical function learned from data that maps inputs to outputs such as labels, scores, predictions or generated text.
Software
A set of coded instructions that tells a computer how to take input, process it and produce output.
Automation
Automation uses a machine or software to carry out set steps with little or no human action after setup.
Common misconceptions
Common misconception: An algorithm means artificial intelligence.
Correction: AI systems use algorithms, but many ordinary software tools use algorithms too. The word is broader than AI.
Common misconception: An algorithm is always objective and neutral.
Correction: The steps may be precise, but the choice of inputs, rules, thresholds and training data can still reflect human assumptions and create biased results.
Common misconception: An algorithm is the same thing as a model.
Correction: A model is usually a learned mathematical structure. An algorithm is the procedure that may train a model, run a model or do something without any model at all.
Quick check
Which statement best describes an algorithm?
An algorithm is a procedure or set of instructions. It can be simple or complex, and it exists in many kinds of software, not only AI. Being algorithmic does not guarantee fairness or accuracy.
Go deeper
Go deeper
The simple version
An algorithm is a clear method for taking some information in and producing an answer or action out.
The technical version
An algorithm is a finite, ordered procedure that maps input to output through defined operations such as comparisons, branching, iteration and numerical computation.
Reviewed external resources
Primary sourceRecommendation on the Ethics of Artificial Intelligence (opens in a new tab)UNESCO
UNESCO’s Recommendation on the Ethics of Artificial Intelligence helps policy and governance readers place algorithms within wider questions of oversight, rights and responsibility.
Intermediatelink checked 2026-07-31
EncyclopaediaAlgorithm (opens in a new tab)Wikipedia
Wikipedia gives a broad introductory overview of the term and suits readers who want a quick general explanation.
Intermediatelink checked 2026-07-31
ArticleMachine Learning Glossary (opens in a new tab)Google
Google’s Machine Learning Glossary suits readers who want short technical definitions and neighbouring terms used in AI practice.
Intermediatelink checked 2026-07-31
VideoVideo explanations: Algorithm (opens in a new tab)YouTube search
The YouTube search results page helps visual learners find different video explanations, but it is a search page with mixed quality rather than one vetted lesson.
search results, not one pagelink checked 2026-07-31
DiscussionCommunity discussion: Algorithm (opens in a new tab)Reddit search
The Reddit search results page shows how people informally ask and answer questions about algorithms, and it suits readers who want to see common confusions, but it is a search page with uneven reliability.
search results, not one pagelink checked 2026-07-31
Where this came from
Drafted with a language model through an offline pipeline, checked against this site's schema, and every external link above fetched to see whether it answers. Treat it as a starting point and check anything that matters against the primary sources. How this site is built and what that means.
The one thing to remember
An algorithm is an ordered, finite procedure that turns inputs into outputs through defined steps. It may use rules and calculations without being AI, and it is not the same as a model.