internalsGet Pro

AI Engineering · Module 09

Guardrails and security

Lessons
12
Free
0
Reading
~4 h

Your progress

0 / 12 lessons done

Sign in to track

Lessons

  1. Risks in LLM applications: an overviewEvery AI feature that reads outside text or calls a tool will meet someone trying to misuse it. A clear map of the risks tells you which failures your code must make impossible and which ones you can measure and reduce.13 min
  2. Prompt injection: when input becomes instructionsAny feature that sends text from outside your team to a model, such as an email, a chat message or a form field, can be steered by that text. Knowing which defences hold, and measuring them, decides whether an attack ends as a wrong draft someone catches or as money and data that leave.17 min
  3. Indirect prompt injection through documents and toolsOnce a feature retrieves documents or calls tools, anyone who can write in those places can try to steer it, and the person being helped never sees the attack. Knowing every such path, and which defences hold without the model’s help, decides whether a stolen staff login ends as one marked draft or as a week of promises to customers.19 min
  4. Data leakage: protecting secrets and personal dataEvery AI feature makes new copies of customer text: in prompts, logs, traces, indexes, eval sets and the provider’s systems. Each copy is a place it can leak from, and most leaks come from copies the team made itself, not from the model.18 min
  5. Input and output guardrailsEvals tell you how often a feature goes wrong before a release. Guardrails decide what happens to the one output in front of a person right now, and every one you add costs time, money and some good output that gets stopped by mistake.18 min
  6. Refusals and fallbacks: when the model declinesAny feature built on a current Claude model will sometimes get an answer of nothing, as a normal 200 response. Code that treats that as an error retries it, bills it and shows an empty screen; code that expects it gets the person a useful next step.16 min
  7. Content moderation: filtering harmful outputAny product where staff read messages from the public, such as a help desk, a marketplace or a community, must decide what reaches those people and what leaves in the company’s name. Get the errors wrong and you either expose people to abuse or hide the customers who most need help.18 min
  8. Least privilege for agents and toolsNo prompt makes a model impossible to steer, so the real limit on an AI feature is what its tools and credentials can do. Engineers who size that limit before launch turn a successful attack into a logged, capped proposal instead of a data leak.18 min
  9. MCP security: servers, tokens and tool poisoningOnce your product has an MCP server, your customers will run it next to servers you have never seen. You can’t choose those servers, so your own server has to limit what a steered model can take and make every attempt visible.19 min
  10. Red-teaming an AI applicationYour own tests only check the failures you already imagined. Before an AI feature talks to customers, someone has to attack it on purpose, write down what worked, and make sure each fix stays fixed in every later release.18 min
  11. AI regulation: EU AI Act, DPDP and content labelsAny AI feature that talks to the public or handles their data meets these laws before launch. Knowing who owes which duty, and from which date, tells you what to build in from the start instead of patching it later.18 min
  12. Design: a safe customer-facing assistantMost AI features keep a person between the model and the customer. The first one that doesn’t has to be safe by construction: what the model can see, what code lets it say, and what happens when anything looks wrong.30 min

Practise with

Terms this module teaches 66

Open glossary

AI notice

A fixed message that tells a person they are talking to an AI system, what it can and can’t do, and how to reach a human. It is written by people and sent by code, never generated by the model.