This paper presents AutoHint, a novel framework for automatic prompt engineering and optimization for Large Language Models (LLM). While LLMs have demonstrated remarkable ability in achieving high-quality annotation in various tasks, the key to applying this ability to specific tasks lies in developing high-quality prompts. Thus we propose a framework to inherit the merits of both in-context learning and zero-shot learning by incorporating enriched instructions derived from input-output demonstrations to optimize original prompt. We refer to the enrichment as the hint and propose a framework to automatically generate the hint from labeled data. More concretely, starting from an initial prompt, our method first instructs a LLM to deduce new hints for selected samples from incorrect predictions, and then summarizes from per-sample hints and adds the results back to the initial prompt to form a new, enriched instruction. The proposed method is evaluated on the BIG-Bench Instruction Induction dataset for both zero-shot and few-short prompts, where experiments demonstrate our method is able to significantly boost accuracy for multiple tasks.
翻译:本文提出AutoHint,一种面向大语言模型(LLM)的自动提示工程与优化框架。尽管LLM在各类任务中展现了生成高质量标注的卓越能力,但将此能力应用于特定任务的关键在于设计高质量提示。为此,我们提出一种融合上下文学习与零样本学习优势的框架,通过整合从输入-输出示例中提取的增强指令来优化原始提示。我们将这种增强称为"提示词"(hint),并提出一种从标注数据自动生成提示词的框架。具体而言,该方法以初始提示为起点,首先指导LLM从错误预测样本中推导新提示词,随后汇总各样本的提示词,并将其结果回注至初始提示以形成增强型指令。我们在BIG-Bench指令归纳数据集上对零样本和少样本提示进行了评估,实验表明该方法能显著提升多项任务的准确率。