Build an LLM From Scratch

Lesson 52

Keeping it safe

Build an LLM From Scratch, 53 lessons

Follow a malicious instruction from a retrieved page to a tool call, then cut its route with permissions, isolation and focused review.

Lesson 51 checked whether an agent does its job. Passing ordinary jobs leaves another question: what if something it reads tries to give it a different job?

Your assistant must read a vendor page and draft a public release summary. The request is harmless. The page may not be. In Picture 1, tap the line you want to follow into the agent’s context, the text it can currently read.

[[breaf-artifact:1]] Do the three tries in Picture 1 before reading on.

BREAF Premium

The rest of this lesson is in Premium

Premium includes every lesson, with its notes, practice and progress.