Cortex AI Integration
Metatate uses Snowflake Cortex for all AI capabilities. Every AI request is processed inside Snowflake — no data leaves the consumer's account, and no external API keys or network connections are required.
Zero Egress Architecture
Traditional AI integrations require external API calls, which means data leaves your Snowflake account and traverses the public internet. Metatate takes a different approach:
| Aspect | Traditional | Metatate |
|---|---|---|
| AI provider | External API (OpenAI, etc.) | Snowflake Cortex |
| Network | Outbound HTTPS to external endpoint | Internal Snowflake call |
| Data exposure | Prompt data sent externally | All processing inside Snowflake |
| Authentication | API keys stored in app | No keys needed |
| EAI required | Yes | No |
| Egress charges | Yes | No |
The application uses SNOWFLAKE.CORTEX.COMPLETE() — a built-in Snowflake function that runs LLM inference within the Snowflake infrastructure. This means:
- No External Access Integrations (EAIs) to configure
- No secrets or API keys to manage
- No network egress rules or firewall exceptions
- No data processing agreements with third-party AI providers
Required Privilege
Cortex requires a single privilege on the consumer account:
IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE
This privilege is requested during application installation and grants access to the SNOWFLAKE.CORTEX functions. Without it, AI features are unavailable but all core governance functionality continues to work.
Model Selection
Metatate automatically selects the best available Cortex model in your region with automatic fallback if a model is unavailable. The selection logic is transparent to the consumer — no configuration is required.
If all models are unavailable, a structured error is returned (never a silent failure). Model availability varies by Snowflake region, and the fallback chain ensures AI features work across all supported regions.
Graceful Degradation
Metatate is designed to degrade gracefully when AI is unavailable or limited:
Missing Cortex Privilege
If the consumer has not granted IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE:
- The AI status banner shows "AI Unavailable" with a clear explanation
- Natural language policy input is disabled
- AI-powered classification suggestions are disabled
- All core governance features (policy editing, compilation, deployment, materialization, MCP tools) work normally
No Available Models
If all models in the fallback chain are unavailable in the consumer's region:
- Same behavior as missing privilege
- The error message specifies that no models are available
- The system logs which models were attempted
Transient Failures
For temporary Cortex errors (timeouts, rate limits, internal errors):
- The request is automatically retried with fallback to alternate models
- If all attempts fail, a structured error is returned to the UI
What AI Powers
| Feature | Requires AI | Fallback Without AI |
|---|---|---|
| Natural language policy input | Yes | Manual YAML editing |
| Classification suggestions | Yes | Manual column classification |
| Policy analysis and recommendations | Yes | Not available |
| MCP tool responses | No | Governance data served directly from tables |
| Policy compilation | No | Deterministic pipeline |
| Governance materialization | No | Deterministic pipeline |
| Decision engine | No | Rule-based evaluation |
The core value proposition — defining, compiling, deploying, and enforcing governance policies — does not depend on AI. Cortex enhances the experience but is not required for governance operations.
How AI Is Used
Metatate sends only metadata and policy context to Cortex, never raw consumer data:
- Policy analysis: Policy YAML, table names, column names, data types
- Classification: Column names, data types, sample patterns (not row values)
- Natural language: User's natural language input describing desired policy
All prompts use structured templates that limit the context to governance metadata.