How to determine the ideal length of an AI prompt for optimal results

2–3 minutes

While a brief request may suffice for translating a sentence, the situation changes when preparing a summary for a board meeting. Recent research in artificial intelligence sheds light on when adding more details improves the response and when excessive information hinders performance.

When a single-line prompt is sufficient

For simple, low-risk, and easily verifiable tasks, a single line often does the trick. Examples include translating a sentence, suggesting three email subject lines, or explaining a concept. If the result falls short of expectations, adjustments can be made directly within the conversation by providing a new instruction.

When a longer prompt offers advantages

A study by Carnegie Mellon University examined prompts that failed to explicitly state requirements such as format and quality criteria. The models were able to infer 41.1% of these requirements independently, but their performance was inconsistent: prompts with minimal specifications were twice as likely to deteriorate when the model or text changed, resulting in accuracy drops exceeding 20% in some cases.

OpenAI’s prompt guidelines recommend including details, examples, and reference text. In practice, a longer prompt tends to be beneficial in four scenarios:

  • Defined audience and format: the response will be used by a board, a client, or within a specific timeframe.
  • Using proprietary material as a basis: the response should be derived from a provided document.
  • Criteria that AI cannot infer: corporate tone, prohibited terms, level of detail.
  • High-cost errors: published figures, contracts, and official communications.

Consider the difference between “Summarize this report” and “Summarize the report below in five lines for the financial board, highlight three risks, and indicate the page number for each cited data point.” The second prompt, despite being longer, eliminates three choices that would otherwise be left to the AI.

When excessive text becomes detrimental

A study presented at the 2024 ACL conference isolated the impact of input text length on reasoning tasks. The average accuracy of the models decreased from 0.92 to 0.68 with approximately three thousand tokens, which are the word fragments used by AI to process text.

The experiment typically used irrelevant text as filler rather than providing useful instructions. The research demonstrates that locating and combining relevant information becomes more challenging when there is excessive surrounding text. The Carnegie Mellon study also indicates that models struggle with prompts that contain too many requirements.

How to adjust prompt length

Four practices are commonly adopted in daily routines: separate the prompt into context, task, and format blocks; remove elements that do not affect the answer; break down complex tasks into steps, as OpenAI’s guide notes more errors in complex tasks than in simple ones; and compare the results of a short prompt with those of a long one before establishing an instruction model.

Key takeaways

Prompt length alone is not identified as a decisive factor in studies. The outcome is determined by the relevance of the content: requirements that AI cannot deduce are valuable, while text without a function is detrimental. The results are obtained from tests with specific models and may vary depending on the tool and task.