Abstract
A prompt pre-processing layer for large language model agents conditionally rewrites user prompts to reduce token consumption. For each prompt, a complexity score is computed from textual features such as the presence of file paths, the density of vague language, and the number of bundled tasks. The score is compared to a threshold: specific prompts are forwarded unchanged, while vague or multi-task prompts are transformed into a focused, scoped instruction before dispatch. Because rewriting is a low-cost text transformation gated on expected net savings, the system eliminates costly exploration and retry cycles for vague prompts without imposing any rewriting overhead on already-specific prompts.
Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 License.
Recommended Citation
Jain, Saket, "ADAPTIVE, COMPLEXITY-GATED PROMPT OPTIMIZATION FOR REDUCING TOKEN CONSUMPTION IN LARGE LANGUAGE MODEL AGENTS", Technical Disclosure Commons, (September 24, 2026)
https://www.tdcommons.org/dpubs_series/11871