Agents

Prompt Engineering

1 min read

Definition

The practice of designing and optimizing inputs to LLMs to elicit desired behaviors and outputs.

Prompt engineering is often the highest-leverage way to improve agent performance without model changes.

Techniques

  • Clear instructions
  • Few-shot examples
  • Role assignment
  • Output formatting
  • Chain-of-thought

Best Practices

  • Be specific and explicit
  • Provide examples of edge cases
  • Test across diverse inputs
  • Version control prompts
agentspromptingoptimization