Dashboard
0%
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
51 small wins to finish your pathNext question →

Q9EasyConcept

What should go into an agent's system prompt?

30-second answerSay your answer out loud first, then reveal.

Typical structure

  1. Role and objective: "You are a support agent for Acme. Your goal is to resolve order issues end to end."
  2. Context: company policies, the user's account tier, current date, environment details.
  3. Tool guidance: which tools to prefer, in what order, and known caveats ("search_orders is slow; call it once and reuse results").
  4. Constraints and policies: "Never issue refunds above ₹5,000 without approval." "Don't reveal internal notes."
  5. Escalation: when to ask clarifying questions or hand off to a human.
  6. Stopping criteria: what counts as done.
  7. Output format: structure, tone, length.

Good practices

  • Explain the why. "Keep replies short because users are on mobile" generalises better than "max 50 words."
  • Give examples of tricky cases, but diverse ones. A single example tends to get copied verbatim.
  • Use clear sections (headers or XML tags) so the model can find policies easily.
  • Keep dynamic data separate (user info, date) from static instructions. This also helps prompt caching (Q28).

Anti-patterns

  • Giant lists of ALL-CAPS rules that conflict with each other.
  • Putting security entirely in the prompt. Prompts are guidance, not enforcement. Real limits belong in code (Q39).

Follow-ups to expect

  • How do you version and test system prompt changes? (See Q44.)

This is what real progress feels like.