Prompt Engineering

System prompt is an agent’s “job description”.

Principles:

  • tone and style — use capitalization for critical constraints only;
  • structure — XML tags for semantics, Markdown for organization;
  • focus on process, not a pile of rules (SOP with steps);
  • business rules detailing to an executable level — a product manager should bring the rules to unambiguity;
  • few-shot examples — when the result is difficult to describe in words.

Verification criterion: would a smart new employee understand what to do after reading this prompt?

Related: Three rules of KV Cache friendliness, Prompt injection