Prompt Length

Domain: Prompt Engineering

🎯 Motivation

Longer prompts give more context but cost more tokens. Finding the right length is a balance between clarity and cost.

πŸ“‹ Concrete Example

A 10-token prompt (β€˜Write code’) is cheap but vague. A 500-token prompt with examples and constraints is clear but costs 50x more. For simple tasks, short is fine; for complex tasks, invest in detail.

πŸ”— Analogy

Writing an email - a one-line email (β€˜meeting at 3?’) is efficient for close colleagues. A detailed email (agenda, background, expected outcome) is needed for new contacts. Match length to the situation.