arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.21148cs.AI
收藏

如何为领域任务自动优化提示?通过进化领域知识自适应的自适应提示与推理

How to Auto-optimize Prompts for Domain Tasks? Adaptive Prompting and Reasoning through Evolutionary Domain Knowledge Adaptation

Johns Hopkins University(约翰霍普金斯大学)

Yang Zhao, Pu Wang, Hao Frank Yang

AI总结:

提出EGO-Prompt框架,通过进化领域知识自适应优化提示与推理,提升LLM在领域任务上的性能与可解释性。

摘要:

在真实世界应用中,为大型语言模型(LLM)设计针对特定领域任务的最优提示和推理过程既必要又具有挑战性。如何整合领域知识、提高推理效率,甚至为领域专家提供精炼的知识整合提示,是尤为关键但尚未解决的任务。在本研究中,我们提出了用于提示的进化图优化(EGO-Prompt),这是一个自动化框架,用于设计更好的提示、高效的推理过程,并提供增强的因果知情过程。EGO-Prompt从一个通用提示和由人类专家构建的容错初始语义因果图(SCG)描述开始,该图随后被自动精炼和优化以指导LLM推理。鉴于专家定义的SCG可能不完整或不完美,且其最佳整合方式因LLM而异,EGO-Prompt集成了一个新颖的因果引导文本梯度过程,分两步进行:首先,从SCG为每个实例生成近乎确定性的推理指导;其次,使LLM能够有效利用该指导以及原始输入。迭代优化算法利用带真实标签的文本梯度进一步精炼SCG和推理机制。我们在真实的公共卫生、交通和人类行为任务上测试了该框架。EGO-Prompt的F1分数比最先进的方法高出7.32%-12.61%,并允许小模型以不到原始成本20%的代价达到更大模型的性能。它还输出了一个精炼的、领域特定的SCG,提高了可解释性。

英文摘要:

Designing optimal prompts and reasoning processes for large language models (LLMs) on domain-specific tasks is both necessary and challenging in real-world applications. Determining how to integrate domain knowledge, enhance reasoning efficiency, and even provide domain experts with refined knowledge integration hints are particularly crucial yet unresolved tasks. In this research, we propose Evolutionary Graph Optimization for Prompting (EGO-Prompt), an automated framework to designing better prompts, efficient reasoning processes and providing enhanced causal-informed process. EGO-Prompt begins with a general prompt and fault-tolerant initial Semantic Causal Graph (SCG) descriptions, constructed by human experts, which is then automatically refined and optimized to guide LLM reasoning. Recognizing that expert-defined SCGs may be partial or imperfect and that their optimal integration varies across LLMs, EGO-Prompt integrates a novel causal-guided textual gradient process in two steps: first, generating nearly deterministic reasoning guidance from the SCG for each instance, and second, adapting the LLM to effectively utilize the guidance alongside the original input. The iterative optimization algorithm further refines both the SCG and the reasoning mechanism using textual gradients with ground-truth. We tested the framework on real-world public health, transportation and human behavior tasks. EGO-Prompt achieves 7.32%-12.61% higher F1 than cutting-edge methods, and allows small models to reach the performence of larger models at under 20% of the original cost. It also outputs a refined, domain-specific SCG that improves interpretability.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