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

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Ali, Muhammad Asif, Li, Zhengping, Yang, Shu, Cheng, Keyuan, Cao, Yang, Huang, Tianhao, Hu, Guimin, Lyu, Weimin, Hu, Lijie, Yu, Lu, Wang, Di
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866929548040339456
author Ali, Muhammad Asif
Li, Zhengping
Yang, Shu
Cheng, Keyuan
Cao, Yang
Huang, Tianhao
Hu, Guimin
Lyu, Weimin
Hu, Lijie
Yu, Lu
Wang, Di
author_facet Ali, Muhammad Asif
Li, Zhengping
Yang, Shu
Cheng, Keyuan
Cao, Yang
Huang, Tianhao
Hu, Guimin
Lyu, Weimin
Hu, Lijie
Yu, Lu
Wang, Di
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2404_00489
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Prompt-SAW: Leveraging Relation-Aware Graphs for Textual Prompt Compression
Ali, Muhammad Asif
Li, Zhengping
Yang, Shu
Cheng, Keyuan
Cao, Yang
Huang, Tianhao
Hu, Guimin
Lyu, Weimin
Hu, Lijie
Yu, Lu
Wang, Di
Computation and Language
Artificial Intelligence
Machine Learning
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.
title Prompt-SAW: Leveraging Relation-Aware Graphs for Textual Prompt Compression
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2404.00489