← All articles

How Large Language Models Work, Under the Hood (No Math Required)

6 July 2026 · 5 min read

LLMAI Basics

A large language model (LLM) does one thing: it predicts the next word. ChatGPT, Claude, and Gemini are all this one trick, repeated very fast. Everything impressive they do for your business, drafting emails, answering customers, summarising documents, comes out of it.

The one trick

During training, the model reads trillions of words and tunes billions of internal numbers until it gets good at guessing what comes next. The architecture behind this, called the transformer, came from a 2017 research paper and is still what runs every major AI model today [1]. Its key ability is deciding which earlier words matter for the prediction, so "it" in a sentence points to the right thing.

Diagram: given the text "The clinic opens at", a large language model ranks likely next words such as 9am at 78 percent

When you chat with one of these models, the trick simply runs in a loop. The model predicts one word, adds it to the text, and predicts the next, dozens of times a second, until the reply is finished. There is no database of facts inside, and no rulebook. Just patterns, compressed from staggering amounts of text, unspooling one word at a time.

Where the helpfulness comes from

A freshly trained model is just an autocomplete engine. It becomes an assistant through a second stage of training, where it practises on examples of good question-and-answer behaviour and gets feedback on which replies people prefer. That polish is why ChatGPT answers your question instead of continuing it like a sentence, and why different AI products feel different even when the underlying trick is identical. It is also worth knowing that the polish shapes tone, not truthfulness. A politely worded wrong answer is still wrong, which brings us to prices.

Why it writes great emails and invents your prices

The model produces the most plausible continuation, and plausible is close to correct for things it has seen millions of times, like polite emails. Ask it your consultation fee and the most plausible answer is a realistic-sounding number it made up, because your price list was never in its training data. That gap is why we connect chatbots to your actual documents using RAG before letting them near customers.

Researchers are starting to see inside the box, too. In 2024, Anthropic mapped millions of human-recognisable concepts inside a production model, the first detailed look at what these systems represent internally [2].

The model's short-term memory

One more concept explains a lot of everyday AI behaviour: the context window. Every time the model replies, it rereads the whole conversation so far, plus anything you pasted into it. That window is its entire working memory. Paste your price list into the chat and it will quote your prices flawlessly, because the facts are sitting right in front of it.

This is exactly the loophole RAG exploits. Instead of a human pasting the right document into every conversation, the system finds the relevant passages automatically and slips them into the window before the model answers. Nothing about the model changed. It is still predicting the next word, just with your facts on the desk instead of a blank one. The window also explains why very long chats drift: once the conversation outgrows the window, the earliest instructions fall off the desk.

Using LLMs safely at work

Three habits cover most of the risk. First, treat anything you type into a consumer AI tool as leaving the building, so customer details and confidential numbers stay out unless you are on a business plan whose data terms you have actually read. Second, keep a human eye on anything the model wrote before it reaches a customer, a bank, or a regulator, because fluent and correct are different qualities. Third, for anything customer-facing that must be right every time, ground the model in your own documents rather than trusting its memory.

It is worth writing these down as a one-page policy, mostly because your team is already using these tools whether or not anyone announced it. A short list of what may and may not be pasted into a chatbot prevents the one bad afternoon that turns an enthusiastic employee into a data leak.

Does the model choice matter?

Less than the headlines suggest, for most business uses. New models arrive every few months, each briefly crowned the smartest, and owners ask us whether everything needs rebuilding. It almost never does. For answering customer questions from your documents, several current models are more than good enough, and the system around the model matters far more: whether the right documents are wired in, whether the bot declines gracefully when it does not know, whether anyone reviews its conversations.

Our advice is to pick a capable mainstream model, spend the energy on the plumbing, and treat model upgrades like phone upgrades. When a meaningfully better one appears, swapping it into a well-built system is a small job, precisely because the value was never in the model alone.

What this means for your business

Use LLMs raw for drafting and summarising. For anything involving your facts, prices, or bookings, the model needs your data wired in. That plumbing is the actual work, and it is what we build.

Sources

  1. Vaswani et al. (2017). Attention Is All You Need. arXiv:1706.03762
  2. Anthropic (2024). Mapping the Mind of a Large Language Model. anthropic.com

FAQ

Is ChatGPT actually thinking?

It predicts the next word using patterns learned from enormous amounts of text, and behaviour that looks like reasoning emerges from that. For your business the practical answer matters more: it is brilliant with language patterns and unreliable with your specific facts unless you connect it to them.

Why do LLMs make things up?

Because they produce the most plausible continuation, and plausible is close to true only when the model has seen the facts. It has never seen your price list. Grounding the model in your documents with RAG is the standard fix.

Do I need to train my own LLM?

No, and almost nobody should. Training a model costs millions. The practical path is using an existing model and connecting it to your business data, which is a project measured in thousands of ringgit, not millions.

Stay Ahead of the AI Curve

Weekly insights on AI trends, automation tips, and real-world case studies.