LLM107 · Evaluating, Testing and Guarding LLM Applications
About Course
Measure the quality of LLM applications with real evaluation sets, automate regression tests, and add guardrails that protect users, data and the business.
Who it is for
Developers and technical leads who are responsible for the quality and safety of LLM features before and after launch.
Prerequisites
LLM104 and LLM105; LLM106 is helpful for the agent-related examples.
What you will be able to do
- Build an evaluation dataset with clear pass criteria for a specific LLM feature
- Combine code-based checks and calibrated LLM-as-judge grading to score outputs
- Automate prompt and model regression tests in a continuous integration pipeline
- Implement input and output guardrails for personal data, off-topic requests and prompt injection, mapped to the OWASP Top 10 for LLM Applications
Lessons
- Lesson 1 · Designing evaluations that matter
- Lesson 2 · Grading and automated testing
- Lesson 3 · Guardrails and defensive design
- Lesson 4 · Lab and assignment
Lab: An evaluation suite and guardrails for a support assistant
You will create a 40-case evaluation set for a customer-support assistant, score it with deterministic checks and an LLM grader, and run it automatically on every change through GitHub Actions. You will then add guardrails that redact personal data, keep the assistant on topic and resist instructions embedded in user content, and verify them with tests.
Free tools: VS Code or Google Colab, promptfoo (open source, runs locally), pytest, Microsoft Presidio for PII detection, GitHub Actions free tier, and the Gemini API free tier or Ollama
Assessed assignment
Produce a complete quality and safety package for an LLM feature of your choice in a small business, such as a clinic appointment assistant or a store returns bot. Include a written quality bar with pass thresholds, an evaluation set of at least 40 cases, automated tests running in CI, at least three guardrails mapped to OWASP LLM risks, and a short incident playbook describing how the team detects, contains and fixes a harmful or wrong output after launch.
| Criterion | Weight | What excellent work looks like |
|---|---|---|
| Evaluation design | 30% | Cases represent real usage, edge cases and safety risks; pass criteria are explicit and thresholds justified. |
| Grading quality | 20% | Deterministic checks are used wherever possible and the LLM grader is calibrated against human grades. |
| Automation | 20% | Tests run in CI on every change and block regressions with clear reports. |
| Guardrails and response | 30% | Guardrails are layered, tested and mapped to specific risks; the incident playbook is concrete and realistic. |
Portfolio piece
A CI-integrated evaluation suite with tested guardrails and an incident playbook for a real LLM feature.
Next step
Continue with LLM108 · Deploying and Operating LLM Applications · 8 hours · $56.00
Course Content
LLM107 · Evaluating, Testing and Guarding LLM Applications (8 h)
-
Lesson 1 · Designing evaluations that matter
-
Lesson 2 · Grading and automated testing
-
Lesson 3 · Guardrails and defensive design
-
Lesson 4 · Lab and assignment
-
LLM107 Assessment · Evaluating, Testing and Guarding LLM Applications
