Getting Started
An introduction to Guardrail Layer, its core concepts, and how it safely enables LLMs to interact with production databases.
What Is Guardrail Layer?
Guardrail Layer is a policy enforcement system that sits between Large Language Models (LLMs) and your databases.
Instead of allowing LLMs to directly generate and execute SQL, Guardrail Layer evaluates every query against role-aware policies, organizational boundaries, and semantic metadata before execution.
Why It Exists
Traditional database controls assume a human operator. LLMs violate those assumptions in subtle but dangerous ways:
- Aggregates can leak sensitive information
- Joins can bypass column-level restrictions
- Regex masking fails without semantic context
- Audit logs often lack intent or actor clarity
Guardrail Layer enforces policy before a query ever reaches the database.
High-Level Architecture
At a high level, Guardrail Layer acts as a controlled execution gateway:
• Metadata evaluation
• Query validation
• Redaction & rewriting
Core Concepts
Metadata
Structured metadata describing tables, columns, relationships, and sensitivity levels. This allows the system to reason about queries, not just pattern-match them.
Roles & Users
Access evaluated based on who initiated the request and which role they hold. Policies differ between humans, agents, and automated workflows.
Policies
Define what queries are allowed, what data may be returned, and how results should be redacted or constrained.
Audit Logging
Every query decision is logged with full context, making it possible to understand not just what ran, but why it was allowed.
Hosted vs Self-Hosted
Guardrail Layer can be deployed as a managed service or self-hosted within your own infrastructure. Both modes share the same enforcement engine and policy model.