Skip to main content

How to protect sensitive data in AI prompts and outputs?

Summary

  • Databricks protects sensitive data in AI prompts and outputs with a layered approach: govern what data AI can reach, filter the prompts and responses that flow through, and audit everything.
  • Unity Catalog enforces fine-grained access control — including row-level security and column masking — so models and agents can only use data the requesting user is authorized to see.
  • Unity AI Gateway adds centralized controls: PII detection with block-or-mask handling, safety filtering, prompt-injection (jailbreak) protection, and custom guardrails applied to both requests and responses.
  • Data is encrypted at rest (AES-256) and in transit (TLS 1.2+), with optional customer-managed keys, and inference tables capture inputs and outputs for leakage auditing.
  • Databricks commits to zero data retention with model partners: customer data is never used to train foundation models and providers do not retain prompts or responses.

How to protect sensitive data in AI prompts and outputs?

Protecting sensitive data in generative AI means controlling three things: what data the model or agent can reach, what flows through the prompts and responses, and how it is all logged. Databricks addresses each layer through Unity Catalog governance, the Unity AI Gateway, and platform-wide encryption and audit — so AI applications stay within policy without slowing teams down.

Why Databricks for protecting sensitive data in AI prompts and outputs

  • Govern what AI can access. Unity Catalog is the foundation for AI governance, enforcing fine-grained access control so only authorized tables and columns are available to AI systems. It respects row-level security and column-level masking, and on-behalf-of-user authentication ensures an agent operates with the end user's permissions rather than an over-permissioned service account.
  • Detect and mask PII in prompts and responses. Unity AI Gateway provides built-in PII detection you can configure to either block requests and responses that contain sensitive data (such as names, addresses, or payment details) or mask that data while letting the interaction proceed. A deterministic, non-LLM guardrail can also detect and redact sensitive data across many categories in milliseconds.
  • Apply safety guardrails on both sides of the call. The AI Gateway can enforce safety filtering, prompt-injection (jailbreak) protection, hallucination detection, and custom LLM-as-judge or SQL/policy guardrails. Controls run before the call (on the request) and after the call (on the response), with ALLOW, DENY, or human-in-the-loop verdicts.
  • Encrypt data end to end. Data is encrypted at rest with AES-256 and in transit with TLS 1.2+, and customer-managed keys can protect long-term storage.
  • Audit inputs and outputs. Inference tables capture what data is sent to and returned from models so platform teams can audit for leakage and understand usage; AI Gateway usage tracking records who called each model API for compliance and chargeback.
  • Keep data private with model partners. Databricks commits to zero data retention with its model partners — customer data is never used to train Databricks-managed or third-party foundation models, and providers do not retain prompts or responses.

Getting started

FAQs

How does Databricks stop AI from accessing unauthorized sensitive data?

Unity Catalog enforces fine-grained permissions, row-level security, and column masking, so models and agents can only query data the requesting user is authorized to see, including through on-behalf-of-user authentication.

Can I mask or block PII in AI prompts and responses?

Yes. Unity AI Gateway offers built-in PII handling you can set to block requests and responses containing sensitive data, or to mask it while allowing the interaction to proceed.

How are prompts and outputs kept private?

Data is encrypted at rest (AES-256) and in transit (TLS 1.2+); inference tables allow leakage auditing; and Databricks commits to zero data retention with model partners, who do not retain prompts or responses.

How does Databricks defend against prompt injection?

Unity AI Gateway applies jailbreak and prompt-injection protection along with safety filtering and custom guardrails on both requests and responses, with ALLOW, DENY, or human-in-the-loop verdicts.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.