Structured Prompts: System Prompts and Role Design

AI Navigate Original / 5/16/2026

共有:

Key Points

  • Robust apps structure prompts by role; mixing is fragile/attackable
  • System = immutable policy; context = data; user = non-instruction input
  • Tell system to ignore commands in user input; delimit data
  • System prompts aren't omnipotent; layer injection defenses

Structured Prompts: System Prompts and Role Design

Robust LLM apps structure prompts by role. Mixing them makes things fragile and easier to attack.

Role Separation

  • System: immutable policy, constraints, output contract (not overridden by the user)
  • Context: reference data, history (stated explicitly as data)

Sign up to read the full article

Create a free account to access the full content of our original articles.