LLM-AutoDiff: Auto-Differentiate Any LLM Workflow
Not on the map. Why?
Abstract (arXiv)
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 approaches, LLM-AutoDiff inherently accommodates functional nodes, preserves time-sequential behavior in repeated calls (e.g., multi-hop loops), and combats the "lost-in-the-middle" problem by isolating distinct sub-prompts (instructions, formats, or few-shot examples). It further boosts training efficiency by focusing on error-prone samples through selective gradient computation. Across diverse tasks, including single-step classification, multi-hop retrieval-based QA, and agent-driven pipelines, LLM-AutoDiff consistently outperforms existing textual gradient baselines in both accuracy and training cost. By unifying prompt optimization through a graph-centric lens, LLM-AutoDiff offers a powerful new paradigm for scaling and automating LLM workflows - mirroring the transformative role that automatic differentiation libraries have long played in neural network research.
Key facts. Cited by 21 papers in the map (data through 14 Oct 2026). First posted on arXiv 28 Jan 2025.
Builds on
0 of 0 references.
No references here yet.
Built on by
Citing papers per year: 2025: 3; 2026: 18.
21 papers.
Sort:
By area:
- 2025Scaling LLM Multi-turn RL with End-to-end Summarization-based Context Managementcited by 51
- 2025Defending Against Prompt Injection With a Few DefensiveTokenscited by 33
- 2026ReCreate: Reasoning and Creating Domain Agents Driven by Experiencecited by 24
- 2026VeRO: A Harness for Agents to Optimize Agentscited by 14
- 2026HarnessOpt-Bench: Evaluating LLMs at Harness Optimizationcited by 9
- 2025Scaling Textual Gradients via Sampling-Based Momentumcited by 6
- 2026MEMO: Memory-Augmented Model Context Optimization for Robust Multi-Turn Multi-Agent LLM Gamescited by 5
- 2026Self-Improvement of Large Language Models: A Technical Overview and Future Outlookcited by 5
- 2026Ask, Don't Judge: Binary Questions for Interpretable LLM Evaluation and Self-Improvementcited by 5
- 2026JudgeFlow: Agentic Workflow Optimization via Block Judgecited by 3
- 2026Training LLM Agents for Spontaneous, Reward-Free Self-Evolution via World Knowledge Explorationcited by 3
- 2026VASO: Formally Verifiable Self-Evolving Skills for Physical AI Agentscited by 3
9 more
- 2026QUIVER: A Formal Framework for Quantifying Perturbation Propagation and Bifurcation in Compound AI Systemscited by 2
- 2026MO-CAPO: Multi-Objective Cost-Aware Prompt Optimizationcited by 1
- 2026HPFA: Hypergraph-Based Paired Failure Attribution for LLM Reasoningcited by 1
- 2026The Optimizer Is the Agent: Reasoning-Driven Search across Prompts, Programs, and ML Workflowscited by 1
- 2026LinGO: A Linguistic Graph Optimization Framework with LLMs for Interpreting Intents of Online Uncivil Discoursecited by 0
- 2026Dead Weights, Live Signals: Feedforward Graphs of Frozen Language Modelscited by 0
- 2026FlowBot: Inducing LLM Workflows with Bilevel Optimization and Textual Gradientscited by 0
- 2026Segment-Level Agentic Topic Modeling for Improved Data Exploration and Resource Efficiencycited by 0
- 2026Joint Workflow and Prompt Optimization for User Behavior Simulationcited by 0
- 2026Joint Workflow and Prompt Optimization for User Behavior Simulation6 Oct 2026
- 2026Segment-Level Agentic Topic Modeling for Improved Data Exploration and Resource Efficiency25 Sep 2026
- 2026The Optimizer Is the Agent: Reasoning-Driven Search across Prompts, Programs, and ML Workflows7 Aug 2026
- 2026HarnessOpt-Bench: Evaluating LLMs at Harness Optimization6 Aug 2026
- 2026HPFA: Hypergraph-Based Paired Failure Attribution for LLM Reasoning3 Aug 2026
- 2026Ask, Don't Judge: Binary Questions for Interpretable LLM Evaluation and Self-Improvement25 Jun 2026
- 2026VASO: Formally Verifiable Self-Evolving Skills for Physical AI Agents3 Jun 2026
- 2026MO-CAPO: Multi-Objective Cost-Aware Prompt Optimization15 May 2026
- 2026QUIVER: A Formal Framework for Quantifying Perturbation Propagation and Bifurcation in Compound AI Systems11 May 2026
- 2026FlowBot: Inducing LLM Workflows with Bilevel Optimization and Textual Gradients29 Apr 2026
- 2026Training LLM Agents for Spontaneous, Reward-Free Self-Evolution via World Knowledge Exploration20 Apr 2026
- 2026Dead Weights, Live Signals: Feedforward Graphs of Frozen Language Models9 Apr 2026
9 more
- 2026Self-Improvement of Large Language Models: A Technical Overview and Future Outlook26 Mar 2026
- 2026MEMO: Memory-Augmented Model Context Optimization for Robust Multi-Turn Multi-Agent LLM Games9 Mar 2026
- 2026VeRO: A Harness for Agents to Optimize Agents25 Feb 2026
- 2026LinGO: A Linguistic Graph Optimization Framework with LLMs for Interpreting Intents of Online Uncivil Discourse4 Feb 2026
- 2026ReCreate: Reasoning and Creating Domain Agents Driven by Experience16 Jan 2026
- 2026JudgeFlow: Agentic Workflow Optimization via Block Judge12 Jan 2026
- 2025Scaling LLM Multi-turn RL with End-to-end Summarization-based Context Management8 Oct 2025
- 2025Defending Against Prompt Injection With a Few DefensiveTokens10 Jul 2025
- 2025Scaling Textual Gradients via Sampling-Based Momentum31 May 2025
- 2026VeRO: A Harness for Agents to Optimize Agentscited by 14
- 2026HarnessOpt-Bench: Evaluating LLMs at Harness Optimizationcited by 9
- 2026MEMO: Memory-Augmented Model Context Optimization for Robust Multi-Turn Multi-Agent LLM Gamescited by 5
- 2026JudgeFlow: Agentic Workflow Optimization via Block Judgecited by 3
- 2026Training LLM Agents for Spontaneous, Reward-Free Self-Evolution via World Knowledge Explorationcited by 3
- 2026VASO: Formally Verifiable Self-Evolving Skills for Physical AI Agentscited by 3
- 2026Segment-Level Agentic Topic Modeling for Improved Data Exploration and Resource Efficiencycited by 0
- 2026Segment-Level Agentic Topic Modeling for Improved Data Exploration and Resource Efficiency25 Sep 2026
- 2026HarnessOpt-Bench: Evaluating LLMs at Harness Optimization6 Aug 2026
- 2026VASO: Formally Verifiable Self-Evolving Skills for Physical AI Agents3 Jun 2026
- 2026Training LLM Agents for Spontaneous, Reward-Free Self-Evolution via World Knowledge Exploration20 Apr 2026
- 2026MEMO: Memory-Augmented Model Context Optimization for Robust Multi-Turn Multi-Agent LLM Games9 Mar 2026
- 2026VeRO: A Harness for Agents to Optimize Agents25 Feb 2026
- 2026JudgeFlow: Agentic Workflow Optimization via Block Judge12 Jan 2026
- 2025Scaling LLM Multi-turn RL with End-to-end Summarization-based Context Managementcited by 51
- 2025Scaling Textual Gradients via Sampling-Based Momentumcited by 6
- 2026QUIVER: A Formal Framework for Quantifying Perturbation Propagation and Bifurcation in Compound AI Systemscited by 2
- 2026MO-CAPO: Multi-Objective Cost-Aware Prompt Optimizationcited by 1
- 2026The Optimizer Is the Agent: Reasoning-Driven Search across Prompts, Programs, and ML Workflowscited by 1
- 2026LinGO: A Linguistic Graph Optimization Framework with LLMs for Interpreting Intents of Online Uncivil Discoursecited by 0
- 2026Dead Weights, Live Signals: Feedforward Graphs of Frozen Language Modelscited by 0
- 2026FlowBot: Inducing LLM Workflows with Bilevel Optimization and Textual Gradientscited by 0
- 2026Joint Workflow and Prompt Optimization for User Behavior Simulationcited by 0
- 2026Joint Workflow and Prompt Optimization for User Behavior Simulation6 Oct 2026
- 2026The Optimizer Is the Agent: Reasoning-Driven Search across Prompts, Programs, and ML Workflows7 Aug 2026
- 2026MO-CAPO: Multi-Objective Cost-Aware Prompt Optimization15 May 2026
- 2026QUIVER: A Formal Framework for Quantifying Perturbation Propagation and Bifurcation in Compound AI Systems11 May 2026
- 2026FlowBot: Inducing LLM Workflows with Bilevel Optimization and Textual Gradients29 Apr 2026
- 2026Dead Weights, Live Signals: Feedforward Graphs of Frozen Language Models9 Apr 2026
- 2026LinGO: A Linguistic Graph Optimization Framework with LLMs for Interpreting Intents of Online Uncivil Discourse4 Feb 2026
- 2025Scaling LLM Multi-turn RL with End-to-end Summarization-based Context Management8 Oct 2025
- 2025Scaling Textual Gradients via Sampling-Based Momentum31 May 2025
Similar, not cited
Close in wording, no citation either way
- 2025AutoPDL: Automatic Prompt Optimization for LLM Agents
- 2026Enhancing LLM Instruction Following: An Evaluation-Driven Multi-Agentic Workflow for Prompt Instructions Optimization
- 2024Designing Algorithms Empowered by Language Models: An Analytical Framework, Case Studies, and Insights
- 2025LaMDAgent: An Autonomous Framework for Post-Training Pipeline Optimization via LLM Agents
- 2024RePrompt: Planning by Automatic Prompt Engineering for Large Language Models Agents
- 2025PromptFlow: Training Prompts Like Neural Networks
- 2024AutoML-Agent: A Multi-Agent LLM Framework for Full-Pipeline AutoML
- 2024GReaTer: Gradients over Reasoning Makes Smaller Language Models Strong Prompt Optimizers