Prompt-pool privacy: what it means and what it doesn’t

, 8 min read

A tenant-specific pool offset in the gateway reduces cross-tenant mapping collisions. It does not separate tenants’ requests into different inference batches. This post describes what the offset covers and what it leaves to the AI provider.

What the code does

Shared inference systems can batch requests. The selected provider controls that scheduling, and the gateway code described here does not establish batch separation.

The gateway code defines a tenant-specific pool offset used in corpus-index calculations, intended to reduce cross-tenant mapping collisions. This is not evidence that requests are dispatched in isolated inference batches. The provider’s scheduler may batch requests from different CloakAPI tenants.

That distinction matters, and the rest of this post comes back to it.

Batch and cache risks at the provider

Side-channel inference through shared batch state

Research into transformer batch processing, including work by Nasr et al. on membership inference against LLM inference services and later work on timing side channels in shared GPU inference, has shown that requests placed in the same batch can create measurable side channels. Timing differences, cache-hit patterns and, in some implementations, shared attention state can leak information about co-located requests.

The pool offset concerns corpus-index mapping. The available gateway test does not measure batch co-location or establish protection from inference-batch side channels.

Cross-tenant cache poisoning

Some AI providers share KV-cache state between requests with matching prefixes (prompt caching). If one tenant’s system prompt partly matches another’s and they share a cache, a crafted prompt from the first could poison the cache entry the second reads later. The pool-offset code and its test do not establish how the provider isolates prefix-cache state.

The provider’s KV cache may be shared across all CloakAPI requests, because by default all CloakAPI traffic reaches the provider under the same API key. The next section covers what that means.

What the pool offset does not protect against

Being clear about limits matters more than listing protections. These are the threat classes the pool offset does not address.

Same-tenant cache hits

The pool offset is a calculation for corpus-index mapping. It does not establish how requests or cache state are separated across tenants. Within a tenant, similar requests may share provider cache state, depending on the provider’s implementation.

Model-level memorization

A large language model can memorize training data and reproduce it in its output. If your data was part of a model’s pre-training or fine-tuning set, the model may reproduce it however the inference request is structured. On supported client paths, on-device detection replaces the personal data it recognizes in your prompts; detection is best-effort and can miss content, so unmatched text may still reach the model. CloakAPI cannot change what a model already learned from its training data.

Mitigation: use models whose training-data provenance you can audit for your use case, and do not store model output that might contain memorized sensitive data without cleaning it first.

Provider-level cross-tenant inference

The provider’s inference infrastructure may batch requests from different CloakAPI tenants, and the pool offset does not establish how the provider schedules them.

This is inherent in sending traffic under a shared API key to a third-party provider. The ways around it are your own provider keys, which the provider ties to your account, or Complete-local mode, where inference runs on infrastructure you operate.

Prompt injection through a shared corpus

If two tenants process documents from the same public dataset, a malicious document in it could carry a prompt-injection payload. The attack targets the model’s behavior, not tenant separation, so the pool offset does not help: the vector is the content of the data, not how requests are batched.

Model fine-tuning on tenant prompts

This is the remaining risk we are least comfortable with.

Whether a provider may train on API traffic is set by its terms and agreements, and the provider controls its own training pipeline. If a provider fine-tuned on CloakAPI traffic, it would see the cloaked form of your requests: stand-ins in place of the values that were detected, plus the rest of your text and the structure of your requests.

Training restrictions are contractual commitments, not technical controls, and we cannot verify that a provider keeps them. The main mitigations are cloaking on the device, which keeps detected values away from the provider while undetected values still reach it; your own provider keys; and choosing providers whose training practices you can audit.

How to read the evidence

What the evidence shows

  • A tenant-specific pool-offset calculation for corpus-index mapping.
  • No evidence about how the provider separates its caches.

What the pool offset does not cover

  • Batch co-location at the provider (shared API key)
  • Model memorization of training data
  • Same-tenant cache hits
  • Prompt injection through data content
  • A provider breaking its training commitments

Customer mitigations

Your own provider keys (BYOK)

With BYOK you supply API credentials for each AI provider, and CloakAPI uses them for your requests. The provider still controls account handling and scheduling, so BYOK does not by itself establish how its batches or caches are separated. Check the provider’s terms for your account.

BYOK uses the flat 5% rate, and the API has no plan tiers. You add your keys in the portal.

Complete-local mode

Complete-local mode runs the model on infrastructure you operate: a self-hosted open-weight model, or a dedicated instance in your own cloud account. The model call does not go to a cloud AI provider; a content-free usage count goes to CloakAPI for billing, and CloakAPI signs the receipt.

Because the infrastructure is yours, provider-side handling does not apply to those requests. You take on operating it, including its security and availability. Complete-local uses the flat 5% local rate. For architecture questions, email support@cloakapi.io.

How we think about this

The pool-offset code covers a narrow calculation. Its test checks the arithmetic; it does not establish runtime collision rates or inference-batch separation. We describe these limits instead of presenting the offset as a general answer to inference privacy, so you can decide whether it is enough for your threat model, and if not, which measures to add: your own keys, Complete-local mode or more cloaking on the device.

Privacy tooling that overstates what it does is worse than none, because it creates false confidence. We would rather lose a sale to a customer who needs more than we provide today than win one from a customer who misunderstands what they bought.

All postsRSS feed