How is AI Created?

Creating an AI does not mean “programming all the answers”, but designing a system capable of learning from data.
Most current AI systems work through something called an artificial neural network.
What is a neural network?
A neural network is a mathematical model inspired —in a very simplified way— by the human brain.
It is made up of artificial neurons (small computational units) organized in layers and connected to each other. Each connection has an associated number called a weight, which indicates the importance of that signal.
Learning consists, precisely, in adjusting those weights.
When a neural network is created, the weights are initialized with small random values. The network therefore begins “knowing nothing” and learns by automatically adjusting those values through a mathematical algorithm called error backpropagation (backpropagation).
How does a neural network learn?
The basic process is the following:
- The network receives an input (for example, an image).
- It produces an output (for example: “dog”).
- This output is compared with the correct answer (for example: “cat”).
- The error is calculated.
- That error is propagated backwards through the network.
- The weights are slightly adjusted to reduce that error.
- This process, repeated millions of times, is called training.
Types of learning
There are different types of learning:
Supervised learning: The model learns from previously labeled examples. It proposes an answer and compares it with the correct one; if it fails, it adjusts its parameters.
Reinforcement learning: There is no direct correct label. The model learns through trial and error: it performs an action, receives a reward or penalty, and adjusts its strategy according to the result.
How are language models trained?
In models such as those developed by OpenAI, training usually has several phases:
- First, they learn to predict the next word in millions (or billions) of texts.
- Then they are adjusted using supervised learning.
- Finally, they are refined using reinforcement learning based on human evaluations, with the goal of improving the quality, usefulness, and safety of the responses.
Why do they need so much computing power?
Modern networks can have millions or even billions of parameters (weights). Each adjustment involves enormous mathematical calculations that are performed using GPUs (graphics processors) located in large data centers.
How do we know it has learned well?
The model is tested with new data that it has not seen during training. If it works well with that data, we say that it has generalized; otherwise it will only have memorized.
