English

GRAD-SUM: Leveraging Gradient Summarization for Optimal Prompt Engineering

Computation and Language 2024-07-19 v1 Artificial Intelligence

Abstract

Prompt engineering for large language models (LLMs) is often a manual time-intensive process that involves generating, evaluating, and refining prompts iteratively to ensure high-quality outputs. While there has been work on automating prompt engineering, the solutions generally are either tuned to specific tasks with given answers or are quite costly. We introduce GRAD-SUM, a scalable and flexible method for automatic prompt engineering that builds on gradient-based optimization techniques. Our approach incorporates user-defined task descriptions and evaluation criteria, and features a novel gradient summarization module to generalize feedback effectively. Our results demonstrate that GRAD-SUM consistently outperforms existing methods across various benchmarks, highlighting its versatility and effectiveness in automatic prompt optimization.

Keywords

Cite

@article{arxiv.2407.12865,
  title  = {GRAD-SUM: Leveraging Gradient Summarization for Optimal Prompt Engineering},
  author = {Derek Austin and Elliott Chartock},
  journal= {arXiv preprint arXiv:2407.12865},
  year   = {2024}
}

Comments

15 pages, 2 figures

R2 v1 2026-06-28T17:44:56.134Z