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

CategoryPurposeExamples
System PromptsDefine agent behavior and personaCode reviewer, Support agent
Task PromptsInstructions for specific tasksSummarize PR, Generate tests
Few-Shot ExamplesExamples that guide output formatJSON extraction, Classification
Chain PromptsMulti-step reasoning templatesResearch → Plan → Execute