Back to Interview PrepGet interview ready with AILearn each topic the way interviewers ask it, then answer like you would in the interview.
Course progress0/8 chapters · 0%

Season 1 · Inside the Mind of AI · Chapter 2 of 8

~10 min

Does ChatGPT Know or Does It Guess?

Where does ChatGPT actually get its answers from - does it search live, does it "know" things, or is it just guessing? And how is that fundamentally different from Google Search?

Google Search vs ChatGPT: Two Different Jobs

People are increasingly reaching for ChatGPT instead of Google, mostly because it hands back a direct answer instead of a page of links to click through - no more juggling ten open tabs (RIP, classic Stack Overflow browsing sessions).

But there is a real difference in what is happening underneath. You can ask ChatGPT almost anything, and if the answer genuinely exists in what it learned, it will give you something close to correct. If the answer does not exist at all, it may still confidently simulate one anyway - with no way for you to tell the difference from the response alone. Google, by contrast, is fundamentally a filter over real documents that already exist somewhere.

How Google Search Actually Works

Google takes your query, searches its index, ranks the most relevant documents, and returns them. An index is nothing mysterious - think of it as a book's table of contents: instead of reading every page to find something, you jump straight to the reference.

Google keeps that index fresh using crawlers (also called spiders) that continuously scan the web and feed new or updated pages back in - which is how something posted a minute ago can already show up in results. Not every page gets to rank well, though: crawlers weigh things like domain authority, page speed, keyword relevance, average time spent on a page, backlinks from other sites, meta tags, publish date, and general SEO health. Google's exact ranking algorithm is not open source, so what we have are industry best practices, not a published formula.

None of this guarantees truth. Rankings can be imperfect, outdated, or put an irrelevant result above a better one four spots down. The upside: you can always see which website an answer came from, and decide for yourself whether to trust that source.

Retrieval vs Generation

ChatGPT works completely differently. It does not retrieve a stored answer - it generates one, built from patterns it learned during training, similar to how you might answer "why did Katappa kill Bahubali?" from memory of watching the movie: you would give your own retelling, not a word-for-word transcript. That is the core distinction: Google retrieves, ChatGPT generates.

One practical consequence: Google can honestly say "I don't have this," because it is just searching an index. A raw language model is far less likely to say that - it is built to produce a plausible-sounding answer whether or not one truly exists, and by default you get no source to check.

Google Search - Retrieval

Your query
Searches the index
Ranks matching pages
Returns a list of sources

ChatGPT - Generation

Your prompt
Matches learned patterns
Predicts the most likely words
Generates one written answer

Google points you to a source. ChatGPT writes you an answer - with no source unless you ask for one.

How LLMs Actually Generate Words

LLMs work by predicting and generating, one likely word at a time. Give it "The sun rises in..." and it predicts "the east" because that pattern showed up constantly in training. Give it "Roses are ___" and "red" or "beautiful" surface as high-probability completions.

It is autocomplete, just a dramatically smarter version - the model is constantly estimating which next word is statistically most likely to fit, based on everything (languages, grammar, reasoning patterns, stories, and associations between places, events, and ideas) it absorbed during training.

What Knowledge Does an LLM Actually Contain?

An LLM is a neural network holding an enormous collection of numbers called parameters (or weights), shaped by scraping and reading vast amounts of internet text. Those weights encode patterns, not stored facts in the way a database stores rows - ask about "rose" and words like "beautiful," "red," or "fragrant" surface because of learned probability, not lookup.

That training is not a daily or even weekly event - it is expensive enough that every model ships with a fixed knowledge cutoff date, documented by whoever built it. That naturally raises a question worth sitting with: if training stopped on a fixed date, how does a model seem to know about recent events at all? (Short answer: context and tools, not raw memory - something worth exploring in more depth later.)

Base Model vs Instruction-Tuned Assistant

A base model is the raw, unfiltered core of an LLM: it has read a massive amount of text and its only actual job is to guess the next token. Think of it as an extremely advanced autocomplete engine - not yet shaped into a helpful, safe chat assistant.

What you actually use - ChatGPT, Claude, Gemini, Grok - is a base model with several layers built on top: tool access, human feedback (RLHF), security and auth, web search, guardrails, content filters, system instructions, and conversation management. Companies rarely expose the raw base model directly, precisely because it has no built-in filters and will attempt to answer anything. A simple way to hold the idea: the base model is the engine, and the assistant you chat with is the whole car built around it.

