Skip to main content

System prompt engineering

System prompt engineering is the practice of defining the instructions that shape how an AI system behaves. It is one way designers can influence model output before someone sends a request.


What is a system prompt?

A system prompt, also called a system message, system instruction, or meta-prompt, is a set of natural-language instructions that tells an AI system how to behave and perform. It runs behind the scenes, but it shapes every response people receive.

When someone sends a message, that input is processed in the context of the system prompt. A system prompt can govern:

  • What the AI system’s role and purpose are
  • How it should respond and what it should avoid
  • What tone and personality it should express
  • What format its responses should follow

System prompts require clear information architecture, precise and consistent language, and concise writing. They are also a shared design artifact, requiring collaboration with product managers, engineers, and applied scientists for refinement.


Structure a system prompt

Start by organizing a system prompt into four components: role, task, rules, and examples. This structure makes the prompt easier to test, scale, and iterate.

ComponentDescription
RoleDefines the AI system’s baseline persona, purpose, and point of view so its responses match expectations.
TaskDefines the specific action the AI system performs.
RulesSpecifies how the task should be accomplished, including guardrails that prevent harmful output.
Example outputGives the system an example of what an ideal response looks like.

Explore the tasks

Use Define system-level behavior for baseline, always-on behavior. Use Define tone and context behavior for scenario-based adjustments.