Explainers · Technology
How AI assistants work: what ChatGPT is actually doing
ChatGPT, Gemini and Claude are used by hundreds of millions of people, but most have no idea what they actually are. They're not search engines. They don't "know" things the way you know things. And they can be confidently, fluently wrong. Here's what's actually happening — and what it means for how you should use them.
In short
- An AI assistant is a large language model (LLM) — a mathematical system trained to predict what the next word in a sentence should be, based on patterns learned from billions of pages of text.
- It doesn't look things up. It doesn't have a database of facts. It generates text that is statistically plausible given your question and everything it learned during training.
- This is why it can produce responses that sound authoritative but are factually wrong — it's not lying, it's pattern-completing without a way to verify the output.
- AI assistants are genuinely powerful for writing, summarising, explaining and brainstorming — tasks where "very good" is enough and you can verify the result. They are unreliable for specific facts, recent events, numbers and anything where being wrong has real consequences.
What an AI assistant is not
Before explaining what these systems are, it helps to clear away three common misconceptions.
It is not a search engine. Google searches the web, finds pages, and returns links. ChatGPT doesn't search anything when you ask it a question. It generates a response from patterns it absorbed during training, which ended months or years ago. It has no live connection to the internet unless a tool has been explicitly added for that purpose.
It does not "know" things the way a person does. When you know that the capital of Pakistan is Islamabad, you have a fact stored in memory that you can retrieve and verify. An AI assistant has statistical associations between words: "capital," "Pakistan" and "Islamabad" appear near each other millions of times in its training data, so it produces "Islamabad" reliably. That's not knowledge — it's pattern matching that happens to give the right answer for common facts.
It is not thinking. There is no reasoning happening in the way a human reasons. The model runs a mathematical calculation — a very large one — and outputs the words that its training suggests come next. It has no goals, no curiosity, no experience of "figuring something out." The appearance of reasoning in the output is a reflection of the structure of human writing it learned from.
Training: reading most of the written internet
The foundation of a large language model is its training data: a massive collection of text — web pages, books, Wikipedia articles, news, research papers, forums, code, in dozens of languages. For the largest models, this means hundreds of billions of words, tens of trillions of characters.
During training, the model is shown a piece of text with the last word hidden, and it has to predict what that word is. If it's wrong, the system adjusts the model's internal settings slightly to make the correct answer a little more likely. This process — predict, check, adjust — is repeated trillions of times across the entire training dataset.
What emerges from this process is a network of billions of numbers (called parameters or weights) that encode, in a highly compressed and distributed way, the patterns of language and the relationships between ideas across all the text the model has seen. No fact is stored in one place as a named variable. Instead, information is encoded in the interplay between all these weights simultaneously — which is why it's hard to edit or correct a specific fact in a trained model.
Training a model like GPT-4 or Claude requires enormous computing power — hundreds or thousands of specialised processors running for weeks or months — and costs tens to hundreds of millions of dollars. This is why only a handful of companies (OpenAI, Anthropic, Google, Meta, Mistral) operate at the frontier.
How it generates an answer
When you type a question, the model doesn't retrieve an answer from memory. It generates a response, one piece at a time.
Your text is first broken into chunks called tokens — roughly one token per word or word-fragment. "Pakistan" is one token. "Islamabad" is one token. "unbelievable" might become "un" + "believ" + "able" — three tokens. The model processes your tokens and then generates response tokens one by one.
At each step, the model calculates a probability for every possible next token — which word (or word-piece) would most plausibly follow, given your question and everything generated so far. It picks one, appends it, then calculates again for the next token. This continues until the response is complete.
This word-by-word construction is why responses sometimes start confidently and drift, or why the model commits to an incorrect fact early and then builds an entire plausible-sounding paragraph on top of it. Each token is chosen based on what comes before — the model has no mechanism to look ahead, reconsider or check whether the answer is true.
Why it makes things up
AI researchers call incorrect-but-confident outputs hallucinations. The word captures something important: the model isn't lying (it has no intentions), and it isn't guessing randomly. It's producing output that is linguistically coherent and locally plausible but factually wrong.
This happens because the model was trained to produce fluent, plausible text — not to produce only text it can verify. When asked about an obscure fact, a recent event, a specific statistic or a named individual, the model fills in the gaps the same way it fills in anything else: by finding the most statistically likely continuation. Sometimes that continuation is correct. Sometimes it's a confident confabulation.
Some examples of where this matters:
- Citing sources: Ask an AI for references and it will often invent plausible-sounding paper titles, journal names and authors that don't exist.
- Recent events: The model's training has a cutoff date. Ask about something that happened after that date and it may fabricate an answer or say it doesn't know — but it doesn't always reliably distinguish between the two.
- Specific numbers: Statistics, prices, percentages. The model knows roughly the shape of an answer ("inflation in Pakistan rose sharply in 2023") but the specific figure it generates may be wrong.
- Local or niche information: The training data is weighted toward English-language, Western internet content. Information about Pakistani cities, local businesses, regional laws and local public figures is underrepresented, so the model is more likely to be wrong about them.
What AI assistants are genuinely good at
None of the above means these tools are useless — they're extraordinarily capable at the right tasks. The key is that the tasks where they excel are ones where the quality of the output matters more than strict factual accuracy, or where you can easily check the result.
- Writing and editing. Drafting emails, formal letters, CVs, job applications, social media posts. The model has absorbed enormous amounts of professional writing and can produce clean, well-structured text quickly. You review and edit — but it gives you something to start from.
- Explaining concepts. Ask it to explain how something works — a legal term, a medical condition, a financial concept — and it usually does so clearly and in plain language. Treat it as a first draft of an explanation you then verify with a primary source, not as the final answer.
- Summarising long text. Paste in a contract, a report or a long article and ask for a summary. This is one of the most reliable uses: the model is good at extracting structure from text.
- Brainstorming and generating options. Need ten names for a business? A list of questions to ask a doctor? Ideas for a school project? The model generates options quickly. You choose; it generates.
- Writing and explaining code. AI assistants are remarkably good at writing, explaining and debugging computer code — which is a highly structured, formal language where correctness is easy to test.
- Translating and rephrasing. Between major language pairs — including Urdu and English — AI translation is now very good, often better than older services.
What to watch out for
The practical rules for using AI assistants safely come down to a few principles.
Verify anything that matters
If you're making a decision — medical, financial, legal — treat AI output as a starting point, not a conclusion. Use it to understand the question better, then confirm the specifics with a professional or a reliable primary source. The model sounds authoritative whether it's right or wrong; the confidence in the tone carries no information about accuracy.
Don't share private information
Everything you type into a commercial AI assistant is typically sent to a company's servers and may be used to improve future models (depending on the service's privacy settings). Don't paste in your CNIC number, bank account details, passwords, medical records or private messages. Even if the company handles it responsibly, it's not a habit worth forming.
Be specific about what you need
Vague questions get vague answers. The more context you give — "explain this as if I have no background in finance" or "give me five options, each in one sentence" — the more useful the response. AI assistants follow instructions well; they're poor at inferring what you wanted from an ambiguous prompt.
The main AI assistants: what's different about each
All the major assistants are built on similar foundations, but they differ in emphasis, pricing and behaviour.
- ChatGPT (OpenAI): the most widely recognised, with the largest user base globally. The free tier uses GPT-3.5; paid subscribers get access to GPT-4 and plugins including web search.
- Gemini (Google): built into Google Search and available as a standalone assistant. Strongest on tasks where freshness matters, as it can search the web by default.
- Claude (Anthropic): trained with a focus on being helpful, harmless and honest. Handles very long documents well — it can read an entire research paper or contract in a single session.
- Llama / local models (Meta and others): open-source models that can run on your own device. No data leaves your phone or computer. Smaller and less capable than the frontier models, but completely private.
All of them hallucinate. All of them have training data cutoffs. The differences in quality are real but secondary to understanding what the category of tool fundamentally is and isn't.
The bigger picture
AI assistants are the first technology in a long time that feels qualitatively new rather than just faster or smaller. They are genuinely useful in ways that weren't possible two years ago. They are also genuinely unreliable in ways that aren't obvious from using them.
The most useful mental model: treat an AI assistant the way you'd treat a very well-read colleague who is excellent at writing, explaining and generating ideas — but who you've caught making confident mistakes before. You'd work with them, benefit from their output and then verify the parts that matter before acting on them.
That's about right.