How AI Works
Most of the AI you meet every day is pattern-matching at enormous scale: models trained on huge amounts of data to predict the next word, the likeliest label or the next video you will watch.
Start with large language models, then see the same ideas at work in autocorrect, translation and recommendations.
Start here
How do large language models work?
Large language models work by predicting the next word in a sequence. Trained on vast text using the transformer architecture, they learn statistical patterns of language, then generate responses one token at a time.
How does autocorrect work?
Autocorrect works by comparing what you type against a dictionary and a model of likely words, then fixing or suggesting corrections. It uses the keys you hit, common typos, and the surrounding words to guess what you most likely meant.
How does a chatbot work?
A chatbot works by interpreting what you type and generating a relevant reply. Simple ones match keywords to scripted answers; modern AI chatbots use large language models that predict natural responses based on patterns learned from huge amounts of text.
Every explainer in this guide · 22
How does machine learning work?
Machine learning works by finding patterns in data instead of following hand-written rules. You feed a model many examples, it adjusts itself to predict the right answers, and over time it gets better — learning from data rather than being explicitly programmed.
How does a neural network learn?
A neural network learns by adjusting the strengths of connections between its artificial 'neurons'. It makes a guess, measures how wrong it is, and nudges those connections to do better — repeating over huge amounts of data until its predictions improve.
How does speech recognition work?
Speech recognition works by turning the sound of your voice into text. Software breaks the audio into tiny pieces, uses AI trained on huge amounts of speech to match those sounds to words, and uses language patterns to pick the most likely sentence.
How does machine translation work?
Machine translation works by using AI — today, neural networks — to convert text from one language to another. Instead of swapping words one by one, modern systems learn the meaning and patterns of whole sentences from huge bilingual datasets.
How does facial recognition work?
Facial recognition works by mapping the unique geometry of a face — distances between features, shapes, contours — into a numerical 'faceprint', then comparing it against stored faceprints to find a match. Modern systems use neural networks trained on many faces.
How does a recommendation algorithm work?
A recommendation algorithm works by learning your tastes from your behavior and suggesting things you're likely to enjoy. It compares what you've watched, bought, or liked with patterns from millions of others to predict what you'll want next.
How does a self-driving car work?
A self-driving car works by using sensors to see its surroundings, software to decide what to do, and motors to steer, accelerate, and brake. Cameras, radar, and laser scanners build a live 3D map, and AI uses it to drive without a human.
How does semantic search work?
Semantic search finds results by meaning, not just matching keywords. It converts your query and documents into numerical vectors that capture meaning, then returns the closest matches — so it understands intent, synonyms, and context far better than keyword search.
How does OCR (text recognition) work?
OCR (Optical Character Recognition) turns images of text — like a scanned page or photo — into editable digital text. It finds shapes that look like letters, compares them to known character patterns (often with AI), and outputs the matching text.
How do AI image generators work?
AI image generators work by learning patterns from millions of image-text pairs, then reversing a noising process to create new pictures from text prompts. A neural network called a diffusion model gradually removes random noise, guided by the prompt, until a coherent image appears.
How does text-to-speech work?
Text-to-speech converts written text into spoken audio by analysing the words, predicting how they should sound, and synthesising a waveform. Modern neural systems learn these mappings from thousands of hours of recorded speech, producing natural-sounding voices.
How do face filters work?
Face filters work by using a camera to detect facial landmarks, then overlaying digital graphics that track your movements in real time. Algorithms locate key points like eyes, nose, and mouth, allowing effects to move naturally with your face.
How does predictive text work?
Predictive text guesses the next word or letter by comparing what you have typed against patterns learned from large amounts of text. It ranks likely continuations by probability and shows the top few, updating as you type.
How do voice assistants work?
Voice assistants convert spoken words into text, interpret the meaning using natural language processing, and then generate a spoken response. The process involves capturing audio, converting it to digital data, matching it to commands or queries, and synthesizing speech for the reply.
How does a smart speaker work?
A smart speaker works by continuously listening for a wake word, then streaming your spoken command over the internet to a cloud service that converts speech to text, works out what you mean, and sends back an audio answer or a control signal for a connected device.
How does song recognition work?
Song recognition apps identify a tune by matching a short audio fingerprint against a database of millions of stored fingerprints. The phone captures sound, converts it to a compact spectral signature, and the server returns the best match.
How does reverse image search work?
Reverse image search works by converting a query image into a numerical fingerprint, called a feature vector, and then comparing it against a database of similarly fingerprinted images. The system returns matches ranked by how closely their fingerprints align, often using approximate nearest-neighbor search for speed.
How is an AI model trained?
An AI model is trained by feeding it many labelled examples and repeatedly adjusting its internal settings to reduce the difference between its predictions and the correct answers. This process, called gradient descent, gradually tunes millions of parameters until the model performs well on new, unseen data.
Why do AI chatbots make things up?
AI chatbots make things up because they generate text by predicting likely word sequences, not by looking up verified facts. When the training data or prompt lacks a clear answer, the model produces fluent, plausible-sounding text that can be completely wrong.
Key ideas behind them
What is artificial intelligence?
Artificial intelligence (AI) is the field of building computer systems that can perform tasks normally requiring human intelligence — like understanding language, recognizing images, making decisions, and learning from data. Modern AI is driven mostly by machine learning.
What is a large language model?
A large language model (LLM) is an AI system trained on vast amounts of text to predict and generate human-like language. By learning statistical patterns across billions of sentences, it can answer questions, write, translate, and converse — the technology behind chatbots like this one.
What is a neural network?
A neural network is a computing system loosely inspired by the brain, made of layers of simple connected units that learn patterns from data. By adjusting the strength of connections during training, it can recognize images, understand speech, and power modern AI.
What is deep learning?
Deep learning is a type of machine learning that uses neural networks with many layers to learn patterns directly from data. It powers modern AI — from image recognition and speech to chatbots — by automatically discovering features instead of being hand-programmed.
What is natural language processing (NLP)?
Natural language processing (NLP) is the field of AI focused on letting computers understand, interpret, and generate human language. It powers translation, chatbots, voice assistants, and search.
What is computer vision?
Computer vision is the field of AI that lets computers interpret and understand images and video — recognizing objects, faces, text, and scenes the way humans do with their eyes.
What is prompt engineering?
Prompt engineering is the skill of writing clear, effective instructions to get the best results from AI models like ChatGPT. By phrasing requests carefully — with context, examples, and structure — you can dramatically improve the quality of AI responses.
What is an AI agent?
An AI agent is an AI system that can pursue a goal by taking actions on its own — planning steps, using tools, and reacting to results, rather than just answering a single question. Powered by large language models, agents can carry out multi-step tasks.
What is the Turing test?
The Turing test is a way to judge whether a machine can think, proposed by Alan Turing in 1950. If a human judge chatting with a hidden machine can't reliably tell it apart from a human, the machine passes.
What is artificial general intelligence (AGI)?
Artificial general intelligence (AGI) is a hypothetical AI that can understand, learn, and perform any intellectual task a human can, across any domain. Today's AI is 'narrow' — great at specific tasks but not generally capable.
What is a vector database?
A vector database stores data as numerical 'vectors' that capture meaning, so it can find items by similarity rather than exact match. It's the backbone of modern AI search — letting systems retrieve the most relevant text, images, or audio for a query.
What is a deepfake?
A deepfake is synthetic media — usually video or audio — created by AI to make someone appear to say or do things they never did. It uses neural networks to convincingly swap faces or clone voices, raising serious concerns about misinformation.
What is the uncanny valley?
The uncanny valley is the eerie, unsettling feeling people get from a robot or animation that looks almost — but not quite — human. As realism rises, comfort grows, then suddenly plunges near imperfect human likeness before recovering for the truly lifelike.
हिंदी में पढ़ें: बड़े भाषा मॉडल (LLM) कैसे काम करते हैं? · ऑटोकरैक्ट कैसे काम करता है? · चैटबॉट कैसे काम करता है? · मशीन लर्निंग कैसे काम करती है? · न्यूरल नेटवर्क कैसे सीखता है? · स्पीच रिकग्निशन कैसे काम करता है? · मशीन ट्रांसलेशन कैसे काम करता है? · फेस रिकग्निशन कैसे काम करता है?
Frequently asked questions
How do large language models generate text?
They turn text into tokens and repeatedly predict the most likely next token given everything so far, appending it and predicting again until the answer is complete.
Why does AI make mistakes?
Models learn statistical patterns rather than checking facts, so they can produce confident answers that are wrong, especially on topics rare in their training data.
Is autocorrect a form of AI?
Modern autocorrect is: alongside a dictionary and keyboard-distance rules, it uses language models that weigh the surrounding words to guess what you meant.

