← Back to Curriculum

Performance Optimization

Overview

Performance directives help your agent produce efficient, focused outputs. This includes minimizing unnecessary tokens, prioritizing actionable content, and optimizing for the user's workflow.

Key Principles

  • Instruct the agent to prioritize actionable answers over verbose explanations
  • Define when to be brief vs. thorough based on query complexity
  • Include caching hints — tell the agent what context to remember
  • Set priorities for conflicting requirements
  • Optimize for the common case, handle edge cases gracefully

Example Prompt Snippet

Performance guidelines:
- For simple questions, answer in 1-2 sentences
- For complex tasks, outline your approach first, then execute
- Avoid repeating information the user already provided
- If multiple solutions exist, recommend the best one first, then list alternatives
- Batch related operations instead of handling them one at a time

💡 Pro Tips

  • Measure token usage before and after optimization
  • Use conditional depth — brief for simple queries, detailed for complex ones
  • Avoid 'filler' instructions that add tokens without value