Every major lab ships its own base models under different names: OpenAI (GPT-5, GPT-4o, o1, o3), Anthropic (Claude 4, Claude Sonnet 4.6, Opus), Google (Gemini 3, Gemini 2.5 Pro, and the open-weight Gemma 3), Meta (Llama 4, Llama 3.1, open-weight), DeepSeek (DeepSeek-R1, DeepSeek-V4, open-weight), xAI (Grok 3, Grok 4.3), Alibaba (Qwen 3.5, Qwen 3), and Amazon (the Nova family).

AI Assistant (ChatGPT, Claude, Gemini, Grok...)
Tool access, web search & code execution
Human feedback (RLHF) & guardrails
Security, auth & content filters
System instructions & conversation management

Base Model

Only job: predict the next word

The engine is the base model. Everything layered on top is what turns it into the car you actually drive.

Training vs Inference

Training is the school phase - the model studies an enormous amount of data to learn rules and patterns, and it is slow and expensive. Inference is the working phase - using everything it already learned to answer a real prompt, right now. Every time you send a message to an LLM, you are triggering inference, not training.

Training

The school phase - studying huge amounts of data to learn patterns

Inference

The working phase - using what it learned to answer you, right now

Why Models Sound So Confident: Hallucination

Fake fluency is not the same thing as truthfulness. An LLM can state something confidently and still be completely wrong - that gap is called hallucination: the model presenting made-up information as a hard fact. It is not lying on purpose; it is guessing the next plausible word, and that guess can come out sounding extremely sure of itself even when it is wrong.

Hallucination tends to show up because of insufficient knowledge, ambiguous phrasing, data that simply is not new enough, false assumptions baked into the prompt, unreliable patterns in training, or the model simply being optimized to always produce an answer rather than admit uncertainty - which is how you get confidently wrong answers instead of a shrug.

This is also why base models are noticeably worse at things like precise math than an instruction-tuned assistant built on top of them - and why it genuinely matters that an assistant is sometimes willing to say "I don't have reliable information about this" instead of inventing something plausible-sounding.

“Yes, that’s absolutely correct - here are the exact details...”

Confidence (tone)high
Actual correctness unknown

A confident tone is not proof. Hallucination is a made-up answer delivered with the same certainty as a correct one.

Confidence Isn't Proof

Humans often treat a confident tone as evidence on its own - if someone states something firmly enough, we tend to assume they must be right. LLMs can fall into the same trap with themselves: if the model feels very sure about an answer, it can treat that internal certainty as if it were proof, even though certainty and correctness are two completely different things.

You can push back on this directly: ask for a source, ask it to only answer if it is actually confident, or explicitly ask what it is uncertain about. None of that guarantees a correct answer, but it does surface overconfidence. Grounding the model with real, current information - like allowing it to search the web - gives it external evidence to check itself against, instead of relying purely on its own internal confidence.

Tools: Giving the Model Superpowers

On its own, a language model cannot see your files, your calendar, your email, your location, or your database - it only has whatever was in its training data and whatever you type into the prompt. Tools close that gap: calling an API, running code, checking the weather, querying a database, reading internal documents, and more.

Combine web search with an LLM and you get something meaningfully more useful: retrieval supplies real, current, external evidence, and generation turns that evidence into a clear, natural-language answer. That combination has a name - RAG, Retrieval-Augmented Generation - and it is one of the most practically important patterns in real-world AI applications.

Tool call

web search, API, database

Retrieval

real, current, external evidence

Generation

LLM turns evidence into an answer

RAG (Retrieval-Augmented Generation) - real evidence in, a grounded answer out, instead of a guess from memory alone.

Does the Model Know Itself?

An LLM can usually tell you things like how many parameters it has, its knowledge cutoff date, who built it, and where it is deployed - that is documented, factual information it was trained to be able to state. That is not the same as full self-awareness, though.

Whatever an LLM tells you ultimately comes from one of four sources: its training data (what it learned before the cutoff), the context of the current conversation, its system prompt (instructions about how it should behave), or the tools it has been given access to. Those four sources are exactly what separate a bare base model from a genuinely useful, instruction-tuned assistant.

Answer every question below to mark this chapter as complete.

Quiz Yourself

Score: 0/4

1. What is the core difference between how Google Search and ChatGPT produce an answer?

2. What is a "base model"?

3. What does "hallucination" mean in the context of an LLM?

4. What does RAG (Retrieval-Augmented Generation) combine?

You're viewing a free lesson. Sign up free to track your progress and unlock the full course.Sign up freeSign in