Lexical Prompt Compression for Large Language Models: A Training-Free, Deterministic Pipeline with Empirical Pareto Analysis Across Eleven Task Categories
Abstract
Recent advances in large language models (LLMs) have made prompts increasingly large and complex. Techniques such as chain-of-thought reasoning (Wei et al., 2022) and in-context learning (Brown et al., 2020) frequently push real-world prompts past several thousand tokens, increasing inference cost and latency. Learned compression methods such as LLMLingua (Jiang et al., 2023) and Selective Context (Li et al., 2023) achieve high compression ratios but require auxiliary language models and are non-deterministic. We ask a complementary question: how far can a training-free, fully deterministic, CPU-only pipeline based on classical lexical NLP be pushed before output quality degrades significantly? Eleven toggleable lexical transformations - stopword removal, filler-phrase deletion, contraction and abbreviation substitution, part-of-speech-based pruning, lemmatization, WordNet-driven synonym shortening, and named-entity preservation - are assembled into a configurable pipeline. Fifteen configurations are evaluated on 1,242 English-only prompts from six sources (Dolly-15k, LMSYS-Chat-1M, WildChat-1M, MMLU, GSM8K, HellaSwag), spanning eleven automatically derived task categories, yielding 18,630 paired GPT-4o-mini completions. Output preservation is measured using BLEU, ROUGE-1/2/L, BERTScore-F1, and SentenceBERT cosine similarity. The most aggressive configuration achieves a mean token reduction of 40.3% (sigma = 9.2) at a BERTScore-F1 of 0.876 against the original-prompt output; a stopword-only configuration achieves 29.6% reduction at 0.913. The compression-versus-fidelity Pareto frontier is characterized per task category, with commonsense reasoning a systematic failure mode under aggressive compression. All code, prompts, and per-cell results are released for reproducibility.
Create a lesson
Metadata
- Comments
- the paper is 27 pages with 10 figures and 4 tables. Code and data for the experiments: https://github.com/shaminchokshi/Lexical-Prompt-Compressor---Research-Experiment-Code. Python package (pip install less-tokens): https://pypi.org/project/less-tokens/
Related papers
MINE: A Training-Free Defense against Indirect Prompt Injection via Mutual Information and Embedding Variance
Shared title terminologycs.CLTruong Phan, Ngoc-Quan Pham, Dat Quoc Nguyen
Prompt Compression in Diffusion Large Language Models: Evaluating LLMLingua-2 on LLaDA
Shared title terminologycs.CLSterling Huang, Abigayle Brown, Jiyoo Noh et al.
TF-Engram: A Train-Free Engram with SSD-Backed Memory for Large Language Models
Shared title terminologycs.CLYutang Ma, Kecheng Huang, Xikun Jiang et al.
Exploring Multi-Player Social Games as Verifiable Training Grounds for Large Language Models
Shared title terminologycs.CLKeyu He, Michael Li, Jiarui Liu et al.
MultAttnAttrib: Training-Free Multimodal Attribution in Long Document Question Answering
Shared title terminologycs.CLDang Quang Thien Tran, Quang V. Dang, Vinamra Tyagi et al.
VulnSafe: Measuring Vulnerability-Aware Relational Safety in Large Language Models
Shared title terminologycs.CLJiaming Luo, Jiacheng Ji, Haoan Jin et al.