Skip to main content

Overview

System prompts define how the AI behaves, its personality, constraints, and the format of responses. They’re set once and apply to all subsequent generations until changed.

Basic Usage

Best Practices

Be Specific

Define Output Format

Set Constraints

Example Prompts

Coding Assistant

Creative Writer

Data Analyst

Language Tutor

Technical Support

Multi-Turn Conversations

For multi-turn conversations, you can include conversation history in the prompt:

Prompt Templates

Create reusable prompt templates:

Tips

Keep system prompts concise. Long system prompts consume tokens and slow down generation. Focus on the most important instructions.
Test with different temperatures. Lower temperatures (0.1-0.3) work better for factual/structured outputs. Higher temperatures (0.7-1.2) work better for creative tasks.
System prompts are suggestions, not guarantees. Models may not always follow instructions perfectly, especially with complex or conflicting rules. Test thoroughly.

Generate

Full generation API reference

Streaming

Real-time token streaming