Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Implement shift-left security principles, including the AI Red Teaming Agent in Foundry

A worked example

Yes or no

Before any code is written, a team designs the system prompt for an agent that reviews lab reports uploaded by patients. The agent's rules are placed inside <instructions> tags. The text extracted from each uploaded lab report is inserted inside <patient-document> tags. The team also plans to add a persona stability clause to the system prompt. The team expects to revise the system prompt several times before release and is building a test suite of prompt injection attacks.

For each of the following statements, select Yes if the statement is true. Otherwise, select No.

StatementYesNo
Placing the lab report text inside <patient-document> tags is meant to make the model treat that text as data to reason about, not as directives to obey.

The instruction zone defines how the agent behaves, while anything in the document zone is material to analyze, so text from the lab report is not meant to act as instructions.

Correct
If a lab report contains the phrase "Ignore previous instructions", the persona stability clause should make the agent decline to analyze that report.

Persona stability tells the agent to describe the suspicious content it noticed and keep its clinical analysis role. The excerpt also notes that a clinical agent must still analyze lab reports even when they may hold hidden instructions; defense happens at ingestion rather than by rejecting content.

Correct
The team should run its injection test suite only once, after the final system prompt version is in production.

The excerpt advises red teaming your own system before attackers do and running the injection tests against every system prompt version, so testing is not deferred to a single run after production release.

Correct
Why

Shift-left security puts injection defenses into the design and test stages instead of waiting for production. Structural delimiters treat everything in the document zone as data, so hidden instructions in uploaded reports are not meant to act as commands. Persona stability does not reject documents; it gives the agent a script to quote the suspicious content, stay in its clinical role, and ask for the document source to be verified. Injection tests should be run against each system prompt version so weaknesses are found before adversaries find them.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free