How does ChatGPT work? Beginner to advanced guide
- Will Tombs
- Dec 18, 2025
- 14 min read
Updated: May 18
Contents
How does ChatGPT work?
ChatGPT works by predicting the next word in a sentence based on patterns it learned during training. In simple terms, it reads your input, understands context, and builds a response one word at a time.
What is ChatGPT?
ChatGPT stands for Generative Pre-trained Transformer, an AI designed to generate human-like text based on what it has already learned. At its core is an LLM (Large Language Model). It’s a system trained on large volumes of text to recognise patterns, language structure, and reasoning styles.

Today, over 2.5 billion prompts are sent to ChatGPT every day, and many of those questions relate directly to products, services, and businesses like yours. Quite naturally, the real question becomes:
Will your business appear in those answers?
To start with, you need to understand how ChatGPT and LLMs work.
We’ve broken the guide into 3 stages - going from beginner to intermediate to advanced. Jump straight to your level, or follow it step by step from start to finish!
Choose explanation depth
How ChatGPT and LLMs work: Beginner - explained in 1 minute

You ask a question - You type a message just like you would to a colleague.
ChatGPT reads your message - It examines every word and determines what you’re asking and what matters most.
It uses its training and live web search to create answers - ChatGPT learns from large amounts of publicly available text, which helps it understand language patterns and common questions. Humans then improve it using reinforcement learning, showing better and safer answers. When needed, it can also use live web search to access up-to-date information.
It predicts the best possible response - It generates a fresh answer based on what it has learned, similar to how a well-trained employee uses past experience to respond.
It replies in clear, human-like language - Because it understands context, it can write explanations, emails, reports, ideas, summaries, and plans.
In short:
ChatGPT reads your message → understands it → draws on past training → writes the most helpful answer it can.
Wasn’t that simple? At Buried, we simplify complex topics so they’re easy to understand and act on. Learn more here.
How ChatGPT & LLMs work: Intermediate - explained in 3 minutes
Large Language Models (LLMs) like ChatGPT produce answers using two main sources:
Training data
Live web search (only in models connected to the internet)
Most questions fall into one of these categories, and the model decides which source to use. But LLMs can also use a blend of training data and live web search to create an answer.
1. Training data: How LLMs answer general knowledge questions
What is training data?
Training data is a huge collection of text that the model learned from before you ever use it. This is taken from a wide range of large-scale, publicly available and licensed sources, such as:
Websites and open web data (e.g. Common Crawl)
Encyclopaedic sources (e.g. Wikipedia)
Books and long-form content
News articles and blogs
Public forums and discussions
Licensed datasets and human-created examples
This mix helps the model learn how language works across different contexts, industries, and writing styles.
When will an LLM rely on training data?
If you ask: “How many days are in a year?” ChatGPT does not search the internet. It already knows the answer because it has seen this information many times in its training.
How it works
The model retrieves relevant patterns from what it learned.
It checks those patterns internally for consistency (a step known as grounding or fact-checking).
It produces an answer without citations, because it did not fetch it from a specific source

2. Live web search: How LLMs answer real-time or location-based questions
Some questions require fresh, up-to-date information.
Example: “Music events in London this weekend.”
In this case, the model cannot rely on training data.
What happens instead
The model searches the live web.
It retrieves multiple sources.
It grounds the information to ensure accuracy.
It creates a response with citations (because the content came from specific pages).

3. Blending training data & live web search
In some cases, LLMs combine what they already know with web search results. They use training data to understand the topic and structure the answer, then pull live information to update facts, prices, dates, or locations. This creates responses that are both accurate and up to date.
Example: “Is it raining in London today?”
The model already knows what rain is and where London is from its training. But it can’t rely on old data for today’s weather.
What happens
The model uses training data for context
It checks the live web for today’s weather
It confirms the details
It gives a clear, up-to-date answer
In summary
ChatGPT and LLMs create responses by:
Answering general knowledge questions through training data
Answering real-time or location-based questions by searching the web as needed
Blending both methods when the answer requires both context and up-to-date information
How ChatGPT & large language models work: Advanced - explained in 5 minutes

