Injection Spotter¶
Run the Injection Spotter MicroSim Fullscreen
You can include this MicroSim on your website using the following iframe:
<iframe src="https://dmccreary.github.io/robot-arm/sims/injection-spotter/main.html"
height="490px" width="100%" scrolling="no"></iframe>
Description¶
Sort eight pieces of text that an agent might read into three classes: a real request from the user, plain data, or an injection that tries to give the agent an order. Used in Chapter 17.
Explore mode lists the three classes, each with the fact that separates it. The quiz shows eight texts in a fixed order, each with the place it came from: a web page, an email, a camera picture, a tool result or the conversation. You choose a class in the menu, press Check, and read the reason.
Lesson Plan¶
Grade level: Middle school and up (age 12+). Time: 5 to 10 minutes.
- Read the three classes. In Explore mode, notice that the classes differ in who wrote the text and who it speaks to, and not in how the text sounds.
- Sort. Press Start. For each text, look first at where it came from, then at whether it tries to give the agent an instruction. Choose a class and press Check. You get one try for each text.
- Read the reason. The feedback names the correct class and gives the reason. Mastery is 7 of 8.
- Think about it. An agent that reads a web page should run under a role that has no tools that move the arm. How does that protect the arm even when the model is fooled?
Text from outside is data and never instructions. An injection does not have to look dangerous. It can be polite, short and about an ordinary action, and it can be written on a note that a camera reads.
Specification¶
The learning objective, evidence of mastery and content for this MicroSim are specified in Chapter 17: Safety Layers and Evaluation for Agent-Controlled Arms.