metaTextGrad: Automatically optimizing language model optimizers

Guowei Xu, Mert Yuksekgonul, Carlos Guestrin, James Zou
5/24/2025
cs.CL

No official code found. Best implementation: zou-group/metatextgrad (15 stars, MIT, last commit 2025-11-05).

Abstract

Large language models (LLMs) are increasingly used in learning algorithms, evaluations, and optimization tasks. Recent studies have shown that using LLM-based optimizers to automatically optimize model prompts, demonstrations, predictions themselves, or other components can significantly enhance the performance of AI systems, as demonstrated by frameworks such as DSPy and TextGrad. However, optimizers built on language models themselves are usually designed by humans with manual design choices; optimizers themselves are not optimized. Moreover, these optimizers are general purpose by design, to be useful to a broad audience, and are not tailored for specific tasks. To address these challenges, we propose metaTextGrad, which focuses on designing a meta-optimizer to further enhance existing optimizers and align them to be good optimizers for a given task. Our approach consists of two key components: a meta prompt optimizer and a meta structure optimizer. The combination of these two significantly improves performance across multiple benchmarks, achieving an average absolute performance improvement of up to 6% compared to the best baseline.

View on arXivView PDF

Code Implementations(1)

MIT

metaTextGrad: Automatically optimizing language model optimizers. Published in NeurIPS 2025.

152PythonNov 5, 202511 months agoMIT
llmreasoningself-improving

Similar Papers

Cite this paper

@article{xu2025metatextgrad,
  title  = {metaTextGrad: Automatically optimizing language model optimizers},
  author = {Guowei Xu and Mert Yuksekgonul and Carlos Guestrin and James Zou},
  year   = {2025},
  eprint = {2505.18524},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.18524v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.18524.svg)](https://codeofpaper.com/paper/2505.18524)

Discussion