The lesson series / Lesson 04 AI fundamentals · A living guide

The AI concepts every engineer should know.

AI moves fast, but the core vocabulary is small. These concepts cover how models think, how we talk to them, how agents act, and how we keep it all safe. The guide grows as AI does: new concepts are added as they start to matter.

How to read this

Every concept is explained the same way, so it sticks.

① In one line

What it is, in plain words.

② Think of it like

An everyday picture you can recall later.

③ Why it matters

Where you will meet it in real work.

Read it top to bottom once. Each part builds on the one before.

Part 1 of 9 · Concepts 1–8

Foundations

Start here. These eight ideas explain what an AI model is and how it reads the world.

  1. Generative AI

    Remember it as
    “The artist, not the critic”

    In one line

    AI that creates new content, such as text, images, code, audio or video, instead of only analyzing data.

    Why it matters

    It is the umbrella for ChatGPT, Claude, Gemini, image generators and coding assistants. Every other concept here sits under it.

  2. Large Language Models (LLMs)

    Remember it as
    “Autocomplete, scaled a million times”

    In one line

    A model trained on huge amounts of text that predicts the next word, and through that learns to write, reason and answer.

    Why it matters

    LLMs are the engine inside almost every AI product today. Knowing they predict, rather than look up facts, explains both their power and their mistakes.

  3. Tokens & Tokenization

    Remember it as
    “The LEGO bricks of text”

    In one line

    Tokens are the small chunks of text a model actually reads; tokenization is how text gets cut into them.

    Why it matters

    You pay per token, limits are counted in tokens, and speed is measured in tokens per second. Tokens are the currency of AI.

  4. Embeddings

    Remember it as
    “GPS coordinates for meaning”

    In one line

    A way of turning words, sentences or images into lists of numbers that capture their meaning.

    Why it matters

    Embeddings power semantic search, recommendations and RAG. They let a computer find things by meaning, not just matching keywords.

  5. Context Window

    Remember it as
    “The model’s desk”

    In one line

    The maximum amount of text a model can see and work with at one time, measured in tokens.

    Why it matters

    It decides how long a document you can paste, how long a chat stays coherent, and why agents need memory systems.

  6. Hallucination

    Remember it as
    “The confident bluffer”

    In one line

    When an AI states something false or made-up with full confidence.

    Why it matters

    It is the number one trust risk in AI. RAG, evals and guardrails exist largely to catch or prevent it. Always verify facts that matter.

  7. Small Language Models (SLMs)

    Remember it as
    “The scooter, not the truck”

    In one line

    Compact language models, usually under about 10 billion parameters, built to be fast, cheap and able to run on a laptop, phone or private server.

    Why it matters

    Many agent tasks, like classifying, routing or extracting data, don’t need a giant model. SLMs cut cost, speed up responses and keep data on your own hardware.

  8. Reasoning Models

    Remember it as
    “Working on scrap paper first”

    In one line

    Models that “think before they answer”, working through a problem step by step before giving the final response.

    Why it matters

    They are much better at math, coding, planning and multi-step tasks. The trade-off is that extra thinking costs more time and tokens, so you use them where accuracy matters most.

↑ Back to top Next: Part 2 · Talking to AI

Part 2 of 9 · Concepts 9–12

Talking to AI

A model is only as good as what you give it. These four ideas are about the input.

  1. Prompt Engineering

    Remember it as
    “Briefing a new hire well”

    In one line

    The skill of writing instructions that get the best, most reliable output from an AI model.

    Why it matters

    The same model can give poor or excellent results depending only on how you ask. It is the cheapest way to improve any AI output.

  2. System Prompts

    Remember it as
    “The day-one job description”

    In one line

    The hidden, standing instructions given to a model before the conversation starts, setting its role, rules, tone and limits.

    Why it matters

    It is how a general model becomes a specific product, like a support bot that only discusses your product and never shares internal data.

  3. Zero-Shot & Few-Shot Prompting

    Remember it as
    “Examples beat explanations”

    In one line

    Zero-shot means asking a model to do a task with no examples; few-shot means including a few examples in the prompt so it copies the pattern.

    Why it matters

    Few-shot is the quickest way to get consistent formats and styles, often good enough that you never need to fine-tune.

  4. Context Engineering

    Remember it as
    “The surgeon’s briefing pack”

    In one line

    Designing everything the model sees at each step: instructions, documents, tool results, memory and history, not just the prompt.

    Why it matters

    In 2026 it has become a core skill of AI engineering. Most agent failures are not model failures; the model simply had the wrong context.

