How long should a prompt be?
The sweet spot
For simple tasks like "What's the capital of France?" a few words suffice. For more complex requests—like writing a cover letter or debugging code—you may need to provide background, constraints, and examples, which can stretch to several paragraphs. The key is to include only what's necessary for the model to understand the task.
Overly long prompts can bury the main instruction or introduce conflicting details. If you find yourself writing pages, consider breaking the task into multiple prompts or using a structured format with headings.
When longer prompts help
Longer prompts are useful when you need to set a detailed persona, provide extensive context, or give multiple examples. For instance, a prompt for generating a consistent brand voice might include a style guide, sample sentences, and a list of banned words.
Some advanced techniques, like "few-shot prompting," deliberately include several examples to teach the model a pattern. These prompts can be quite long, but each part serves a purpose.
- Simple question: 1–10 words.
- Typical task: 1–3 sentences.
- Complex task: 1–3 paragraphs.
- Few-shot with examples: can be much longer.
- If in doubt, start short and add detail if needed.
Common mistakes
- Thinking a longer prompt always gets better results—extra words can confuse the model.
- Writing a prompt so short that it lacks essential context, leading to generic answers.
- Forgetting that the model has a token limit; extremely long prompts may be truncated.