Large Language Models (LLMs) like ChatGPT turn your text into numbers, analyse relationships between those numbers, and then predict the most likely next words until a full response is generated. This process happens in a series of well-defined steps.
In this section, we will break down the steps involved.
Step 1: You enter a prompt
Example: “What is AI?”
This is the starting point. The system reads your sentence exactly as you typed it.
Your input then moves into a structured processing pipeline.
Step 2: Break text into tokens (Tokenisation)
LLMs cannot process whole sentences directly. So your text is broken into tokens, which are small text units.
Example: “What is AI?” becomes:
“What”
“is”
“AI”
“?”
These aren’t always full words. Sometimes they’re parts of words, depending on how common they are in the training data.
Tokenisation is just chopping language into small chunks so the model can handle it properly — the same way you’d break something down before rebuilding it.
Step 3: Convert tokens into embeddings
LLMs do not understand words. They understand numbers. Therefore, each token is converted into a long list of numbers called an embedding.
Embedding = a numerical snapshot of the token’s meaning and relationships.
Example: “AI” might map to something like: [1.2, -0.5, 0.8, 2.1, ...]
These numbers capture:
Context
Semantic meaning
Relationships to other words
Better way to think about it: Embeddings are like giving every word a GPS coordinate on a map of language. Words with similar meanings (like “car” and “vehicle”) sit close together, helping the model understand relationships and similarity.
Step 4: Run embeddings through transformer layers (Deep processing)
This is the heart of how ChatGPT works. A transformer contains multiple layers (sometimes dozens or hundreds). At each layer, two key things happen:
1. Attention
Attention determines which parts of your input matter most for the next step.
If you ask: “What is AI used for in business?” The model needs to pay attention to:
“AI”
“used for”
“business”
not every other filler word.
Think of attention like a highlighter. The model “highlights” the most important words in your sentence so they have the biggest influence on the final answer. This helps the model focus on meaning, not just structure.
2. Deep contextual understanding
As your embeddings move through each layer, the model learns:
Relationships
Context
Tone
Intent
Structure
Each layer refines its understanding. Lower layers focus on simple patterns; higher layers handle more complex meaning.
A simple analogy would be - reading a sentence multiple times. Each pass gives you deeper insight.
Step 5: Predict the next token
Once the model has processed your prompt through all layers, it must generate a response. It does so one token at a time.
How it chooses the next token
The model calculates probabilities for every possible next token.
For example, after: “Artificial intelligence is a branch of…”
The model may think:
“computer” → 0.45
“science” → 0.15
“AI” → 0.03
others → lower probabilities
It picks the most suitable option. Each new token is then fed back into the model to predict the next one. This repeats until the answer is complete.
Step 6: Output the final response
Once enough tokens are generated, the model stops and presents the full answer to you. From your perspective, it looks seamless. Behind the scenes, thousands to millions of calculations have happened in milliseconds.
Putting it all together - The full flow
You type a message.
The text is split into tokens.
Tokens are converted into numerical meanings (embeddings).
Those embeddings pass through multiple transformer layers.
The system predicts one token at a time.
The loop continues until the response is complete.
You get a clear, natural-language answer.
How ChatGPT learns (LLM training process explained)
LLMs learn in several stages, each improving how the model understands language and produces useful answers. Together, these stages move the model from “predicting text” to “responding helpfully in real-world situations.”
1. Pre-training
This is the foundation. The model is trained on massive amounts of publicly available text to learn patterns in language, such as how sentences flow, how questions are asked, and how ideas connect.
It doesn’t learn facts in a database sense; it learns patterns that help it predict text.
What’s important to understand:
It learns language, not truth
It picks up reasoning styles from examples
It builds a probability map of words and phrases
2. SFT (Supervised Fine-Tuning)
Human experts then provide example questions and high-quality answers. The model studies these pairs to learn how to respond in a clearer, more helpful tone.
This is where the model first learns to behave more like a chatbot.
This improves:
Clarity of answers
Structure and formatting
Ability to follow instructions
3. RLHF (Reinforcement Learning from Human Feedback)
Here, humans rank multiple AI-generated answers. The model learns which responses are safer, more accurate, and more aligned with human expectations. This process greatly improves the usefulness and reduces harmful outputs.
Think of this as:
Teaching the model what “good” looks like
Filtering out low-quality or risky responses
Aligning outputs with human preferences and intent
4. RAG (Retrieval-Augmented Generation)
In this optional step, the model retrieves information from external sources, like documents or live web search, before generating a response. It keeps answers fresh, factual, and grounded.
Why this matters:
Answers can include up-to-date information
Content can be brand or document-specific
Reduces “hallucination” risk
We at Buried have discussed training data and RAG in our video embedded in the article GEO vs SEO. While we suggest you watch the entire video to understand the relevant concept of GEO, you can also skip to 3:51 minutes for our Founder Will’s expert insight on training data.
LLM reasoning explained
At a basic level, LLMs don’t “think” like humans; they simulate reasoning by following patterns they have seen during training.
When you ask a question, the model:
Breaks down the prompt into tokens (words or parts of words)
Identifies patterns similar to past examples
Builds a response step-by-step using probabilities
This is why answers can feel logical, even though the model is fundamentally predicting text.
Chain of Thought (CoT) reasoning
Chain of Thought (CoT) reasoning is a technique where the model generates intermediate steps before arriving at a final answer.
Instead of jumping straight to the output, it works through the problem in stages - similar to how a human might solve something step-by-step.
Why CoT is crucial:
It improves performance on complex tasks
Makes answers more structured and logical
Helps with maths, analysis, and multi-step reasoning
A simple real-world example:
A user asks: “Should I increase my pricing next quarter?”
Instead of jumping to a yes/no answer, the model may internally break it down like this:
Look at factors that influence pricing (costs, demand, competitors)
Consider common business strategies for price changes
Evaluate possible outcomes (higher margins vs customer drop-off)
Then provide a balanced recommendation
Final output to the user: a clear, reasoned answer that considers multiple factors, not just a guess.
This step-by-step reasoning is one of the key reasons modern LLMs feel far more useful and “intelligent” in real business scenarios.
Why ChatGPT is sometimes wrong (ChatGPT limitations)
ChatGPT is powerful, but it’s not a source of truth. Its answers are highly based on probabilities, not verified facts. That creates a few important limitations everybody should understand.
1. Probabilities ≠ facts
ChatGPT doesn’t “know” things. It predicts what sounds right based on patterns in data.
That means:
It can generate convincing but incorrect answers
It doesn’t verify information like a search engine or database
It prioritises fluency over factual accuracy
This is a core limitation of all LLMs. They are designed to generate language, not confirm truth.
We have a detailed guide on why AI search is probabilistic to delve into this topic.
2. Hallucinations
Sometimes, ChatGPT creates information that looks real but isn’t. This is called a hallucination.
These errors can include:
Made-up statistics
Fake references or sources
Incorrect facts presented confidently
How common is this?
Studies show hallucination rates can range from ~28% to over 40% in some tasks
In more complex or open-ended scenarios, error rates can exceed 33%
Across benchmarks, top models still show 10-20% hallucination rates depending on the task
Even the most advanced models today are not hallucination-free.
3. Confidence illusion (and outdated information)
One of the biggest risks is not just being wrong; it’s being confidently wrong.
ChatGPT often presents answers:
In a clear, authoritative tone
Without showing uncertainty
Even when the information may be outdated or incomplete
This happens because the model is optimised to give an answer, not to say “I don’t know.”
Users need to know this because :
They may trust incorrect answers
Outdated information can affect decisions
A brand may be misrepresented in AI-generated responses
How is ChatGPT randomness handled?
ChatGPT doesn’t always give the exact same answer, and that’s by design. Its responses include a level of controlled randomness, which helps it sound natural, creative, and less robotic. At the core of this is something called temperature.
The concept of temperature
Temperature controls how “random” or “creative” the model’s responses are when choosing the next word.
Low temperature (e.g. 0-0.3): More predictable, focused, and consistent answers.
Medium temperature (e.g. 0.4–0.7): Balanced, accurate but still natural and varied.
High temperature (e.g. 0.8–1+): More creative, diverse, and sometimes less reliable.
What’s actually happening: At each step, ChatGPT assigns probabilities to possible next words. Temperature adjusts how strongly it sticks to the highest-probability option vs exploring alternatives.
A simple way to think about it is ->
Low temperature → “Play it safe”
High temperature → “Take more risks”
How does ChatGPT's memory work?
ChatGPT doesn’t “remember” information the way humans do. Instead, it works with a context window, a temporary workspace that stores the conversation so far.
Every time you send a message, your entire dialogue is fed back into the model. ChatGPT then analyses this context to decide what is relevant, what to reference, and how to produce its next response.
This means memory is not long-term. Once information falls outside the context window, the model cannot access it.
It is similar to a whiteboard: useful for real-time collaboration, but wiped clean once space runs out.
Is your data safe with ChatGPT?
Short answer: generally yes, but with important caveats.
When you use ChatGPT:
Your prompts are processed to generate a response
They may be stored temporarily to improve systems and safety
In some cases, they can be reviewed by humans (for quality and safety checks)
However, most platforms now give options to limit or disable data usage for training, especially in business or enterprise plans.
Key risks to understand
Sensitive data exposure: If you input confidential business, financial, or personal data, there is always some risk.
Not a private database: ChatGPT is not designed to securely store or manage sensitive records.
Shared context limitations: It doesn’t “remember” your data permanently across all chats (unless specific memory features are enabled).
Best practice for businesses
Avoid sharing confidential or regulated data
Use enterprise-grade tools with stronger privacy controls
Treat ChatGPT like a smart assistant, not a secure vault
Training vs reasoning vs retrieval
Most people mix these up, but this is exactly how ChatGPT works under the hood. Understanding this makes everything above much clearer.
The simple breakdown
Capability | What it means |
Training | Learned patterns from large datasets |
Reasoning | Pattern-based logic to process your prompt |
Retrieval | Fetching fresh or external information |
1. Training = What the model already knows
This happens before you ever use ChatGPT.
The model learns from large amounts of text
It picks up language patterns, structure, and common knowledge
It does not store facts like a database
Think of this as the model’s foundation.
2. Reasoning = How it thinks through your question
When you ask something, the model:
Interprets your prompt
Applies learned patterns
Builds a logical response step-by-step
This is where things like Chain of Thought reasoning come in.
3. Retrieval = How it gets fresh or specific information
In some cases, ChatGPT can pull in external data:
Documents
Knowledge bases
Live or recent information (depending on setup)
This helps improve accuracy and freshness.
Why this matters (especially for SEO & GEO)
If your brand isn’t:
Part of the training data signals
Structured for reasoning clarity
Available for retrieval systems
…it’s far less likely to appear in AI-generated answers.
Which is why at Buried, our SEO and GEO experts work with your brand to create tailored organic search strategies, ensuring your website data and content are structured the right way for LLMs to understand and retrieve.
How ChatGPT and LLMs differ from traditional search engines
ChatGPT is a generative model, while Google is a retrieval engine.
Both systems answer queries, but they operate on completely different mechanisms. LLMs generate responses based on training data and, when enabled, live web searches. Traditional search engines retrieve results by crawling, indexing, and ranking pages according to hundreds of algorithmic signals.
The comparison table below breaks down these differences across four essential layers: keyword behaviour, data sources, how each system processes a query, and how organic search optimisation influences visibility.