↑ Back to top Next: Part 3 · Giving AI Knowledge

Part 3 of 9 · Concepts 13–15

Giving AI Knowledge

Models only know what they were trained on. These three ideas are how you teach them about your world.

  1. RAG (Retrieval-Augmented Generation)

    Remember it as
    “The open-book exam”

    In one line

    Before answering, the system searches your documents for relevant information and hands it to the model, so the answer is grounded in real sources.

    Why it matters

    It lets AI answer questions about your company’s policies, contracts or code without retraining, and it sharply reduces hallucinations because answers can cite their source.

  2. Vector Databases

    Remember it as
    “The librarian who knows meaning”

    In one line

    Databases built to store embeddings and quickly find the items closest in meaning to a query.

    Why it matters

    They are the search engine behind most RAG systems and agent memory. Common examples are Pinecone, Weaviate, Qdrant and pgvector for Postgres.

  3. Fine-Tuning

    Remember it as
    “Specialist training for a doctor”

    In one line

    Further training an existing model on your own examples so it permanently learns a specific style, format or task.

    Why it matters

    Use it when prompting and RAG are not enough: a fixed output format, a brand voice, or a narrow task done millions of times. Simple rule: RAG for knowledge, fine-tuning for behavior.

↑ Back to top Next: Part 4 · AI Agents

Part 4 of 9 · Concepts 16–21

AI Agents

This is where AI stops just answering and starts doing. Agents are the biggest shift in AI right now.

  1. AI Agents

    Remember it as
    “The self-driving car, not the GPS”

    In one line

    An AI system that is given a goal and works toward it on its own: it plans, takes actions with tools, checks the results and repeats until done.

    Why it matters

    Agents turn AI from a helper you ask into a worker you delegate to, booking meetings, fixing bugs, filing tickets or researching a market.

  2. Tool Use / Function Calling

    Remember it as
    “Giving the assistant a phone and keys”

    In one line

    The ability of a model to call external tools, such as APIs, databases, search or code, by producing a structured request your system then executes.

    Why it matters

    Tools are what make agents possible. Without tool use, a model can only describe actions; with it, it can take them.

  3. Agent Memory

    Remember it as
    “Working notes vs. the medical file”

    In one line

    The systems that let an agent remember beyond a single conversation: short-term memory for the current task, and long-term memory for facts, past events and preferences saved for later.

    Why it matters

    Models are stateless; they forget everything between sessions. Memory is what lets an agent improve over time and not ask you the same question twice.

  4. Agent Skills

    Remember it as
    “Recipe cards in the kitchen”

    In one line

    Packaged folders of instructions, scripts and resources that teach an agent how to do a specific task well, loaded only when needed.

    Why it matters

    Skills let you give one agent many expert abilities, like making slides or reviewing contracts, without stuffing everything into its context window at once.

  5. Multi-Agent Systems

    Remember it as
    “A project team with a manager”

    In one line

    Several specialized agents working together on a task, usually with one orchestrator agent splitting the work and combining the results.

    Why it matters

    Splitting complex work across focused agents often gives better, faster results. It also adds coordination cost, so use it when one agent genuinely isn’t enough.

  6. Human-in-the-Loop (HITL)

    Remember it as
    “The manager’s sign-off”

    In one line

    Designing AI systems so a person reviews, approves or corrects key decisions before the AI acts on them.

    Why it matters

    For anything risky or irreversible, like payments, deletions or customer messages, HITL keeps humans accountable and stops costly agent mistakes.

↑ Back to top Next: Part 5 · Agent Protocols

Part 5 of 9 · Concepts 22–24

Agent Protocols

Protocols are the shared languages that let agents plug into everything else. Remember them as three wires out of one agent: MCP to tools, A2A to other agents, AG-UI to people.

Three wires out of one agent

People

the user it works for

AG-UI

Tools & data

APIs, databases, files

MCP

Agent

A2A

Other agents

built by other teams

