Many use cases want LLM capability without sending data to a third-party API. The mitigations span deployment choices (where the model runs), training-time privacy (differential privacy), and inference-time techniques (private retrieval, federated approaches).
This page is the working set, ranked by how often each is the right answer.
Before picking techniques, articulate the threat:
Each of these has different mitigations. Pick based on which threats matter for your application.
If "data must not leave our infrastructure" is the constraint, run the model yourself.
This is the answer for most "we can't send data to OpenAI" cases. Quality trades off vs commercial frontier; operational cost is real but bounded.
See LocalRAG for the RAG variant of this story.
Cloud providers offer confidential VMs / containers (AWS Nitro Enclaves, GCP Confidential VMs, Azure Confidential Computing) that encrypt memory, prevent host-OS introspection, and provide attestation that you're running on a verified configuration.
Use case: you want to use a third-party model (or third-party hardware) without trusting them with cleartext data.
For genuinely-sensitive workloads where self-hosting isn't feasible (specialised hardware, model size), confidential compute is the answer. Maturity is increasing rapidly through 2026.
Caveat: cryptographic protection against the host doesn't protect against your own application bugs. The enclave is a strong perimeter; what runs inside is your responsibility.
Anthropic, OpenAI, and Cohere offer "deploy our model in your infrastructure" enterprise tiers:
For organisations that want frontier-quality with self-hosted privacy, this is increasingly available. Cost is higher than API; operational responsibility is higher; data stays in the customer perimeter.
DP-SGD (differentially private stochastic gradient descent) trains models with mathematical guarantees that no individual training example can be reverse-engineered from the trained model.
Mechanics: clip per-example gradients; add Gaussian noise; sum.
Cost:
ε) is a parameter; lower budget = more privacy = worse quality.Used for:
Not used for: most production fine-tuning on company data, where quality is prioritised.
Train across multiple parties without centralising the data. Each party trains locally on their data; gradients (or model updates) are aggregated centrally; the central model improves.
Use cases:
For LLMs specifically, federated training is rare in 2026 because pretraining is too compute-intensive to do federated. Federated fine-tuning is more plausible.
The technique works; the use cases are narrower than its enthusiasts claim.
Before sending to an LLM, redact or pseudonymise sensitive fields:
Original: "Charge John Smith's card 4111-1111-1111-1111 for \$50"
Redacted: "Charge {NAME} card {CARD} for ${AMOUNT}"
LLM processes redacted version.
After response, re-substitute.
Tools: Microsoft Presidio, AWS Macie, Google DLP API, custom regex for known patterns.
For some workflows this is enough; for others, the redaction itself loses context (you might need to know the name to do the right thing).
Pattern: redact at ingestion when a third party shouldn't see the data; keep the link in your own DB; re-attach after.
For RAG specifically: keep the corpus local; only retrieved chunks go to the LLM. If you can't avoid sending the LLM the chunks, at least:
Combined with self-hosted LLM, the chunks never leave your perimeter at all.
Treat LLM outputs as untrusted before showing them:
Tools: re-running PII detection on outputs; structured-output validation; comparison to expected response shapes.
For sensitive applications:
Most production deployments need most of these. Skipping any of them is a specific trade-off you should be able to articulate.
Privacy regulations interact with LLM-specific concerns:
See AiDataPrivacyAndCompliance.
Trends through 2026:
Privacy-preserving LLM is an evolving space. The 2026 set of techniques will look different in 2028.
| Use case | Privacy approach |
|---|---|
| Internal productivity, low-sensitivity | Commercial API with enterprise tier |
| Internal data, moderate-sensitivity | Self-hosted on company infrastructure |
| Customer data, with their consent | Self-hosted; redaction; tenant isolation |
| Healthcare / finance regulated | Self-hosted or HIPAA-eligible API; full audit |
| Multi-tenant SaaS | Tenant-isolated self-hosted; or strict commercial enterprise tier |
| Cross-organisation data | Confidential compute or federated approach |
| Edge / on-device | Small open model on the device; nothing leaves |
For most teams, "self-hosted open model" is the answer to "we have privacy concerns and can't use the commercial API." The frontier-quality gap is the cost.