AI04 · GenAI, RAG, MCP & agents
Prompt-Injection Red Team & Tool Matrix
A document hides an instruction telling the agent to email data out. See the tool matrix and defences stop it.
🎯 You will learn to
- Spot indirect prompt injection
- Use an allow/deny tool matrix
- Fail closed
🧪 Live environment
Runs entirely in your browser: nothing is installed, no real cloud account is used and your code is never sent to our server.
Loading the lab…
✅ Steps & checkpoints
🗺️ Prompt-injection defence
Retrieved text is untrusted data; the tool matrix and an approval step stop a hidden instruction from sending data out.
The 2D diagram shows the exact flow, ports and trust boundaries. The 3D scene is a concept view of the same parts; packets travel along the same arrows.
🤔 Think about it
Why treat retrieved text as data, never as instructions?
🛡️ Safety & cost
The agents are deterministic simulations: no model is called and no real tool is executed. Write tools always need human approval.
🧹 Cleanup
Nothing to clean up.
📚 Reference documents
- OWASP Top 10 for LLM applications · OWASP
- AI Risk Management Framework · NIST
- Model Context Protocol · MCP
- Agentic AI Lens (Well-Architected) · AWS
- Microsoft Foundry Agent Service · Microsoft
Official sources, checked on 5 Nov 2026. Cloud services change often; check the official page before relying on a feature. All references