MCP points inward to tools, A2A sideways to other agents, and AG-UI outward to the person the agent works for.
  1. MCP (Model Context Protocol)

    Remember it as
    “USB-C for AI”

    In one line

    An open standard, created by Anthropic, that lets any AI app connect to any tool or data source through one common interface.

    Why it matters

    It has become the industry standard for connecting agents to tools and data. If you build software in 2026, an MCP server is fast becoming as normal as a REST API.

  2. A2A (Agent2Agent Protocol)

    Remember it as
    “A common language between companies’ agents”

    In one line

    An open protocol, started by Google, that lets AI agents built by different companies on different frameworks discover each other and work together.

    Why it matters

    MCP connects an agent to tools; A2A connects an agent to other agents. Together they make large multi-agent systems possible across company boundaries.

  3. AG-UI (Agent-User Interaction Protocol)

    Remember it as
    “The live delivery tracker”

    In one line

    An open protocol that streams what an agent is doing to your app’s interface in real time, and sends the user’s input and approvals back.

    Why it matters

    Agents run long, multi-step tasks. AG-UI lets users watch progress, see tool calls and step in, instead of staring at a spinner and hoping.

↑ Back to top Next: Part 6 · Frameworks

Part 6 of 9 · Concepts 25–27

Frameworks

Frameworks are the toolkits developers use to build AI apps and agents without starting from zero.

  1. LangChain

    Remember it as
    “LEGO Technic for AI apps”

    In one line

    A popular open-source framework that gives developers ready-made building blocks to connect models, prompts, tools, memory and data into an AI application.

    Why it matters

    It is one of the most widely used ways to build RAG apps and simple agents, and it can swap model providers with minimal code changes.

  2. LangGraph

    Remember it as
    “A flowchart that runs”

    In one line

    A framework from the LangChain team for building agents as a graph of steps, with loops, branches, saved state and human approval points.

    Why it matters

    Real agents rarely follow a straight line. LangGraph gives you precise control and reliability for complex, long-running agent workflows in production.

  3. CrewAI

    Remember it as
    “Hiring a virtual crew”

    In one line

    An open-source Python framework for building teams of AI agents, where each agent gets a role, a goal and tools, and they collaborate on a task.

    Why it matters

    It is one of the quickest ways to prototype multi-agent systems, because you describe agents in role-based, almost human terms.

↑ Back to top Next: Part 7 · Measuring & Running AI

Part 7 of 9 · Concepts 28–31

Measuring & Running AI

Building an AI demo is easy. Knowing it works, and keeping it working, is the real job.

  1. Evals (AI Evaluation)

    Remember it as
    “Unit tests for AI”

    In one line

    Systematic tests that measure how well an AI system performs on the tasks you care about, run before release (offline) and on live traffic (online).

    Why it matters

    AI output is unpredictable, and a small prompt change can silently break things. Evals turn “it seems fine” into a measurable score you can track over time.

  2. LLM-as-a-Judge

    Remember it as
    “The teacher with a marking scheme”

    In one line

    Using one AI model to grade another model’s outputs against a clear rubric, such as accuracy, relevance or tone.

    Why it matters

    Many AI outputs can’t be checked with simple code, like “was this answer helpful?”. A judge model scales that review to thousands of cases. Check the judge against human ratings regularly.

  3. LLM Tracing & Observability

    Remember it as
    “The airplane’s black box”

    In one line

    Recording every step an AI system takes, including prompts, responses, tool calls, latency, tokens and cost, so you can see exactly what happened.

    Why it matters

    Agents make many hidden decisions; without tracing, debugging is guesswork. LangSmith, Langfuse and Arize Phoenix specialize in it. Observability tells you what happened; evals tell you whether it was good.

  4. LLMOps & AgentOps

    Remember it as
    “Running the restaurant every day”

    In one line

    The practices and tooling for deploying, monitoring, versioning and improving LLM apps and agents in production: the AI version of DevOps.

    Why it matters

    Most AI projects fail in the jump from demo to production. LLMOps covers prompt versioning, evals in CI and cost tracking. AgentOps adds agent inventory, identities, permissions and audit trails.

↑ Back to top Next: Part 8 · Security

Part 8 of 9 · Concepts 32–34

Security

