System Prompt

beginner
Core ConceptsLast updated: 2025-01-15
Also known as: system message

What is System Prompt?


A system prompt is the initial set of instructions provided to a language model that defines its behavior, role, capabilities, and constraints for an entire session or conversation. Unlike user prompts that contain specific queries or requests, the system prompt establishes the foundational context that shapes how the model responds to all subsequent interactions. It typically includes the agent's role or persona, behavioral guidelines, available tools or capabilities, output format requirements, and any constraints or safety guidelines.


System prompts are persistent across a conversation, influencing every response the agent generates. They might specify that the agent is a helpful assistant, a domain expert, a creative writer, or any other role. They define tone (formal vs casual), verbosity (concise vs detailed), and behavioral patterns (cautious vs confident). For agent systems, system prompts often include descriptions of available tools, memory access patterns, and decision-making frameworks like ReAct that structure the agent's reasoning process.


Crafting effective system prompts is crucial for agent development. A well-designed system prompt provides clear guidance that shapes consistent behavior, establishes appropriate boundaries and capabilities, and optimizes the model's performance for the intended application. Poor system prompts lead to inconsistent behavior, misaligned responses, or failure to use available capabilities effectively. System prompt design is an iterative process requiring testing and refinement to achieve desired agent behaviors.


Related Terms