You are implementing advanced prompt engineering for a multi-agent procurement solution in Azure. Supplier agents and a compliance agent share context. Red teaming found agents can be tricked into ignoring policy when a user message says “ignore previous instructions.” Which prompt engineering approach best hardens the system?
Select an answer to reveal the explanation.
Short Explanation
You harden the system by putting defensive guidelines in system/developer prompts, treating user text as data, showing refuse/handoff examples, and versioning prompts like code. That blocks “ignore previous instructions” attacks. Removing system prompts, putting policy/secrets in user messages, or just raising token limits doesn't create a secure instruction hierarchy.
Full Explanation
Applying defensive guidelines in system/developer prompts, separating untrusted user content from instructions, using examples of refuse/handoff behavior, and managing prompt versions as lifecycle artifacts is correct. Developing multi-agent solutions requires advanced prompt engineering: examples, dynamic context injection discipline, defensive guidelines, and prompt lifecycle management. Separating trusted instructions from untrusted user content and encoding refuse/handoff examples reduces instruction-override attacks across collaborating agents. Removing all system prompts and relying on the base model’s default behavior is incorrect: it eliminates policy anchors. Putting secrets and full policy manuals only in user messages is incorrect: it places authoritative policy and secrets in the untrusted channel, making them easier to override or leak. Increasing max tokens so the model has room to remember policies without structured guidelines is incorrect: larger token limits do not implement defensive instruction hierarchy. Combine prompt defenses with tool-level authorization—prompts alone are insufficient.