I type a question, press Enter and watch an answer appear.
We all do this countless times a day without even thinking. And for the most part, people don't care about the 'how', only that it actually works and makes them look smart as quickly as possible. But following my recent rabbit holes into databases and data platforms, I couldn't help but ask myself what happens between those two moments. Cue going down another rabbit hole...because clearly this one is going to be layers upon layers upon layers of depth and branching. And of course, anything I find interesting enough to ramble on about, I will do so here in future blog posts!
So anyway... Is it searching for an answer? Retrieving something it learnt? Composing a response?
There are a few things to untangle. For this piece, I’m focusing on text-generating large language models, or LLMs, rather than everything that falls under “AI”.
First, my words become numbers
The model doesn’t process my sentence as a person would read it. The text is broken into units called tokens, which might represent a word, part of a word or punctuation.
Those tokens are converted into numerical representations the model can work with.
And my question may only be part of the input. The application can also supply instructions, conversation history or relevant documents. Together, these form the context available for generating the response.
The box you type into is only the visible part of what the model receives. Context and memory sit quietly in the background as well.
Then it works with the context
Many modern language models use a transformer architecture. An important mechanism within it is attention, which helps the model weigh relationships between tokens.
Take “bank”. A sentence about a mortgage provides different clues from one about a river. The surrounding context helps shape how the model processes it. Google’s introduction to transformers explains the underlying idea.
During training, the model’s numerical parameters were adjusted to learn patterns from data. Those learnt patterns help it produce language, connect concepts and perform tasks.
It isn’t simply opening a folder containing a ready-made answer to my question.
The answer develops token by token
At a high level, the model calculates probabilities for what token could come next. A selection process chooses one, then generation continues using the expanding sequence.
Repeat that process and we get sentences, explanations or code. Microsoft’s LLM introduction describes this foundation.
“Predicting the next token” initially sounds rather underwhelming. Yet doing it well across varied contexts requires learning far more than spelling and grammar.
The important limitation is that a plausible continuation isn’t necessarily a true one. An answer can sound beautifully composed while containing an invented fact or an unsupported explanation.
And here's where a lot of people fall foul when it comes to AI. Don't get me wrong, AI today is ridiculously good. The fluency it delivers gives you something readable and plausible, but it doesn't immediately give you verification.

Where does searching fit?
An AI application can also connect the model to search, document retrieval, calculators or other tools. The model can request an action, receive its result as additional context and use that information in its response. Anthropic describes this augmented setup here.
So generating an answer from learnt parameters and retrieving current information are different processes, even when they happen inside the same chat window.
That distinction matters when I ask about yesterday’s news or my company’s performance. The system needs an appropriate source of information, permission to access it and a way to use it correctly.
Which brings me back to governance. Apparently, I can’t leave it alone.
What I take from this
Understanding the process makes me more deliberate about what I provide and what I expect back.
I can give useful context, state the task clearly and ask for sources where the answer depends on evidence. I still need to check whether those sources support the conclusion.
What impresses me is how much can emerge from this process. What keeps me cautious is how convincing the output can be when something has gone wrong.
Pressing Enter is easy. Knowing what would make the answer trustworthy deserves more thought.