要約
大規模な言語モデル(LLMS)は、自然言語処理、マルチホップの回収からのアプリケーションの電源、および自律エージェントワークフローへの質問応答を再構築しました。
しかし、特に複数のLLMコールを検索やデータのフォーマットなどの機能操作を組み合わせた複雑なパイプラインでは、LLMを効果的に指示するためにテキスト入力を作成するタスクである迅速なエンジニアリング – 依然として困難で労働集約的です。
LLM-Autodiffを紹介します。これは、テキストグラデーションベースの方法(テキストグレードなど)をマルチコンポーネント、潜在的に環状LLMアーキテクチャに拡張する自動プロンプトエンジニアリング(APE)の新しいフレームワークです。
AdalFlowライブラリ内に実装されたLLM-Autodiffは、各テキスト入力をトレーニング可能なパラメーターとして扱い、凍結した後方エンジンLLMを使用してフィードバックアキンをテキスト勾配に生成します。
以前のシングルノードアプローチとは異なり、LLM-Autodiffは本質的に機能的なノードに対応し、繰り返しの呼び出し(例:マルチホップループ)で時間シーケンスの動作を保持し、異なるサブサブを分離することにより「ミドルの失われた」問題と戦う
プロンプト(命令、フォーマット、または少数のショットの例)。
さらに、選択的勾配計算を介してエラーが発生しやすいサンプルに焦点を当てることにより、トレーニング効率を高めます。
シングルステップ分類、マルチホップ回復ベースのQA、エージェント駆動型パイプラインなどの多様なタスク全体で、LLM-Autodiffは一貫して、正確性とトレーニングコストの両方で既存のテキスト勾配ベースラインを上回ります。
グラフ中心のレンズを介して迅速な最適化を統合することにより、LLM-Autodiffは、LLMワークフローをスケーリングおよび自動化するための強力な新しいパラダイムを提供します。
要約(オリジナル)
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.
arxiv情報
著者 | Li Yin,Zhangyang Wang |
発行日 | 2025-01-30 16:40:12+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google