Build in layers A language model’s refusal is a learned response, so prompt injection and jailbreaking cannot be addressed by a single permanent patch. In a review, I’d assume an unwanted instruction could eventually get through and check which remaining controls could prevent the mistake from becoming a bigger incidnet. Defence in depth combines controls that make attacks harder, limit what a compromised application can do, and help teams notice problems sooner. I’d walk through the application from input to action and ask what still protects the system if the previous layer fails, because a useful second layer has its own job to perfom. Make the intended task clear System prompt hardening defines a narrow role, spells out when to refuse or redirect, and rules out personas that conflict with the task. In the attachment’s billing-assistant example, I’d keep the role focused on invoices and payments and review how the assistant handles requests to change roles or reveal its instrutions. Structured message templates give the model a way to distinguish developer instructions from user input and retrieved material. In the billing sample, I’d put the billing rules in the system message, pass the user’s text in a separate labelled block, and keep credentials out of the prompt altogether because message format does not grant authorisaton. Check what comes in and goes out Blocklists cheaply catch known strings, while classifiers try to recognise suspicious meaning across different wording. In a guardrail review, I’d use the cheap checks first and reserve heavier checks for requests worth a closer look, then track how often legitimate work, such as code review, gets caught by mistkae. Input guardrails screen text before generation, while output guardrails check the reply or proposed tool call before it moves downstream. In the source’s examples, I’d use the first to remove personal information from an incoming message and the second to catch a leaked credential or reject a tool call that fails its required strucutre.