What You’ll Learn
⏱️ 14 min read
What Is an LLM? — Security Guide 2026
Once you understand the LLM architecture, the OWASP AI Security Top 10 and the prompt injection explainer will make significantly more sense. The AI Red Teaming Guide applies this understanding to formal security assessments.
What an LLM Actually Is
A large language model is a statistical prediction engine trained on text — the most important technical concept for any security practitioner to understand before engaging with AI security work in 2026. Given a sequence of words, it predicts the most probable next word — then the next, then the next — to produce a response. That’s it at the core. The “large” part refers to the number of parameters: GPT-4 is estimated at around 1.7 trillion parameters. Each parameter is a number that was adjusted during training to make the model better at predicting text.
What makes this security-relevant is what “predicting text” means in practice — and this is the concept that unlocks every LLM vulnerability class. The model doesn’t have a database of facts. It doesn’t look things up. It produces text that is statistically similar to text it was trained on. When it produces a correct answer, it’s because that pattern appeared reliably in training data. When it produces a confident wrong answer, it’s because the wrong pattern was more statistically likely given the input.
How LLMs Are Trained — and Why Training Matters for Security
Understanding LLM training is essential for understanding data poisoning, backdoor attacks, and why model provenance matters. Training happens in stages, and each stage creates a different security risk profile.
Why LLMs Hallucinate
Hallucination is one of the most security-relevant LLM behaviours and the one that’s most commonly misunderstood. My explanation in security briefings: the model isn’t lying and it isn’t broken. It’s doing exactly what it was designed to do — produce statistically probable text — in a situation where the probable text happens to be wrong.
npm install [hallucinated-package], they install malware. Researchers have documented hundreds of AI-hallucinated package names that were subsequently registered. My rule for any AI-suggested package: search the registry manually before installing.The LLM Attack Surface — What’s Different
Traditional software security focuses on memory, processes, network interfaces, and authentication. LLMs create a fundamentally different attack surface. The inputs are natural language — arbitrary text — and the model’s behaviour is probabilistic, not deterministic. My framework for thinking about what makes LLMs uniquely vulnerable.
1. “All context window content is processed as undifferentiated text”
→ Which OWASP LLM vulnerability does this directly enable?
2. “Training data can contain anything on the web”
→ Which two vulnerability classes does this create?
3. “Model output is probabilistic — same input can give different outputs”
→ How does this complicate security testing?
4. “LLM agents have permissions to take real-world actions”
→ What happens when prompt injection succeeds in an agentic context?
5. “Models can memorise rare or unique strings from training data”
→ What data should never be included in training datasets?
Write one-sentence answers for each. These are the foundational security
concepts behind every LLM vulnerability class.
How to Think About LLM Security
The mental model I use for LLM security assessments: an LLM is a very capable but completely literal employee who follows written instructions, cannot verify who is giving them, and will complete any task they’re given instructions for regardless of consequences. Your security posture needs to account for that.
What Is an LLM — Key Points for Security
LLM Architecture — Foundation for AI Security
With this foundation, every LLM vulnerability class makes architectural sense. The OWASP AI Security Top 10 maps these architectural properties to the ten most critical vulnerability categories. The AI Red Teaming Guide translates them into assessment methodology.
Quick Check
Frequently Asked Questions
What is a large language model in simple terms?
What is the difference between an LLM and traditional software from a security perspective?
Why do LLMs hallucinate?
What is a context window?
OWASP AI Security Top 10 — Complete Guide
What Is Prompt Injection?
Further Reading
- OWASP AI Security Top 10 2026 — Every vulnerability category in the OWASP AI Top 10 maps directly to one of the architectural properties described here. Understanding the architecture makes the OWASP framework significantly more intuitive.
- AI Red Teaming Guide 2026 — How to translate LLM architecture knowledge into a formal security assessment methodology. The red team exercises are designed around the specific architectural vulnerabilities covered here.
- Adversarial Machine Learning 2026 — The deeper dive on how the statistical nature of LLMs and ML models generally creates adversarial input vulnerabilities — and how defenders respond.
- Cloudflare — What Is a Large Language Model — A well-illustrated technical explainer covering transformer architecture, tokenisation, and training in depth — useful companion reading to the security-focused coverage here.

