In the previous article, we looked at generative AI and how modern systems can create text, images, code, audio, video and other content.
Now we can focus on one of the technologies behind many of the AI tools people use every day:
Large Language Models.
You will often see these referred to simply as:
LLMs.
Large language models are the technology behind many conversational AI systems, writing assistants, coding tools, document-analysis systems and AI copilots.
They are also one of the most misunderstood areas of modern AI.
People often assume that an LLM is:
- a giant database;
- a search engine;
- a digital person;
- an all-knowing expert; or
- a system that simply stores every sentence it has ever seen.
None of those descriptions is quite right.
So let us build a practical beginner-friendly understanding of what an LLM actually is.
What is a large language model?
A large language model is an artificial intelligence model trained to work with language and related information.
It learns complex patterns from large amounts of training data and uses those patterns to generate or interpret language.
An LLM can perform tasks such as:
- answering questions;
- writing text;
- summarising documents;
- translating languages;
- extracting information;
- classifying text;
- generating software code;
- explaining concepts;
- rewriting content; and
- supporting conversations.
A useful beginner definition is:
An LLM is a model trained to recognise and generate patterns in language.
Why is it called a “large” language model?
The word large generally refers to the scale involved.
This can include:
- the number of parameters in the model;
- the amount of data used during training;
- the amount of computing power required; and
- the complexity of the relationships the model can represent.
Modern models can contain very large numbers of internal parameters.
You can think of these parameters as mathematical values that are adjusted during training and influence how the model responds to new input.
The important point is not the exact number.
The important point is that scale allows modern models to learn very complex patterns across language and other supported data types.
How does an LLM learn?
The general training concept is similar to what we covered earlier in this learning path.
At a very simplified level:
TRAINING DATA → TRAINING PROCESS → MODEL PARAMETERS → TRAINED LLM
During training, the model is exposed to large amounts of text and other data.
It learns statistical relationships between pieces of information.
Those relationships are represented inside the model through its parameters.
Once the model has been trained, it can use those learned patterns to process new inputs.
LLMs work with tokens
One of the most important concepts in understanding language models is the token.
An LLM does not necessarily process text one complete word at a time.
Instead, text is broken into smaller units called tokens.
A token might represent:
- a whole word;
- part of a word;
- punctuation;
- a number;
- a symbol; or
- another text fragment.
For example, a sentence such as:
“Artificial intelligence is changing business.”
is converted into a sequence of tokens before being processed by the model.
The exact tokenisation depends on the model.
Why do tokens matter?
Tokens matter because they influence several practical things:
- how much information a model can process at once;
- how usage may be measured in API systems;
- how long prompts and responses can be; and
- how context limits work.
You do not need to manually count tokens for normal everyday use, but understanding the concept becomes increasingly useful when building AI applications.
How does an LLM generate text?
At a simplified level, a language model predicts what token is likely to come next based on the context available to it.
Imagine the sentence:
“The sun rises in the…”
A language model evaluates the context and calculates probabilities for possible next tokens.
A likely continuation might be:
east
The model then uses the growing sequence as context for predicting what should come next.
This process continues repeatedly.
We can represent the idea as:
INPUT → PREDICT NEXT TOKEN → ADD TOKEN → PREDICT NEXT TOKEN → REPEAT
This sounds simple.
But the internal relationships learned by modern language models are extraordinarily complex.
That complexity allows a model to generate:
- long explanations;
- structured documents;
- code;
- creative writing;
- analysis;
- summaries; and
- interactive conversations.
Does an LLM understand language?
This is a more difficult question than it first appears.
Large language models can perform tasks that look remarkably similar to understanding.
They can:
- follow instructions;
- summarise complex ideas;
- compare arguments;
- analyse documents;
- solve certain problems;
- adapt explanations to different audiences; and
- maintain context across a conversation.
However, the internal process is different from human cognition.
It is therefore safer to focus on:
What can the model reliably do?
rather than assuming it experiences understanding in the same way a person does.
What is context?
When you interact with an LLM, the model works with information made available to it as context.
That context can include:
- your current prompt;
- previous messages in the conversation;
- system instructions;
- uploaded documents;
- retrieved information;
- tool outputs; and
- other application-provided information.
The model uses this context when generating its response.
This is one reason why providing good context can improve AI output dramatically.
What is a context window?
Every language model has limits on how much information it can process within a particular interaction.
This capacity is commonly referred to as the context window.
You can think of it as the model’s working space for the current task.
Information inside that usable context can influence the model’s output.
Information outside the available context may not be accessible unless the application retrieves or reintroduces it.
A simple context window analogy
Imagine sitting at a desk.
You have:
- a report;
- a set of instructions;
- meeting notes;
- a spreadsheet; and
- a customer email.
You can work with whatever is currently available on the desk.
If someone removes the report and does not tell you what it contained, you can no longer use that information directly.
An LLM’s context window is not exactly the same, but this is a useful mental model.
Why context windows matter in real applications
Imagine a company has 20,000 internal documents.
You normally would not want to send every document to the model every time an employee asks a question.
Instead, a system can:
- receive the employee’s question;
- search the relevant approved documents;
- retrieve the most useful information;
- provide that information to the LLM; and
- ask the model to answer based on the retrieved context.
This is one of the basic ideas behind retrieval-based AI systems.
What is retrieval-augmented generation?
You may encounter the abbreviation RAG.
RAG stands for Retrieval-Augmented Generation.
The basic idea is:
QUESTION → RETRIEVE RELEVANT INFORMATION → GIVE IT TO THE MODEL → GENERATE ANSWER
Instead of relying only on the model’s trained capabilities, the system supplies relevant information at the time the question is asked.
For example, a company could build an internal assistant that searches:
- policies;
- procedures;
- technical documentation;
- product manuals;
- knowledge-base articles; and
- other authorised internal content.
The LLM then uses the retrieved content as context when answering.
RAG vs training the model
This distinction is important.
If your company wants an AI assistant to answer questions from internal policies, you do not necessarily need to retrain a foundation model on every company document.
A retrieval system can find the relevant information at runtime and supply it as context.
This offers practical advantages such as:
- using more current information;
- updating documents without retraining the entire model;
- restricting access according to permissions; and
- providing traceable source material.
What is fine-tuning?
Fine-tuning is different from retrieval.
Fine-tuning generally means further training or adapting an existing model using additional examples so that it behaves better for a particular task, style or domain.
A simplified comparison is:
| Approach | Main purpose |
|---|---|
| Prompting | Tell the model what you want now |
| Retrieval / RAG | Give the model relevant external information now |
| Fine-tuning | Adapt model behaviour through additional training examples |
These approaches can also be combined.
Is an LLM a search engine?
No.
A search engine primarily retrieves information from indexed sources.
A language model primarily generates responses using its trained parameters and available context.
Modern AI applications can combine both.
For example:
SEARCH → SOURCES → LLM → SYNTHESISED ANSWER
This can be powerful because the search system provides current information while the language model helps interpret and explain it.
Is an LLM a database?
No.
A database stores structured information that can be retrieved predictably.
If a database says:
Customer balance = R12,450
an application can retrieve that exact value.
An LLM works differently.
It generates output based on learned patterns and context.
If exact authoritative information matters, the application should generally retrieve that information from an appropriate system rather than ask the model to invent or remember it.
A practical example: customer support
Imagine a customer asks:
“Why was I charged an additional R250 this month?”
You do not want an LLM guessing the reason.
A better system might:
- authenticate the customer;
- retrieve their approved account information;
- retrieve the relevant billing policy;
- provide that information to the LLM;
- generate a clear explanation; and
- present or send the response according to business rules.
The model handles language.
The billing system provides the facts.
This separation is extremely important.
Why do LLMs hallucinate?
Large language models can generate incorrect information that sounds convincing.
This is commonly called hallucination.
One reason is that the model is fundamentally generating plausible output based on learned patterns and context.
It is not automatically checking every sentence against an authoritative database.
If the model lacks information, it may still produce a plausible continuation.
This can lead to:
- invented statistics;
- fabricated references;
- incorrect dates;
- non-existent products;
- fake quotations;
- incorrect technical details; or
- unsupported conclusions.
Fluency can be misleading
Humans often associate confident, well-written language with expertise.
That creates a particular risk with LLMs.
An answer can be:
- well structured;
- professionally written;
- confident;
- detailed;
and still be wrong.
Remember:
GOOD WRITING ≠ VERIFIED INFORMATION
How can we make LLM answers more reliable?
There is no single technique that guarantees correctness, but reliability can often be improved through several controls.
Provide better context
Give the model the information it needs.
Ground the answer
Supply trusted source material where possible.
Ask for citations
When the application supports reliable source attribution, require claims to point back to evidence.
Use structured outputs
Ask the model to return information in a defined structure.
Separate fact from interpretation
Require the model to label:
- verified facts;
- assumptions;
- interpretations;
- recommendations; and
- unknown information.
Use validation
Check important outputs against authoritative systems or deterministic rules.
Keep human review where appropriate
High-impact decisions should receive suitable human oversight.
What is temperature?
You may encounter a setting called temperature when working with language-model APIs or applications.
At a simplified level, temperature is one of the settings that can influence how varied or deterministic generated outputs are.
Lower settings are often associated with more conservative output selection.
Higher settings can allow more variation.
The exact behaviour depends on the model and API.
This does not mean:
Low temperature = always correct.
A model can still confidently generate incorrect information at low variation settings.
LLMs can do more than chat
The conversational interface can make people think an LLM is simply a chatbot.
But language models can be components inside many different applications.
They can help:
- classify support tickets;
- extract fields from documents;
- analyse contracts;
- generate code;
- summarise security findings;
- create personalised content;
- translate information;
- analyse sentiment;
- generate structured data; and
- coordinate AI-agent workflows.
LLMs and software tools
Modern AI systems can allow a model to use approved tools.
For example, an LLM might be able to request:
- a database lookup;
- a web search;
- a calculation;
- an API request;
- a calendar action;
- a file search; or
- another software function.
This significantly expands what an AI application can do.
The model does not need to contain every piece of information itself.
It can use the correct tool to obtain the information or perform the task.
A practical example: AI research assistant
Imagine you want to research a company.
A weak system might simply ask the LLM:
“Tell me everything about Company X.”
A stronger system might:
- identify the required research questions;
- search approved public sources;
- retrieve financial reports;
- extract relevant data;
- pass the evidence to the LLM;
- ask the model to analyse the information;
- separate facts from interpretation; and
- produce a report with citations.
Notice again:
The LLM is part of the system, not the entire system.
A practical example: internal knowledge assistant
Imagine an employee asks:
“What is our process for approving a new supplier?”
An enterprise AI assistant could:
- identify the employee;
- check permissions;
- search approved policies and procedures;
- retrieve the relevant sections;
- provide those sections to the LLM;
- generate a plain-language explanation; and
- include links to the source documents.
This is much safer than expecting the model to guess the company’s process from general knowledge.
What is an embedding?
Another term you may encounter when learning about LLM applications is embedding.
An embedding is a numerical representation of information that can help software compare meaning or similarity.
For example, the phrases:
“reset my password”
and:
“I cannot log in because I forgot my credentials”
use different words but have related meaning.
Embedding-based systems can help identify that semantic similarity.
This is useful for tasks such as:
- semantic search;
- document retrieval;
- recommendation systems;
- similarity matching; and
- RAG applications.
What is a vector database?
You may also hear about vector databases.
These are systems designed to store and search numerical vector representations such as embeddings efficiently.
A simplified RAG architecture might look like:
DOCUMENTS → EMBEDDINGS → VECTOR STORE
Then when a user asks a question:
QUESTION → SEARCH SIMILAR CONTENT → RETRIEVE DOCUMENT CHUNKS → LLM → ANSWER
You do not need to understand the underlying mathematics yet.
For now, remember:
Embeddings help systems find information based on meaning, not only exact keywords.
Can an LLM remember me?
This depends on the application.
The underlying model and the product built around it are not necessarily the same thing.
An application can implement memory features by storing information externally and making it available in future interactions.
For example:
USER MEMORY DATABASE → RETRIEVE RELEVANT MEMORY → ADD TO CONTEXT → LLM RESPONSE
The important lesson is:
Application memory and model context are separate concepts.
Open models vs closed models
You may encounter different ways AI models are distributed.
Some models are provided primarily through hosted commercial services.
Others make model weights available under particular licences so organisations can run them on their own infrastructure.
The correct choice depends on factors such as:
- cost;
- performance;
- privacy;
- security;
- hardware requirements;
- licensing;
- support;
- integration requirements; and
- operational capability.
Why organisations sometimes run models locally
Some organisations explore running models on their own infrastructure for reasons such as:
- data control;
- privacy;
- network isolation;
- customisation;
- cost predictability; or
- specialised use cases.
However, running AI models locally also creates responsibilities.
The organisation may need to manage:
- hardware;
- updates;
- security;
- model lifecycle;
- monitoring;
- performance; and
- technical support.
What makes one LLM better than another?
There is no single answer.
Models can differ across:
- reasoning capability;
- coding capability;
- language support;
- speed;
- cost;
- context capacity;
- multimodal capability;
- tool use;
- accuracy on particular tasks; and
- safety behaviour.
The “best” model therefore depends on the job.
A smaller, faster model may be ideal for classifying thousands of support requests.
A more capable reasoning model may be better for a complex analysis performed only occasionally.
This introduces another important design principle:
Use the right model for the task, not necessarily the biggest model available.
LLMs are probabilistic systems
Traditional software often behaves deterministically.
If:
2 + 2 = 4
you expect the same answer every time.
Generative models can behave differently.
Several plausible responses may exist.
This has important implications for business use.
If the workflow requires exactly the same result every time, deterministic software may need to handle important parts of the process.
For example:
LLM: Extract the invoice number.
Software validation: Confirm it matches the required invoice format.
Database: Retrieve the authoritative invoice record.
LLM: Explain the result to the customer.
Each component is doing the type of work it handles best.
A useful architecture to remember
Many practical AI applications can be understood using this pattern:
USER
↓
APPLICATION
↓
CONTEXT + INSTRUCTIONS
↓
LLM
↓
TOOLS + DATA
↓
VALIDATION
↓
OUTPUT / ACTION
The model is extremely important.
But reliable AI applications require good architecture around the model as well.
Frequently asked questions
What does LLM stand for?
LLM stands for Large Language Model.
Is ChatGPT an LLM?
ChatGPT is an AI application that uses language and other AI models. The application includes more than just the underlying model, such as interfaces, tools, system instructions and other product capabilities.
Is an LLM a database?
No. A database stores and retrieves defined information. An LLM generates output using learned patterns and available context.
Is an LLM a search engine?
No. Search engines primarily retrieve information. LLMs generate language. Modern AI applications can combine search and language models.
What is a token?
A token is a unit of information used when a language model processes text. It may represent a word, part of a word, punctuation or another text fragment.
What is a context window?
The context window describes how much information a model can work with during a particular interaction or request.
What is RAG?
RAG stands for Retrieval-Augmented Generation. It retrieves relevant information and supplies it to a generative model as context before the model produces an answer.
What is fine-tuning?
Fine-tuning is a method of further adapting an existing model using additional training examples.
Why do LLMs hallucinate?
LLMs generate plausible outputs based on learned patterns and available context. They do not automatically verify every statement against an authoritative source.
Can an LLM access live company information?
Only if the application connects the model to appropriate data sources or tools and provides the required permissions.
Can businesses run LLMs themselves?
Yes, depending on the model licence, hardware, skills and infrastructure. This can provide greater control but also creates operational responsibilities.
Key takeaways
- LLM stands for Large Language Model.
- LLMs learn complex language patterns during training.
- They process text using tokens.
- They generate language by predicting suitable subsequent tokens from context.
- The context window determines how much information is available during an interaction.
- An LLM is not the same as a database or search engine.
- RAG allows applications to retrieve relevant information and give it to the model.
- Fine-tuning adapts model behaviour through additional training.
- Embeddings can help software find information based on semantic similarity.
- LLMs can hallucinate, so fluent output is not automatically reliable.
- The model is only one component of a complete AI application.
Continue the Learn AI journey
We have now moved from the broad concept of artificial intelligence through machine learning and generative AI to the language models powering many modern AI assistants.
The next concept helps us understand an important distinction that appears constantly when working with AI:
the difference between an AI model and the AI application you actually use.
Why is ChatGPT more than a model?
What are foundation models?
Why can two products using similar underlying models behave differently?
That is what we will explore next.
Next: AI Models Explained — Foundation Models, Applications and Why the Difference Matters →