Chapter 5: The model

System prompt

The part of a request set by whoever built the tool rather than typed by the user: the role, the rules, how to use tools. It is still text in the window, read as tokens like everything else.

It makes an instruction more likely to be followed, and that is all. The model can still do the other thing, so a rule that must always hold belongs in code that checks it.

Say it to your agent

“Put "database access only through src/db/" in AGENTS.md, and also add a test that fails if any other file imports the database client, because the line alone can be ignored.”

The workshop

Name a word, or describe what you mean in everyday language.