AI news
AI model reviews
AI tools
How-to guides
Our staffAboutContact

What is an AI algorithm? A plain‑English explanation for 2026

An AI algorithm learns its own rules from data instead of following rules a programmer wrote. Here's how that works, with real examples and limits.

A person drawing a diagram on a whiteboard
Photo: Jeswin Thomas on Unsplash

An AI algorithm is a set of step-by-step instructions that lets a computer learn patterns from data and then use those patterns to make predictions, sort things or generate content. The difference from an ordinary algorithm is who writes the rules: in classic software a programmer spells out every rule, while an AI algorithm works out its own rules from examples. So yes, AI runs on algorithms, but not every algorithm is AI.

A good place to see that line in action is your inbox. In 2017 Google said Gmail's machine learning was blocking spam and phishing with 99.9% accuracy, at a time when spam made up somewhere between 50% and 70% of the mail its users got. Nobody at Google typed out a rule for every scam email. They wrote a learning algorithm, fed it huge piles of labelled mail, and let it figure out what junk looks like. That, in my view, is the clearest everyday picture of what people mean by an AI algorithm.

Short answer: what is an AI algorithm?

An algorithm is just a recipe: a finite list of steps that turns an input into an output. Long division is one. So is the rule your bank uses to round interest to the nearest cent.

An AI algorithm is a recipe for building a recipe. You give it data and a goal (say, "label each email as spam or not spam"), and it adjusts thousands, millions or billions of internal numbers until its guesses match the examples. What comes out at the end is a trained model, and that model is the thing that actually answers your questions or filters your mail. Google's own machine learning course puts it plainly: ML is "the process of training a piece of software, called a model, to make useful predictions or generate content (like text, images, audio, or video) from data."

So the honest answer to "is AI just an algorithm?" is no. It's an algorithm plus data plus the trained model that results, and you need all three.

The background: rules, learning and the model in between

For most of computing history, software was written rule by rule. If you wanted a program to approve loans, someone wrote "if income is above X and debt is below Y, approve". That's an algorithm, and it's predictable, but it isn't AI in the modern sense. Early AI looked a lot like this too: the expert systems of the 1970s and 1980s were giant hand-built rulebooks.

The shift came with machine learning, where the rules aren't typed in but learned. Google's course splits these learning approaches into four groups: supervised learning (learning from examples with the right answers attached), unsupervised learning (finding clusters in unlabelled data), reinforcement learning (learning by trial, error and reward) and generative AI, which learns patterns well enough to produce new text, images or music. The large language models behind chatbots sit in that last group; I've written more about them in our guide to LLM AI.

Regulators have had to draw this line in law, which is useful for the rest of us because it forces precise wording. The EU AI Act's Article 3 defines an AI system as a machine-based system that "infers, from the input it receives, how to generate outputs such as predictions, content, recommendations, or decisions".

The key word is "infers".

The OECD's definition uses nearly the same wording, and its explainer notes that a system "infers how to generate outputs" when it processes input "through one or more models and underlying algorithms".

The European Commission went further in guidelines published in 2025. As Orrick's summary of those guidelines explains, several kinds of software don't count as AI under the Act: basic data processing (a database that sorts or filters records), classical heuristics (a chess program that scores board positions without learning from experience) and simple prediction systems, such as a program that predicts stock prices by taking the average. Some of these are clever algorithms. They just don't learn.

A side-by-side spam filter makes the split concrete. This is my own illustration, not taken from any one source:

QuestionRule-based spam filterMachine learning spam filter
Who writes the rules?A programmer ("block if the subject contains FREE MONEY")The training algorithm, from millions of labelled emails
Handles a brand-new scam?Only if someone adds a rule for itOften, if it resembles patterns seen before
Can you read the logic?Yes, line by lineMostly no; it's spread across many learned weights
Fails how?Misses anything outside its rulesCopies whatever bias or gaps sit in its training data
Counts as AI under the EU definition?Probably notYes

That last row matters more than it looks. Whether a tool counts as AI isn't only a philosophical question any more; in Europe it decides which rules apply.

Real examples of AI algorithms at work

Spam filtering is the quiet classic, but it's far from the only one. Recommendation feeds on streaming and shopping apps use learning algorithms to guess what you'll click next. Fraud checks at card companies score each payment against patterns learned from past fraud. Photo apps that find "beach" or "dog" in your camera roll use neural networks trained on labelled images, which is the visual object recognition case the OECD gives as its example of inference.

Then there's the generative wave.

Chatbots, image generators and coding assistants are all built by training algorithms on enormous datasets, and the results have moved fast. Stanford's 2026 AI Index reports that on the SWE-bench Verified coding benchmark, performance rose from 60% to near 100% in a single year, and AI agents went from 12% to about 66% task success on OSWorld, a test of real computer tasks.