LLMs answer questions using what they’ve learned and sometimes live web results. Google works by indexing websites and ranking them, deciding which pages to show based on technical setup, content relevance, and authority.
LLMs can generate direct answers from what they’ve learned, sometimes without citations, or - when connected to live search - by fanning out queries and referencing high-authority sources. Google, however, doesn’t generate answers at all; it only retrieves and ranks pages from its indexed websites.
Understanding this distinction is crucial for modern SEO and GEO strategies. As AI-search evolves, brands must optimise not only for Google’s algorithm, but also for how LLMs interpret, retrieve, and cite information.
*Query fan-out is when an AI sends your question to multiple web sources simultaneously to gather fresh information before generating an answer.
ChatGPT (& how it works) FAQs
Is ChatGPT biased?
Yes, it can be biased. It learns from human-created data, which may include biases. Training and feedback reduce this, but bias can still appear in subtle ways depending on the topic and prompt.
What are ChatGPT prompts?
Prompts are the inputs you give ChatGPT, such as questions, instructions, or context. The quality of your prompt directly affects the output, making clear and specific prompts key to better results.
Does ChatGPT store conversations?
ChatGPT may store conversations temporarily for system improvement and safety. Some versions include memory features, but users can usually manage, review, or delete stored data depending on settings and plan.
Where does ChatGPT get its information from?
ChatGPT learns from a mix of publicly available text, licensed data, and human-created examples during training. It does not access a live database unless retrieval tools or integrations are used.
How does ChatGPT decide what to say next?
It calculates probabilities for possible next words based on training patterns and context. Then it selects the most likely option and builds the response step-by-step, creating natural and coherent answers.
How to gain brand visibility in ChatGPT
If ChatGPT is where decisions are being shaped, your brand needs to show up in the answers - simple as that!
To appear in ChatGPT responses, your brand needs to align with how LLMs work:
Be consistently mentioned across trusted, relevant sources.
Create content that clearly explains what you do, who you help, and why you’re different.
Structure content so it’s easy to access, reference, and pull into AI-generated answers.
This is the shift from SEO to GEO (Generative Engine Optimisation), and most businesses are still behind. At Buried, we help brands become visible inside AI systems like ChatGPT, not just on Google.
We combine SEO and GEO strategies to ensure your brand:
Gets recognised by LLMs
Appears in high-intent prompts
Converts AI visibility into real business growth
Want your brand to show up in ChatGPT? Get in touch with Buried for a tailored SGEO audit.

