LLM-AutoDiff: Auto-Differentiate Any LLM Workflow
Li Yin, Zhangyang Wang (Atlas)

TL;DR
LLM-AutoDiff introduces an automatic prompt engineering framework that optimizes complex, multi-component LLM workflows using textual gradients, improving accuracy and efficiency over existing methods.
Contribution
It extends textual gradient methods to multi-component, cyclic LLM architectures, enabling automated prompt optimization for complex NLP pipelines.
Findings
Outperforms existing textual gradient baselines in accuracy.
Reduces training cost across diverse tasks.
Effectively handles functional nodes and cyclic workflows.
Abstract
Large Language Models (LLMs) have reshaped natural language processing, powering applications from multi-hop retrieval and question answering to autonomous agent workflows. Yet, prompt engineering -- the task of crafting textual inputs to effectively direct LLMs -- remains difficult and labor-intensive, particularly for complex pipelines that combine multiple LLM calls with functional operations like retrieval and data formatting. We introduce LLM-AutoDiff: a novel framework for Automatic Prompt Engineering (APE) that extends textual gradient-based methods (such as Text-Grad) to multi-component, potentially cyclic LLM architectures. Implemented within the AdalFlow library, LLM-AutoDiff treats each textual input as a trainable parameter and uses a frozen backward engine LLM to generate feedback-akin to textual gradients -- that guide iterative prompt updates. Unlike prior single-node…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTunneling and Rock Mechanics · Artificial Intelligence in Law · Natural Language Processing Techniques
