Reproduce “TextGrad: Automatic "Differentiation" via Text” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Mert Yuksekgonul, Federico Bianchi, Joseph Boen, Sheng Liu, Zhi Huang, Carlos Guestrin, James Zou
TextGrad treats compound AI systems as graphs of inputs, outputs, and tool calls, then uses LLM-written critiques as textual gradients to revise components. It routes feedback backward to update prompts or instances. On GPQA, GPT-4o with TextGrad reaches 55.0% accuracy versus 51.0% for Chain-of-Thought, with three test-time updates and majority voting; this uses extra inference-time computation.
Key insights
- Large Language Models (LLMs) can effectively generate actionable natural language feedback, termed "textual gradients," that describe how to improve variables within complex AI systems.
- TextGrad enables systematic optimization of compound AI systems, even those with non-differentiable or black-box components, by iteratively applying these textual gradients in a process analogous to gradient descent.
- The framework generalizes concepts from numerical optimization, such as minibatch processing, constrained optimization, momentum, and learning rate scheduling, to the textual domain.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.