Less is More: Summary of Long Instructions is Better for Program Synthesis

Kirby Kuznia, Swaroop Mishra, Mihir Parmar, Chitta Baral

Abstract

Large Language Models (LLMs) have revolutionized program synthesis, yet they often struggle with complex, narrative-heavy problem descriptions. This paper investigates the impact of instruction length and clarity on model performance. By stripping away superfluous details and backstories through human and synthetic summarization, the authors demonstrate significant improvements in code generation accuracy. Results show that concise, "expert-level" summaries can boost strict accuracy by up to 11.8% on competitive programming benchmarks, suggesting that narrative noise is a primary bottleneck for current synthesis engines.

Introduction

Program synthesis—the automated generation of executable code from natural language—has advanced significantly with the advent of models like OpenAI’s Codex. However, a persistent gap remains between human performance and model output on complex tasks. This paper identifies a specific "human-centric" bottleneck: the elaborate narratives often found in programming challenges (e.g., LeetCode or Codeforces). While these stories help humans contextualize problems, they introduce "noise" that confuses LLMs. The authors propose that by "cleaning" these instructions, we can unlock the latent performance of existing models.

The Problem of Narrative Noise

The researchers identify that human-friendly abstractions, such as naming a character "Polycarpus" or providing a fictional backstory, act as superfluous information for LLMs. Models often "latch on" to spurious words within these stories. For instance, a narrative mentioning a "list" of items might lead a model to attempt a linked list implementation, even if the underlying logic requires a graph structure.

To quantify this, the authors performed a Part-of-Speech (POS) analysis. They found that a higher frequency of nouns in a prompt correlates with model failure, suggesting that "wordy" prompts lead the model down incorrect reasoning paths. Replacing these narratives with direct instructions (e.g., using "you" or "the input") significantly reduces these errors.

Methodology

The study explores a summarization-based approach to prompt engineering. Rather than modifying the model architecture, the researchers focused on refining the input through several strategies:

  1. Human Summarization: The authors crowd-sourced two tiers of summaries:
  2. Basic: Removing repetition and hypothetical fluff.
  3. Expert: The absolute bare minimum required for a senior engineer to understand the task (often only 2–4 lines).
  4. Synthetic Summarization: To test the scalability of this approach, they used other LLMs (GPT-3, Studio21, and PEGASUS) to automatically generate summaries.
  5. Evaluation: OpenAI Codex was used as the primary synthesis engine to compare performance on original prompts versus summarized ones.

Datasets

The research utilized two major programming benchmarks to create a new meta-dataset:

  • APPS: A dataset containing problems categorized by difficulty (Introductory, Interview, Competition).
  • CodeContests: A more challenging dataset from DeepMind consisting of competitive programming problems.
  • The Meta-Dataset: The authors contributed a resource consisting of ~450 human-generated summaries and ~8,600 synthetic summaries across these benchmarks.

Key Results and Insights

The results were striking across both benchmarks, confirming the "less is more" hypothesis:

  • Accuracy Gains: Summarized instructions improved strict accuracy by 8.13% on APPS and 11.88% on CodeContests.
  • The Expert Advantage: The more concise the prompt, the better the performance. "Expert" summaries generally yielded the highest accuracy, suggesting that LLMs perform best when given pure specifications.
  • Difficulty Breakdown: The biggest gains were seen in Interview-level questions (+11.48%) and Introductory questions (+9.86%).
  • The Reasoning Ceiling: While summarization is highly effective for introductory and interview questions, it showed diminishing returns for high-level competitive programming (a modest ~2% gain). This suggests that for the hardest problems, the bottleneck is the model's underlying reasoning capability rather than prompt clarity.

Limitations and Future Work

While the paper proves that summarization is a powerful tool for prompt engineering, it acknowledges several hurdles:

  • The Reasoning Gap: Summarization does not solve problems requiring "multi-hop reasoning" or advanced algorithmic knowledge.
  • Annotator Bias: Human summaries are subject to the bias of the writer; what one person considers an "obvious" omission, another might find essential.
  • Future Directions: The authors suggest exploring "prompt decomposition"—splitting a single complex summary into a sequence of smaller, logical steps for the model to follow sequentially.

Conclusion

This research demonstrates that the way we communicate tasks to LLMs is just as important as the model's scale. By treating prompt engineering as a summarization task, developers can significantly improve the reliability of program synthesis. In the realm of LLM-driven coding, a concise specification is often far more effective than a detailed narrative.

Summary updated

BibTeX
@inproceedings{kuznia2022less,
  author = {Kirby Kuznia and Swaroop Mishra and Mihir Parmar and Chitta Baral},
  title = {{Less is More: Summary of Long Instructions is Better for Program Synthesis}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-main.301},
}
Figure