Chapter 1: Introduction to AI and LLMs
Is this Chapter for You?
One of the core needs for technical professionals is to keep up with emerging technologies that are transforming how we build and deploy software. AI and LLMs represent a fundamental shift in what’s possible with code, but they come with their own concepts, terminology, and best practices – it can be overwhelming to know where to start!
This chapter is designed for technical professionals who want to understand and work with AI and LLMs effectively. It assumes an engineering background and no prior AI experience.
-
Are you a developer, engineer, or technical professional looking to understand how to integrate AI into your applications?
-
Do you want to grasp the core concepts and terminology behind LLMs from OpenAI, Anthropic, Google, DeepSeek, and others to make informed implementation decisions?
-
Do you need to understand both the capabilities and limitations of AI and LLMs to design better technical solutions?
If so, you’ve come to the right place!
How is this Chapter Different?
TL;DR
The primary goal of this chapter is to equip you, a technical professional, with practical AI knowledge to effectively implement and work with AI technologies. Going beyond just using tools like ChatGPT, Claude, or Gemini, you’ll understand how these systems work and how to build with them.
While most introductory courses focus on showing basic functionality, we assume you have some exposure to widespread tools like ChatGPT, Claude, Gemini, and others. These tools are built for the general public and abstract away the underlying complexity. To build effectively with AI, you need to understand what’s happening under the hood.
This chapter focuses on the core concepts and architecture of LLMs, with plenty of practical examples and hands-on exercises. We’ll help you build a strong foundation necessary to go beyond simply using these tools, enabling you to build robust AI-powered applications.
We will introduce essential AI and LLM terminology (with a handy reference glossary), explore key architectural principles, and provide hands-on examples of implementing AI in real-world applications.
What You’ll Learn in This Chapter
By the end of this chapter, you will be able to:
- Define core AI concepts: Distinguish AI, Machine Learning, Deep Learning and Generative AI, and say which one a system you are handed actually is
- Explain LLM architecture: Trace how a model turns text into tokens, attends over them, and predicts the next one – and why nothing in that process verifies truth
- Compare models and providers: Judge the trade-offs between model families, and recognise what a provider choice commits you to
- Place a workload: Choose between cloud API, self-hosted, edge, serverless and hybrid deployment, and say which security controls each choice keeps and which it hands to someone else
- Create effective prompts: Apply prompt engineering techniques, including for reasoning models – and treat a prompt as a request rather than a boundary
- Build with retrieval: Assemble RAG pipelines and embeddings, and identify every point where untrusted content enters the context window
- Reason about agentic AI: Trace the agent loop, apply the lethal trifecta test, and name where a control lives – which is never inside the prompt
Chapter Topics: Your Introduction to AI and LLMs
Here’s what we’ll cover in this chapter:
-
Introduction to AI and LLMs – How we got here and how LLMs actually work: rule-based systems through to tokens, attention, and next-token prediction
-
Key Players and Models – Current providers and model families: OpenAI, Anthropic, Google, Meta, DeepSeek, Qwen, Mistral, and what each one commits you to
-
Deployment Considerations – Cloud APIs, self-hosted, edge AI, serverless inference, and hybrid strategies – with cost and security trade-offs
-
Technical Foundations – Tokenization, embeddings, the Transformer architecture, context windows, and memory implementations
-
Prompt Engineering – Hands-on tutorial: zero-shot, few-shot, chain-of-thought, structured output, and reasoning model optimization techniques
-
Inference Techniques – Hands-on tutorial: API integration, RAG pipelines, embeddings, streaming, and cost optimization strategies
- Agentic AI – AI agents as production reality: coding agents, workflow automation, and the spectrum from automation to autonomy – with security implications for Chapter 2
Not Just Theory!
While this chapter provides essential theoretical foundations, we believe in learning by doing. Throughout each section, you’ll find:
- Interactive Quizzes: Test your understanding of key concepts
- Hands-on Exercises: Apply what you’ve learned with practical examples
- Real-world Scenarios: See how these concepts translate to actual business solutions
These practical elements will help you build confidence in applying AI concepts in your professional context.
Hands-On Labs
This chapter has a companion Labs page with four practical exercises – LLM API basics, prompt engineering, a RAG pipeline, and an agentic workflow. You can work through them alongside the sections or after finishing the chapter.
Content Currency
Model examples on this page were verified in August 2026. The AI landscape moves fast. Model names below were verified at the date shown; the concepts they illustrate outlast any particular release. Always check a vendor's current documentation before making a deployment decision.
Learning Progression
This is not a general AI primer that happens to come first. Every concept here is introduced as a trust boundary – who controls what, where untrusted content enters, and which control the design hands away – because that framing is what Chapter 2 attacks and Chapter 3 defends. The context window in Section 4 is flat and has no privilege levels, which is why prompt injection works. The deployment choice in Section 3 decides which of Chapter 3’s six layers are yours to run. The agent loop in Section 7 separates the step where compromise enters from the step where damage happens.
If a section here feels like background, look for the boundary it draws. Chapter 2 will attack it.
Ready to build your AI foundation?