Lab: red-team your own LLM app
Build a reusable attack harness, measure the attack success rate of a deliberately naive assistant (leaks, injection, off-topic, a tool-hijack scenario), harden it in layers, re-measure with confidence intervals and wire the suite into CI.
You will attack a deliberately naive assistant, measure how often attacks succeed, harden it layer by layer and measure again. The goal is to build a repeatable attack suite you can run on every release, and the habit of measuring defences instead of trusting them.
Scope and ethics. Do this only against your own local system, with fake canary secrets. Never point these tests at systems you do not own or have written permission to test. The techniques here are standard defensive testing; the point is to find and fix weaknesses in your own app.
Time: about an hour. You need: a local model behind an OpenAI-compatible endpoint (Ollama, llama.cpp server or vLLM) and Python 3.10 or later. Background: prompt injection, data leakage, defense in depth.
Pro content
Keep reading with Inference Academy Pro
Unlock this full lab, plus every advanced lesson, hands-on lab, the larger playground models and completion certificates.