Manuals / Prompt Engineering / Chapter 7

B · Patterns · intermediate · ~35 min · Chapter 7 of 12

System prompts & multi-turn conversations

System prompts set stable behavior. User messages carry variable tasks. Design conversations that do not drift across turns.

Path progress
54%

Step 1 of 2

Write a system prompt

Persona, expertise boundaries, output rules, safety rails. Keep it under 500 tokens.

Write a system promptDrag stickies · tap for tips
Study mapDrag stickies · tap for tipsKeep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Assert the UIdrag · tap →Retry wiselydrag · tap →Seed datadrag · tap →Close the loopdrag · tap →Keep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Pathwise hackdrag · tap →Write a system prodrag · tap →Try thisdrag · tap →Follow the dashed drag · tap →

Do this now

System prompt for a "QA mentor" persona. Test across 5 different questions.

Was this step clear?
Chapter learning outcomes
  • System vs user
  • Conversation state
  • Drift prevention

Clear these before you leave

Side quest

Agent-ready brief

Write a Cursor-style task brief: paths, constraints, acceptance criteria.