Artificial intelligence is software that takes input and infers an output, such as a prediction, a piece of content, a recommendation or a decision. Most modern AI is machine learning: instead of a programmer writing every rule, a model is trained on data until it makes useful predictions.
The OECD's definition, which many governments use as a reference, reads: "An AI system is a machine-based system that can, for a given set of human-defined explicit or implicit objectives," infers "from the input it receives, how to generate outputs such as predictions, content, recommendations, or decisions" that "can influence physical or virtual environments." It adds that "different AI systems are designed to operate with varying levels of autonomy and adaptiveness after deployment."
What does "AI" actually include?
AI is a broad label, not one technology. The examples below all fit the OECD definition:
- A spam filter that decides whether an email is junk (a decision).
- A streaming service that suggests what to watch next (a recommendation).
- A photo app that labels a picture as "dog" (a prediction).
- A chatbot that writes a paragraph (content).
The OECD notes that the "infers" wording stresses that the system takes input and processes it through models and algorithms to produce output. Its own example is an image-recognition network that classifies a picture by passing the pixels through the network.
Artificial intelligence basics: how it differs from ordinary software
In ordinary software, a programmer writes the rules. In machine learning, the rules are learned from examples. Google's machine learning documentation puts it this way: "ML is the process of training a piece of software, called a model, to make useful predictions."
| Ordinary program | Machine learning model | |
|---|---|---|
| Where the logic comes from | Written by a programmer | Learned from example data |
| Behaviour on new input | Exactly what the code says | A prediction based on patterns seen in training |
| When it is wrong | Usually a bug you can find in the code | Often a gap or bias in the training data, or an input unlike anything it saw |
How AI learns: inputs, labels and training
Google's crash course uses linear regression, the simplest model, to show the vocabulary. A model finds "the relationship between features and a label." A feature is an input. The label is the output you want predicted. For example, the features could be a house's size and age, and the label its sale price.
A model has parameters, which Google's course calls weight and bias, "calculated during training." In the course's words: "During training, the model calculates the weight and bias that produce the best model." Training is the process of adjusting those parameters until predictions match the examples well. Large neural networks work on the same principle, with billions of parameters instead of two. See what "7B" means in an LLM for how parameter counts are quoted.
Main types of machine learning
Google's documentation lists four types. The quotes below are its wording.
| Type | What it learns from | Example task |
|---|---|---|
| Supervised learning | "lots of data with the correct answers" (labelled examples) | Predicting a house price; flagging spam |
| Unsupervised learning | Data without answers; it aims "to identify meaningful patterns" | Grouping customers into clusters |
| Reinforcement learning | "rewards or penalties based on actions performed within an environment" | Learning a game strategy |
| Generative AI | Large amounts of existing content; "a class of models that creates content from user input" | Writing text, generating images or code |
What is generative AI, and how does a chatbot fit in?
Chatbots such as ChatGPT or Claude are generative AI. They are language models: given text, they predict and produce more text. The technique behind most of them is covered in the attention mechanism explained. Because they generate plausible output rather than look up facts, they can state wrong things confidently; why AI hallucinates explains why. When a language model is given tools and runs in a loop to finish a task, it is called an agent; see what is an AI agent.
What AI can and cannot do
- It works from patterns in data. A model that has never seen a kind of input may give a poor answer without signalling that it is out of its depth.
- Its quality depends on its training data. Gaps or skew in the examples show up in the predictions.
- Autonomy varies. The OECD stresses that systems differ in how much they act on their own. A spam filter acts alone on every email; a writing assistant waits for you.
- Some systems adapt after deployment. The OECD gives recommender systems that tailor themselves to a user as an example. Others stay fixed until retrained.
In practice, treat AI output as a strong draft or a prediction to check, especially for facts, numbers and anything with consequences.
Where to go next
If you want to learn how these models are used day to day, start with how language models read text and how their answers are produced, using the articles linked above. For the underlying machine learning ideas, Google's free Machine Learning Crash Course, cited below, builds up from the linear regression example used here.
Frequently asked questions
- What is the difference between AI and machine learning?
- AI is the broad term for machine-based systems that infer outputs such as predictions, content, recommendations or decisions from their input. Machine learning is one way to build them: software called a model is trained on data to make useful predictions. Most AI you meet today is machine learning.
- Is generative AI the same as AI?
- No. Generative AI is one class of AI models. Google's machine learning documentation defines it as a class of models that creates content from user input, such as text, images, audio, video or code. A spam filter or a route planner is AI but not generative.
- Does AI understand what it is doing?
- The definitions used by standards bodies do not require understanding. They describe a system that infers outputs from input. A trained model finds patterns in its training data and applies them to new input, and whether that amounts to understanding is a separate, disputed question.
- Do I need maths or programming to learn AI basics?
- Not for the basics on this page. The core ideas are inputs, a model, training on examples and predictions. Building models yourself needs programming and some statistics, but using and judging AI tools does not.