Good prompts are explicit, structured, and testable. Treat them as code: version, review, and evaluate regularly.
Structure
- System instruction: purpose, constraints, tone.
- Few-shot examples: diverse and representative.
- Output schema: JSON with strict fields or clearly delimited sections.
Guardrails
- Refuse ambiguous requests; ask clarifying questions.
- Redact sensitive inputs before echoing content.
- Decline tool use outside approved domains.
Tip
Keep a minimal baseline prompt and measure deltas when iterating. Small, controlled changes lead to faster learning.