System Prompt
The initial set of instructions given to an AI model that defines its role, behavior, constraints, and output format before any user interaction begins. The system prompt is the primary mechanism for configuring an AI agent's personality, guardrails, and domain expertise. A well-crafted system prompt for a support agent might specify tone, escalation rules, prohibited topics, and the knowledge base to reference—effectively programming the agent's behavior without writing code.
Example
A sales agent's system prompt might include: 'You are a sales assistant for Acme Corp. Always be professional and consultative. Never discuss competitor pricing. When a prospect asks about enterprise plans, collect their company size and use case before quoting.'
Frequently asked questions
- How long should a system prompt be?
- It depends on complexity. Simple agents need 200–500 tokens. Production agents with detailed guardrails, tool instructions, and domain knowledge often use 2,000–10,000 tokens. With prompt caching, longer system prompts are cost-effective because the cached prefix is processed once.