Coders In Hoods
  • Courses
  • Roles
  • Blog
  • Setup

Coders In Hoods AI Academy

Every course is free. Sign in to start, and your progress, quiz scores and bookmarks follow you.

AI Academy

  • Courses
  • Paths
  • Setup guides
  • How we teach

Role roadmaps

  • AI Engineer
  • Forward Deployed Engineer
  • Machine Learning Engineer
  • All roles

Coders In Hoods

  • The agency
  • Coaching for teams
  • Blog
  • LinkedIn
  • X (Twitter)

Contact

codersinhoods@gmail.com

© Coders In Hoods · since 2019

Course overview

Agent Foundations

Free · sign in to start and track progress

1 · What agents are

  • 1What is an agent?
  • 2Tools and the agent-computer interface
  • 3Context engineering

2 · Making agents dependable

  • 4Structured outputs and grounding
  • 5Workflow patterns
  • 6Risk and first evals

    Exercise answers

    • Answer: Build and run a 10-case eval
    • Answer: Block outbound actions with a hook
CapstoneA document review agent in Claude CodeReference implementation

Module 2 · Making agents dependable · Lesson 6

Risk and first evals

How agents fail in high-stakes work (fabrication, omission, prompt injection from documents, unapproved actions), the controls that contain each failure, and a first 10-case eval that tells you whether a change made your agent better or worse.

80 min 2 videos 3 exercises 7-question quiz Answers
Setup for the exercises:Install Claude CodeNode.js, pnpm and TypeScript

By the end of this lesson you can

  • Classify agent failures into fabrication, omission, misreading, stale input, unsafe action and injection, with a worked example of each
  • Explain indirect prompt injection and the lethal trifecta, and choose controls that don't depend on the model obeying instructions
  • Place human approval checkpoints with Claude Code permission rules and hooks, and recognise the eve equivalent
  • Build a balanced 10-case eval with expected outcomes and code graders, run it, and read the transcripts of failures
  • Interpret a small eval's pass rate honestly, including how wide the uncertainty is with 10 cases

On this page

  • A taxonomy of failures
  • Prompt injection from documents
  • The lethal trifecta
  • Human in the loop, in the harness
  • Your first eval
  • Designing the ten cases
  • Reading the result honestly
  • Misconceptions and limits
  • Where this goes next
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01A taxonomy of failures
  2. 02Prompt injection from documents
  3. 03Human in the loop, in the harness
  4. 04Your first eval
  5. 05Misconceptions and limits
  6. 06Where this goes next
  7. 07Summary

Sources & further reading

  • Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt InjectionPaper · Greshake et al. · 2023The paper that named indirect prompt injection - instructions planted in data the model later reads. Read the abstract and the threat model; every document in a contract pack is such data.
  • Demystifying evals for AI agentsLab research · Mikaela Grace, Jeremy Hadfield, Rodrigo Olivares and Jiri De Jonghe · Anthropic · 2026The vocabulary used here (task, trial, grader, transcript, outcome) and the advice to start with 20 to 50 tasks drawn from real failures. Read the definitions and the section on building your first eval; the Evaluating Agents course covers the rest.
  • Security (protect against prompt injection)Docs · AnthropicThe safeguards Claude Code has against prompt injection and what remains your responsibility. Read the prompt injection section.
  • Configure permissionsDocs · AnthropicAllow, ask and deny rules in .claude/settings.json - the simplest way to keep an agent away from actions it must not take.
  • R (Ayinde) v London Borough of Haringey; Al-Haroun v Qatar National Bank [2025] EWHC 1383 (Admin)Docs · High Court (Divisional Court), via The National Archives · 2025The Divisional Court's judgment on fictitious citations produced with AI. Read paragraphs 1 to 9 for the court's statement of the duty to check AI output against authoritative sources.
  • The lethal trifecta for AI agents: private data, untrusted content, and external communicationArticle · Simon Willison · 2025A short, clear rule for spotting when injection becomes data theft. Read it in full; it takes five minutes.
Free · sign in to start

Sign in to keep reading.

Free, no card. We use your account to save progress, quiz scores, bookmarks and occasionally send updates from our team.

  • 7 more sections
  • 3 hands-on exercises
  • A 7-question quiz
  • Progress, quiz scores and bookmarks