Abstract
Recent advances have shown that optimizing prompts for Large Language Models (LLMs) can significantly improve task performance, yet many optimization techniques rely on heuristics or manual exploration. We present LatentPrompt, a model-agnostic framework for prompt optimization that leverages latent semantic space to automatically generate, evaluate, and refine candidate prompts without requiring hand-crafted rules. Beginning with a set of seed prompts, our method embeds them in a continuous latent space and systematically explores this space to identify prompts that maximize task-specific performance. In a proof-of-concept study on the Financial PhraseBank sentiment classification benchmark, LatentPrompt increased classification accuracy by approximately 3 percent after a single optimization cycle. The framework is broadly applicable, requiring only black-box access to an LLM and an automatic evaluation metric, making it suitable for diverse domains and tasks.
Abstract (translated)
最近的研究表明,为大型语言模型(LLM)优化提示可以显著提升任务性能,但许多优化技术依赖于启发式方法或手动探索。我们提出了一种名为LatentPrompt的框架,这是一种与模型无关的提示优化方法,它利用潜在语义空间自动生成、评估和改进候选提示,并且无需手工定制规则。该方法从一组初始提示开始,将其嵌入到连续的潜在空间中,并系统地在这个空间内进行探索以识别能够最大化特定任务性能的提示。 在金融短语库(Financial PhraseBank)情感分类基准测试的一个概念验证研究中,在经过一轮优化之后,LatentPrompt使分类准确率提高了大约3%。该框架具有广泛的适用性,仅需对LLM和自动评估指标有黑盒访问权限即可使用,因此适用于多种领域和任务。
URL
https://arxiv.org/abs/2508.02452