用文本梯度优化医学提示,让开源大模型表现超越闭源巨头。
AutoMedPrompt: A New Framework for Optimizing LLM Medical Prompts Using Textual Gradients
- 通过文本梯度自动优化系统提示,提升大模型医学推理能力。
- 在PubMedQA上达82.6%准确率,优于GPT-4等闭源模型。
- 适合希望低成本提升医疗AI性能的研究者与开发者。
大型语言模型在医学等领域展现出日益增强的能力。传统构建专业模型需大量微调和训练数据,而提示工程无需微调即可提升通用基础模型性能。然而,如思维链(CoT)等方法不适用于所有亚专科,k-shot提示可能引入无关上下文。本文提出AutoMedPrompt,利用文本梯度实现系统提示优化,以激发医学相关推理。该框架基于TextGrad的文本自动微分机制,提升通用基础模型表现。我们在Llama 3上评估了该方法,使用MedQA、PubMedQA及肾病专科的NephSAP等多个问答基准。结果表明,使用文本梯度提示的模型在开源模型中表现更优,且在PubMedQA上达到82.6%准确率,超越GPT-4、Claude 3 Opus和Med-PaLM 2;在MedQA和NephSAP上分别达到77.7%和63.8%,优于以往提示策略,刷新了开源模型在这些任务上的新纪录。
原文摘要 · Abstract (English)
Large language models (LLMs) have demonstrated increasingly sophisticated performance in medical and other fields of knowledge. Traditional methods of creating specialist LLMs require extensive fine-tuning and training of models on large datasets. Recently, prompt engineering, instead of fine-tuning, has shown potential to boost the performance of general foundation models. However, prompting methods such as chain-of-thought (CoT) may not be suitable for all subspecialty, and k-shot approaches may introduce irrelevant tokens into the context space. We present AutoMedPrompt, which explores the use of textual gradients to elicit medically relevant reasoning through system prompt optimization. AutoMedPrompt leverages TextGrad's automatic differentiation via text to improve the ability of general foundation LLMs. We evaluated AutoMedPrompt on Llama 3, an open-source LLM, using several QA benchmarks, including MedQA, PubMedQA, and the nephrology subspecialty-specific NephSAP. Our results show that prompting with textual gradients outperforms previous methods on open-source LLMs and surpasses proprietary models such as GPT-4, Claude 3 Opus, and Med-PaLM 2. AutoMedPrompt sets a new state-of-the-art (SOTA) performance on PubMedQA with an accuracy of 82.6$\%$, while also outperforming previous prompting strategies on open-sourced models for MedQA (77.7$\%$) and NephSAP (63.8$\%$).
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。