Prompts
Prompt templates are reusable, version-controlled prompts for common tasks. Treating prompts as code improves consistency, enables collaboration, and allows for systematic improvement.
Why Version Control Prompts?
- Consistency: Everyone uses the same tested prompts
- Iteration: Track what changed and why
- Collaboration: Review prompts like code
- Evaluation: Test prompts against known inputs/outputs
- Rollback: Revert if a prompt regresses
Prompt Categories
| Category | Purpose | Examples |
|---|---|---|
| System Prompts | Define agent behavior and persona | Code reviewer, Support agent |
| Task Prompts | Instructions for specific tasks | Summarize PR, Generate tests |
| Few-Shot Examples | Examples that guide output format | JSON extraction, Classification |
| Chain Prompts | Multi-step reasoning templates | Research → Plan → Execute |