How AI works
Artificial intelligence is an old idea. The term was coined in 1956, at a workshop at Dartmouth where scientists set out to explore whether computers could reason the way people do.
What people mean by AI
A short description comes from the National Cyber Security Centre (NCSC). It calls AI any computer system that can do tasks which usually need human intelligence. Its examples are seeing, writing text, recognising speech and translating between languages.
The chatbots that answer questions in full sentences belong to one branch, called generative AI. These tools produce new content, such as text, pictures or video.
Learning from examples
Most AI tools are built with machine learning, according to the NCSC. In its words, the computer finds "patterns in data" without a person having to program each step.
The UK government's AI Playbook explains two ways of doing it. In supervised learning, each example comes with the right answer attached, and the system learns from those labelled examples. In unsupervised learning, the examples carry no labels, and the system looks for patterns, groupings or structures by itself.
What a model is
A model is what the learning leaves behind. The Playbook describes it as the result of training, which picks out the useful features in the data and weighs how they relate to each other.
A neural network is one kind of model, inspired by the networks of cells in the human brain. During training, the network makes a guess, measures how far off it was, and nudges the strength of its connections by a very small amount. Repeated over and over, that tuning lets the network handle related examples it has never seen.
The Playbook says the largest modern AI systems run to hundreds of billions or even trillions of parameters. They are trained on networks of thousands of graphics processors.
Training a model, then using it
Building a model and using one are two separate stages. A large language model, the kind behind a chatbot, is trained first on a huge amount of text, typically taken from the open internet.
Typically, the data in a model stays fixed once training ends, the NCSC explained in 2023. Developers can refine it with extra training on new data, known as fine-tuning. A user can also paste extra information into the question itself.
When someone types a question, the model weighs which replies are most likely to fit, given what it learned in training. Then it gives the reply that is likeliest to be the right fit.
Why the answers can be wrong
A chatbot writes by predicting the next most likely word. The Playbook explains that this makes its answers plausible, so they look correct even when they are not.
The training data plays a part too. The NCSC says there is so much text that it cannot all be filtered, so incorrect material is likely to end up in the model.
In its section on data protection, the Playbook asks staff to treat what an AI system produces as "statistically informed guesses rather than facts".
Measuring how often a system is right is a subject of its own. The Information Commissioner's Office (ICO) calls it statistical accuracy. It means how often the system gets the right answer when it is tested on labelled examples, usually kept separate from the data it was trained on.
Where to learn more
Elements of AI is a series of free online courses from MinnaLearn and the University of Helsinki. Its Introduction to AI course needs no complicated maths or programming.
The government's AI Playbook has a long "What is AI?" section. Among the academic bodies it thanks for their support are The Alan Turing Institute and the Oxford Internet Institute.
The NCSC's guide to AI and cyber security is written for managers without a technical background.
Useful links
- AI Playbook for the UK Government (Government Digital Service, GOV.UK)
- AI and cyber security: what you need to know (NCSC)
- ChatGPT and large language models: what's the risk? (NCSC, 2023)
- Accuracy and statistical accuracy in AI (ICO)
- Elements of AI (MinnaLearn and the University of Helsinki)