cs.CRMar 30, 2026

Privacy Guard & Token Parsimony by Prompt and Context Handling and LLM Routing

Authors: Alessio Langiu

Organizations: National Research Council of Italy - Institute of Marine Sciences (CNR-ISMAR)

Abstract

The large-scale adoption of Large Language Models (LLMs) forces a trade-off between operational cost (OpEx) and data privacy. Current routing frameworks reduce costs but ignore prompt sensitivity, exposing users and institutions to leakage risks towards third-party cloud providers. We formalise the "Inseparability Paradigm": advanced context management intrinsically coincides with privacy management. We propose a local "Privacy Guard" -- a holistic contextual observer powered by an on-premise Small Language Model (SLM) -- that performs abstractive summarisation and Automatic Prompt Optimisation (APO) to decompose prompts into focused sub-tasks, re-routing high-risk queries to Zero-Trust or NDA-covered models. This dual mechanism simultaneously eliminates sensitive inference vectors (Zero Leakage) and reduces cloud token payloads (OpEx Reduction). A LIFO-based context compacting mechanism further bounds working memory, limiting the emergent leakage surface. We validate the framework through a 2x2 benchmark (Lazy vs. Expert users; Personal vs. Institutional secrets) on a 1,000-sample dataset, achieving a 45% blended OpEx reduction, 100% redaction success on personal secrets, and -- via LLM-as-a-Judge evaluation -- an 85% preference rate for APO-compressed responses over raw baselines. Our results demonstrate that Token Parsimony and Zero Leakage are mathematically dual projections of the same contextual compression operator.

Figures & tables

Explore similar work

CardsList
  1. PromptGraph: Graph-Guided Prompt Sanitization for Balancing Privacy and Utility in LLM Inference

    Jul 12, 2026Chen Gu, Hui Wan, Donghui Hu +2Privacy-Preserving Language ModelsPrivacy Leakage in Language Models

  2. Tokenized Key-Gated Adapter Routing: A Secure Access Control Mechanism Against Private Data Leakage in LLMs

    Sep 28, 2026Mohamed Shaaban, Mohamed ElmahallawyLLM SecurityPrivacy Leakage in Language Models

  3. SharedRequest: Privacy-Preserving Model-Agnostic Inference for Large Language Models

    Jun 3, 2026Peihua Mai, Xuanrong Gao, Youlong Ding +3Privacy-Preserving Language ModelsLLM Inference