用控制理论优化大模型提示词,让输出更精准。
Linear Feedback Control Systems for Iterative Prompt Optimization in Large Language Models
- 将提示词迭代优化类比为线性反馈控制系统。
- 通过误差反馈持续调整提示词直至达标。
- 为大模型提示工程提供数学化设计框架,适合算法研究者。
大型语言模型(LLMs)通过给定提示词生成输出,但要获得理想结果需反复优化提示词。本文提出一种新方法,将提示词的迭代优化过程类比为反馈控制系统。通过将模型输出与期望结果之间的偏差视为误差信号,持续迭代调整提示词,直至满足输出标准。尽管大模型本身具有非线性和非确定性特征,但该方法借鉴线性反馈控制理论,构建了数学基础,并探索了多种控制器在此框架下的应用。该研究为大模型提示词优化提供了系统化的控制论视角。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have revolutionized various applications by generating outputs based on given prompts. However, achieving the desired output requires iterative prompt refinement. This paper presents a novel approach that draws parallels between the iterative prompt optimization process in LLMs and feedback control systems. We iteratively refine the prompt by treating the deviation between the LLM output and the desired result as an error term until the output criteria are met. This process is akin to a feedback control system, where the LLM, despite being non-linear and non-deterministic, is managed using principles from linear feedback control systems. We explore the application of different types of controllers within this framework, providing a mathematical foundation for integrating linear feedback control mechanisms with LLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。