[论文解读] Interactive and Visual Prompt Engineering for Ad-hoc Task Adaptation with Large Language Models
本文提出 PromptIDE,一种交互式可视化工具,用于自动化和可视化零样本NLP任务的提示工程,指导用户完成模板设计、评估和对临时模型的部署。
State-of-the-art neural language models can now be used to solve ad-hoc language tasks through zero-shot prompting without the need for supervised training. This approach has gained popularity in recent years, and researchers have demonstrated prompts that achieve strong accuracy on specific NLP tasks. However, finding a prompt for new tasks requires experimentation. Different prompt templates with different wording choices lead to significant accuracy differences. PromptIDE allows users to experiment with prompt variations, visualize prompt performance, and iteratively optimize prompts. We developed a workflow that allows users to first focus on model feedback using small data before moving on to a large data regime that allows empirical grounding of promising prompts using quantitative measures of the task. The tool then allows easy deployment of the newly created ad-hoc models. We demonstrate the utility of PromptIDE (demo at http://prompt.vizhub.ai) and our workflow using several real-world use cases.
研究动机与目标
- 提供一个通用、面向最终用户的界面,支持提示驱动的NLP任务,超越监督训练。
- 通过迭代反馈实现更快、数据驱动的提示编写。
- 将提示选择建立在定量的任务评估指标之上。
- 支持将提示无缝部署到真实任务和数据中。
提出的方法
- 自动化并可视化跨模型、任务和数据集的多种提示模板的创建与评估。
- 引导用户完成四步工作流:数据集导航、提示变体、提示改进和提示测试。
- 使用模板卡片和颜色编码变量来跟踪在小数据子集上的性能。
- 使用小数据集以实现快速迭代,并使用更大数据集对提示进行经验性支撑。
- 提供评估芯片、混淆矩阵和前-k token分析等性能可视化,以指导提示调整。
- 使用预训练语言模型(T0-3B)的前端 TypeScript/Svelte 的后端在Python实现,并为长期任务使用队列系统。
实验结果
研究问题
- RQ1交互式可视化如何支持随需随用NLP任务的高效且可重复的提示工程?
- RQ2工具能否在保持对模型和数据集无关的同时,以定量指标来支撑提示设计?
- RQ3有哪些有效的可视化编码和工作流,可以迭代改进零样本提示?
- RQ4在迭代探索后,提示如何导出以便部署?
- RQ5哪些真实世界用例能够展示可视化提示工程的实用性?
主要发现
- PromptIDE 使跨模型、任务和数据集的多种提示模板可以同时创建和评估。
- 该工作流支持一个有原则、可重复的流程,包含提示变体、改进、测试和部署等阶段。
- 视觉编码(模板卡、评估芯片、混淆矩阵、前-k tokens 列表)为提示改进提供可操作的反馈。
- 购物车和提示来源集成有助于分享、重用和导出已部署的提示。
- 系统在现实世界任务如文档分类和阅读理解上进行了演示,展示了实际的随需随用模型开发。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。