You are implementing prompt strategy for a multi-agent procurement system in Azure. Specialist agents receive dynamic context (vendor policies, cart state) and must resist prompt injection from untrusted supplier portal text. Which approach best implements advanced prompt engineering for this solution?
Select an answer to reveal the explanation.
Short Explanation
You need structured, defensive, versioned prompting. Keep policies in system/developer layers, inject dynamic cart/policy context into delimited channels, add few-shots for nasty edge cases, and lifecycle-manage prompts in git. That's the structured approach with defensive guidelines, few-shot examples, delimited dynamic context, and versioned prompt lifecycle management.
Full Explanation
Advanced prompt engineering uses examples, dynamic context injection, defensive guidelines, and prompt lifecycle management. The structured system/developer instructions with defensive guidelines, few-shot examples for edge cases, dynamic context injection into delimited user/tool channels, and versioned prompt lifecycle management in source control applies all of these with trust boundaries between instructions and untrusted content. Concatenating untrusted supplier HTML into the system prompt with higher priority than policy instructions inverts trust and is a classic injection anti-pattern. Skipping examples and versioning and editing prompts only in production after incidents lacks change control, evaluation, and rollback. Storing a single 50-page prompt blob shared by all agents without role-specific instructions prevents role specialization and makes testing differentials between agents impossible. Practical pattern: system prompt defines identity/safety; developer messages encode tool schemas; retrieved or supplier content is labeled untrusted; outputs validated before tool execution. Exam tip: Untrusted external text never outranks system safety and policy instructions.