arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.00489cs.CLcs.AIcs.LG
收藏

Prompt-SAW:利用关系感知图进行文本提示压缩

Prompt-SAW: Leveraging Relation-Aware Graphs for Textual Prompt Compression

Provable Responsible AI and Data Analytics (PRADA) Lab(可证明的负责任人工智能与数据分析(PRADA)实验室);King Abdullah University of Science and Technology(阿卜杜拉国王科技大学);South China University of Technology(华南理工大学);University of Macau(澳门大学);Nankai University(南开大学);University of Copenhagen(哥本哈根大学);Stony Brook University(纽约州立大学石溪分校);SDAIA-KAUST AI(沙特数据与人工智能总局-阿卜杜拉国王科技大学人工智能机构);Ant Group(蚂蚁集团)

Muhammad Asif Ali, Zhengping Li, Shu Yang, Keyuan Cheng, Yang Cao, Tianhao Huang, Guimin Hu, Weimin Lyu, Lijie Hu, Lu Yu, Di Wang

AI总结:

本文提出Prompt-SAW方法,通过关系感知图提取关键信息来压缩提示,并扩展GSM8K-aug基准,在提升可读性的同时显著优于基线模型。

摘要:

大型语言模型(LLMs)在多种不同的自然语言处理任务中展现了卓越的能力。虽然提示是LLM推理的关键工具,但我们观察到,过长的提示会带来显著的成本。现有压缩长提示的尝试在压缩提示的可读性/可解释性方面结果欠佳,并对提示效用产生不利影响。为了解决这一问题,我们提出了PromptSAW:通过关系感知图进行提示压缩(Prompt compresSion via Relation AWare graphs),这是一种针对任务无关和任务感知提示的有效提示压缩策略。Prompt-SAW利用提示的文本信息构建图,随后提取图中的关键信息元素以生成压缩提示。我们还提出了GSM8K-aug,即现有GSM8K基准的扩展版本,用于任务无关提示,以提供全面的评估平台。使用基准数据集的实验评估表明,经Prompt-SAW压缩的提示不仅在可读性方面更优,而且在任务无关和任务感知设置下分别比表现最佳的基线模型高出最多10.1和77.1,同时将原始提示文本分别压缩了34.9%和56.7%。

英文摘要:

Large Language Models (LLMs) have shown exceptional abilities for multiple different natural language processing tasks. While prompting is a crucial tool for LLM inference, we observe that there is a significant cost associated with exceedingly lengthy prompts. Existing attempts to compress lengthy prompts lead to substandard results in terms of readability/interpretability of the compressed prompt, with a detrimental impact on prompt utility. To address this, we propose PromptSAW: Prompt compresSion via Relation AWare graphs, an effective strategy for prompt compression over task-agnostic and task-aware prompts. Prompt-SAW uses the prompt's textual information to build a graph and later extracts key information elements in the graph to come up with the compressed prompt. We also propose GSM8K-aug, i.e., an extended version of the existing GSM8K benchmark for task-agnostic prompts in order to provide a comprehensive evaluation platform. Experimental evaluation using benchmark datasets shows that prompts compressed by Prompt-SAW are not only better in terms of readability, but they also outperform the best-performing baseline models by up to 10.1 and 77.1, respectively, for task-agnostic and task-aware settings while compressing the original prompt text by 34.9 and 56.7.

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

↑