The more an AI can do, the more damage it can do. These three ideas are the security basics every builder needs.

  1. Prompt Injection

    Remember it as
    “The forged note in the inbox”

    In one line

    An attack where hidden or malicious instructions trick an AI into ignoring its rules. Direct injection comes from the user; indirect injection hides inside content the AI reads, like a web page, email or document.

    Why it matters

    It is the top security risk for LLM apps, and agents with tools make it far more dangerous. Treat everything an AI reads as untrusted data, never as commands.

  2. Guardrails

    Remember it as
    “Barriers on a mountain road”

    In one line

    Safety checks placed around an AI model that filter what goes in and what comes out, blocking harmful, off-topic, leaked or non-compliant content.

    Why it matters

    You can’t fully control what a model says, but you can control what reaches users and systems. Guardrails catch PII leaks, toxic content, jailbreaks and policy violations.

  3. OWASP Top 10 for Agentic Applications

    Remember it as
    “The safety inspection checklist”

    In one line

    A community-built list from the OWASP GenAI Security Project of the ten most critical security risks in AI agents, with practical mitigations.

    Why it matters

    It gives security and engineering teams a shared language for agent risks: goal hijack, tool misuse, privilege abuse, malicious MCP servers, unexpected code execution and rogue agents.

↑ Back to top Next: Part 9 · Building with AI

Part 9 of 9 · Concept 35

Building with AI

AI is also changing how software itself gets made.

  1. Vibe Coding

    Remember it as
    “Describing the house, not drawing blueprints”

    In one line

    Building software by describing what you want in plain language and letting AI write the code, often without reading every line. Andrej Karpathy coined the term in February 2025.

    Why it matters

    Great for prototypes and personal tools. For production software, the disciplined version, often called agentic engineering, keeps humans reviewing, testing and owning the code.

Cheat sheet

Every concept at a glance.

Save this table. It is the whole guide in one memory hook per concept. Switch on quiz mode to hide the hooks and test yourself.

Quiz mode: say the hook out loud, then tap to check. Revealed 0 of 35.

  1. 01 Generative AI The artist, not the critic
  2. 02 Large Language Models (LLMs) Autocomplete, scaled a million times
  3. 03 Tokens & Tokenization The LEGO bricks of text
  4. 04 Embeddings GPS coordinates for meaning
  5. 05 Context Window The model’s desk
  6. 06 Hallucination The confident bluffer
  7. 07 Small Language Models (SLMs) The scooter, not the truck
  8. 08 Reasoning Models Working on scrap paper first
  9. 09 Prompt Engineering Briefing a new hire well
  10. 10 System Prompts The day-one job description
  11. 11 Zero-Shot & Few-Shot Prompting Examples beat explanations
  12. 12 Context Engineering The surgeon’s briefing pack
  13. 13 RAG (Retrieval-Augmented Generation) The open-book exam
  14. 14 Vector Databases The librarian who knows meaning
  15. 15 Fine-Tuning Specialist training for a doctor
  16. 16 AI Agents The self-driving car, not the GPS
  17. 17 Tool Use / Function Calling Giving the assistant a phone and keys
  18. 18 Agent Memory Working notes vs. the medical file
  19. 19 Agent Skills Recipe cards in the kitchen
  20. 20 Multi-Agent Systems A project team with a manager
  21. 21 Human-in-the-Loop (HITL) The manager’s sign-off
  22. 22 MCP (Model Context Protocol) USB-C for AI
  23. 23 A2A (Agent2Agent Protocol) A common language between companies’ agents
  24. 24 AG-UI (Agent-User Interaction Protocol) The live delivery tracker
  25. 25 LangChain LEGO Technic for AI apps
  26. 26 LangGraph A flowchart that runs
  27. 27 CrewAI Hiring a virtual crew
  28. 28 Evals (AI Evaluation) Unit tests for AI
  29. 29 LLM-as-a-Judge The teacher with a marking scheme
  30. 30 LLM Tracing & Observability The airplane’s black box
  31. 31 LLMOps & AgentOps Running the restaurant every day
  32. 32 Prompt Injection The forged note in the inbox
  33. 33 Guardrails Barriers on a mountain road
  34. 34 OWASP Top 10 for Agentic Applications The safety inspection checklist
  35. 35 Vibe Coding Describing the house, not drawing blueprints

You made it

You now speak the language of AI engineering.

From tokens to agents to guardrails, you have the full map. Next time someone mentions RAG, MCP or prompt injection, you will know exactly where it fits.

0/35

concepts marked as understood