Need to Know: Contextual-Integrity-Grounded Query Rewriting for Privacy-Conscious LLM Delegation
Authors: Xinyue Huang, Wenyuan Yang, Xiaochun Cao
Abstract
As LLMs become increasingly woven into everyday workflows, user queries send to cloud-hosted LLMs routinely mix task-essential content with task-non-essential sensitive disclosures, yet type-based PII redaction is context-agnostic and may raise two issues: over disclosing untyped sensitive context and over-removing answer-bearing spans. We recast privacy-preserving query rewriting under Contextual Integrity: a span should be forwarded only if it is necessary for the task. We build the first task-based CI benchmark for privacy conscious delegation, comprising 3,167 samples that combine high-quality synthetic data spanning 11 tasks and 20 task types, WildChat based real-user queries, and a medical challenge set with dense sensitive information. Building on this benchmark, we propose a CI guided reinforcement learning framework that converts essential and non-essential sensitive spans into verifiable optimization signals, and train a query rewriter to preserve task-critical information while suppressing unnecessary sensitive disclosure. Experiments show that our learned rewriter achieves the best privacy–utility trade-off, achieving up to +10.1 average utility over on-device baselines.