The same report has a detail I can't stop thinking about: the top model read analog clocks correctly just 50.1% of the time. A system that wins a maths olympiad gold medal (Gemini Deep Think did, per the Index) can still fumble a kitchen clock. That's what learned rules look like. They're only as good as the patterns the training data happened to contain.

Benefits and limitations

The big benefit is scale. A learning algorithm can pick up patterns no person would think to write down, and it can apply them to millions of cases a second. That's why spam filters got so good, and it's probably why Stanford found organisational adoption of AI reached 88%, with generative AI hitting 53% population adoption within three years.

The limitations come from the same place. An algorithm that learns from the past will happily learn the past's mistakes, and the best-known case is still Amazon's. Reuters reported in 2018 that Amazon's experimental recruiting engine had been trained on ten years of CVs, most of them from men. According to the report, it penalised CVs that included the word "women's" and downgraded graduates of two all-women's colleges. Amazon edited the programs to be neutral to those terms, but people familiar with the project told Reuters that was no guarantee the system wouldn't find other ways to discriminate, and the team was eventually disbanded. I've covered this kind of failure in more depth in our explainer on AI bias.

Opacity is the other cost. You can read a rule-based filter line by line. You can't really do that with a neural network holding billions of weights, so when it gets something wrong, explaining why is hard. And the number of things going wrong isn't small: the AI Index counted 362 documented AI incidents in 2025, up from 233 in 2024.

Honestly, I think both sides of this get overstated. AI algorithms aren't magic and they aren't doomed to be biased; they're pattern-finders, and the quality of what they find depends heavily on the data and on how carefully people check the results.

Practical takeaways for you

You don't need to write code to use any of this. A few habits help, though.

When a company says its product "uses AI", it's fair to ask which kind. Is it a learned model, or a set of hand-written rules with a new label on the box? Under the Commission's guidance, a lot of software sold as AI might not count, and I'd guess plenty of "AI-powered" marketing describes plain old algorithms.

When an AI tool affects something important (a job application, a loan, a medical question), remember it's predicting from patterns and has no built-in way to check facts. Treat its output like a confident first draft. That goes double for chatbots, which can produce fluent answers that are simply wrong.

If you're curious about building one yourself, the gap between "algorithm" and "model" becomes obvious fast; our step-by-step guide on how to train an AI model walks through it, and AI vs machine learning vs deep learning sorts out the terms that tend to get mixed up.

Next up: rules, regulation and smarter systems

The legal definition of an AI algorithm is about to matter a lot more in Europe. The AI Act was meant to bring in most of its obligations, including the rules for high-risk systems, on 2 August 2026. A provisional deal on the EU's Digital Omnibus pushed that back: going by Sidley's write-up, rules for stand-alone high-risk systems (such as AI used in hiring) would apply from 2 December 2027, and rules for AI built into regulated products like medical devices from 2 August 2028. The European Parliament voted to adopt the deal on 16 June 2026; at that point it still needed the Council's formal approval.

That timing gives companies a reason to look hard at whether their software "infers" or just follows human-written rules, because the answer decides what they owe regulators. For more on the wider picture, see our guide to AI regulation.

On the technical side, I'd expect the line between rule-based and learned systems to blur further. Agents already mix both: a learned model decides what to do, then hands off to ordinary code to do it. What stays the same, as far as I can tell, is the basic trade. Learned algorithms handle messy, unfamiliar input far better than rules do, and in exchange you give up some of your ability to see exactly why they decided what they did.

FAQ

Is AI an algorithm?

Not quite. AI is built from algorithms, but a working AI system is the learning algorithm plus the data it trained on plus the model it produced. The algorithm is the method; the model is what you actually use.

Does AI use algorithms?

Yes, all the way down. Training uses algorithms (gradient descent is the most common one for neural networks), and running a trained model is itself an algorithm: the input passes through the model's learned weights in a fixed sequence of calculations to produce an output.

How is AI different from algorithms?

A traditional algorithm follows rules a person wrote. An AI algorithm learns its rules from data, so it can handle cases nobody planned for, but its reasoning is harder to inspect. The EU's legal test centres on this: an AI system "infers" how to produce outputs from the input it receives.

Is algorithm AI?

Usually not. Sorting a list, calculating a mortgage payment or finding the shortest route on a fixed map are algorithms, but none of them learns. The European Commission's guidelines explicitly leave basic data processing and classical heuristics out of the AI definition.

What is algorithm in AI?

In AI, "algorithm" normally means the training procedure that adjusts a model to fit data, such as a decision tree learner, a clustering method or the backpropagation used for neural networks. People also use it loosely to mean the trained model itself, which is where much of the confusion comes from. For a wider primer, start with what AI actually is and the main types of AI.

Keep reading