AI guardrails are runtime controls placed directly around a language model. They validate prompt inputs, filter generated outputs, restrict out-of-scope topics, scan for personal data, and gate which tools an agent may call. For custom-built AI applications, runtime guardrails serve as an essential first defense.

They are also easy to over-credit. A guardrail protects the application it wraps. Most enterprise data exposure with AI does not happen inside an application you built. It happens when a file is uploaded to a consumer tool, when an assistant is connected to a drive with more permission than it needs, or when an agent reads more than its task requires.

This guide separates what guardrails catch from what needs a different layer, and shows where file-level controls take over.

What Are AI Guardrails, and What Do They Protect?

Guardrails sit between the user and the model, and between the model and whatever the model can call. Their typical controls fall into five groups: input validation, output filtering, topic restriction, personal-data and secrets detection, and tool-permission gating.

OWASP's 2025 Top 10 for LLM applications names the risks these controls target most directly. Prompt injection (LLM01) is the manipulation of a model through its inputs. Sensitive information disclosure (LLM02) is a model revealing confidential data, personal data, or intellectual property in its output.

Both are real, and both are partly addressable at the prompt and output layer. The question for a data-security program is what is left over.

See Where Your Files & AI Tools Intersect

Continuously discover sensitive data across SharePoint and Google Drive, map AI agent reach, and see which files are exposed to AI tools before a leak occurs.

Start a Free 14-Day Pilot

What Can Prompt and Output Guardrails Catch?

Inside the application they wrap, guardrails do useful work. An output scanner can stop a model from echoing a Social Security number or an API key in a response. A topic filter can refuse requests outside the assistant's purpose. Input checks can flag obvious injection patterns before they reach the model.

For a customer-facing chatbot, an internal Q&A assistant, or a retrieval system you built, those controls belong in the design. They reduce what the model says. That is a different job from deciding what the model is allowed to read.

Where Do Prompt-Layer Guardrails Stop?

Four gaps account for most of the data exposure that guardrails do not touch.

They live inside one application: A guardrail on your internal assistant says nothing about a file pasted into a personal ChatGPT account. Verizon's 2026 Data Breach Investigations Report, as reported by eSecurity Planet, found that 67% of users reached AI services through non-corporate accounts on company devices, and that 45% of employees are now regular AI users on corporate systems, up from 15% a year earlier. Most of that activity never passes through a guardrail you control.

They inspect the conversation, not the content that arrives from elsewhere: Prompt injection can arrive through material the model reads: a document, an email, a web page. A filter that inspects only what the user typed does not see an instruction hidden inside a file the assistant retrieves.

They do not set what the AI can reach: OWASP lists excessive agency (LLM06) as a separate risk: an AI system granted more capability than its task needs. A text filter does not narrow that. Permissions on what the system can reach do.

They leave no file-level record: When an auditor asks which files an AI system read and who authorized it, a prompt log is not the answer.

A guardrail decides what the model may say. It does not decide what the model may read, because the files are not on the prompt layer where guardrails sit.

Which Layer Should Own Which Control?

The practical question is assignment: which control sits at which layer, and what each one decides.

Control Layer What it decides
Input and topic filters AI application What users may ask
Output scanning for personal data and secrets AI application What the model may say back
Tool and action permissions Agent platform What an agent may do
File classification and labels File layer Which files are sensitive
AI egress rules File layer Which files may reach which AI tools: block, limit to approved tools, or allow with redaction
Per-file encryption and contextual access File layer Who and what can open the file at all
Audit log File layer Proof of every file action

The top three rows protect the AI application. The bottom four protect the data layer, applying whether the AI tool is custom-built, enterprise-procured, or accessed via shadow AI. Complete security requires enforcing rules directly on the file itself.

How Do File-Level Guardrails Work?

File-level guardrails start before the AI is involved. Theodosian's continuous discovery runs across SharePoint, Google Drive, Box, and other repositories, and agentic classification labels files as PII, PCI, PHI, ITAR, trade secrets, and other categories. It also shows which people and which AI agents can reach each file.

Labels then drive policy. An AI egress rule applies one of three outcomes to a file headed for an AI tool: block it, limit it to approved tools and groups, or allow it with sensitive fields redacted. A contracts team can use the approved assistant, an unapproved tool gets nothing, and a model summarizing a document can do so without receiving the personal data inside it.

For restricted or high-risk files, per-file FIPS 140-3 validated encryption with more than 20 contextual controls ensures the file evaluates every access attempt directly. A tool that is not entitled to the file receives ciphertext. The file defends itself, and for those files, not even Theodosian can read them.

Every file action is recorded, and the log can be exported with cryptographic verification that it has not been altered. That is the record the prompt layer cannot produce. For the full model, see AI Data Security, and for the specific case of employees sending files to ChatGPT, Copilot, and Gemini, see How to Stop Sensitive Files Entering ChatGPT, Copilot, and Gemini.

How Do You Test Whether Your Guardrails Hold?

A test on your own files tells you more than a vendor claim. Pick one file from each classification tier, then try each route a file can take to an AI tool and compare what you expected with what happened.

Route to test What to expect What to check
Upload to an approved assistant Allowed, or allowed with sensitive fields redacted Whether redaction removed the right fields
Upload to an unapproved consumer tool Blocked or limited Whether a personal account changes the result
Retrieval by a connected assistant or agent Only files the agent's scope and the file's policy allow Whether the agent can reach files outside its task
A file shared outside the organization, then submitted to an AI tool Ciphertext unless the context is authorized Whether the audit log shows who and what asked

Then read the audit log. It should show each attempt, who or what made it, which tool received it, and the outcome. If the log cannot answer those four questions, the control is not producing evidence. Repeat the test each time you add an AI tool or change a classification rule.

For how this connects to the surrounding program, see How to Build an AI Governance Framework. For the posture side of AI security, see What Is AI Security Posture Management, and for the agent-connector side, MCP Security.

Enforce Guardrails Directly on the File Layer

Continuously discover sensitive data, enforce per-file FIPS 140-3 encryption, and automatically block unauthorized AI egress.

Request a Technical Walkthrough

FAQs: AI Guardrails and File-Level Control

Do AI guardrails replace DLP or file encryption?

No. Guardrails control what a model is asked and what it says. DLP inspects transfers, and file encryption controls who can open a file. Each answers a different question, and a program that relies on guardrails alone has no control over files that reach AI tools outside the application the guardrails wrap.

Can guardrails stop employees from uploading files to ChatGPT?

Not when the upload happens in a tool you do not control. A guardrail inside your own assistant cannot see a personal account. File-level AI egress rules act on the file by classification, blocking it, limiting it to approved tools and groups, or allowing it with sensitive fields redacted.

What does "allow with sensitive fields redacted" mean in practice?

The file can reach an approved AI tool with its sensitive fields removed. A model can summarize a contract or an incident report without receiving the personal, payment, or health data inside it, and the decision is recorded in the audit log.

Can we keep our existing guardrails and add file-level controls?

Yes, and that is the intended setup. Your guardrails keep protecting the AI applications you build. File-level controls sit underneath, on the files those applications and every other AI tool can reach. Theodosian works alongside existing tooling, so nothing is replaced and no data has to move.