Snowflake Intelligence Setup¶
Integrating AI-powered chat interface with your Openflow Cortex Search service
What You'll Build
A conversational AI agent that can answer questions about your business documents using natural language, powered by the Cortex Search service created by your Openflow pipeline.
Overview¶
Snowflake Intelligence enables you to create AI agents that can query and analyze your unstructured data using natural language. This guide shows how to connect Snowflake Intelligence to the Cortex Search service created by your Openflow unstructured data pipeline.
Architecture Integration¶
graph LR
A[📁 Google Drive Documents] --> B[🔄 OpenFlow Pipeline]
B --> C[🔍 Cortex Search Service]
C --> D[🤖 Snowflake Intelligence Agent]
D --> E[💬 Natural Language Queries]
E --> F[📊 Business Insights] The Snowflake Intelligence agent leverages your existing CORTEX_SEARCH_SERVICE (automatically created by the Openflow Google Drive connector) to provide intelligent document analysis capabilities.
Prerequisites¶
Before setting up Snowflake Intelligence, ensure you have:
- ✅ Completed Openflow pipeline setup - Your Cortex Search service must be running and populated with documents
- ✅ Appropriate Snowflake privileges -
CREATE AGENTprivilege and access to Cortex Search service - ✅ Default role and warehouse - Set in your Snowflake user profile
Important
All queries from Snowflake Intelligence use the user's credentials. Role-based access control and data-masking policies automatically apply to all agent interactions.
Step 1: Initial Setup¶
Create Snowflake Intelligence Database¶
First, create the required database and schema structure as outlined in the Snowflake Intelligence documentation:
-- Create database for Snowflake Intelligence
CREATE DATABASE IF NOT EXISTS snowflake_intelligence;
GRANT USAGE ON DATABASE snowflake_intelligence TO ROLE PUBLIC;
-- Create agents schema
CREATE SCHEMA IF NOT EXISTS snowflake_intelligence.agents;
GRANT USAGE ON SCHEMA snowflake_intelligence.agents TO ROLE PUBLIC;
-- Grant agent creation privileges to your role
GRANT CREATE AGENT ON SCHEMA snowflake_intelligence.agents TO ROLE FESTIVAL_DEMO_ROLE;
Verify Cortex Search Service¶
Confirm your Cortex Search service is available and properly configured:
-- Connect to your demo database
USE DATABASE OPENFLOW_FESTIVAL_DEMO;
USE SCHEMA FESTIVAL_OPS;
-- Verify your Cortex Search service exists
SHOW CORTEX SEARCH SERVICES IN SCHEMA FESTIVAL_OPS;
-- Test the search service
SELECT SNOWFLAKE.CORTEX.SEARCH(
'CORTEX_SEARCH_SERVICE',
'expansion strategy AND market analysis'
) as search_results;
Step 2: Create the Agent¶
Access Agent Creation Interface¶
- Sign in to Snowsight
- Navigate directly to Agents: Create Snowflake Intelligence Agent
- Select "Create agent"
Platform Integration:
- ☑️ Select "Create this agent for Snowflake Intelligence"
Configure Agent Basics¶
About Tab Configuration¶
Agent Details:
- Agent object name:
FESTIVAL_DOC_INTELLIGENCE(recommended for demo) - Display name:
Festival Document Intelligence
Description:
Query and analyze business documents using natural language, powered by festival operations data processed via OpenFlow pipeline.
Example Questions (Add these to help users get started):
Start Here - Copy Each Question
These questions are specifically designed for your festival operations data and provide the best introduction to your agent:
Step 3: Configure Agent Tools¶
Add Cortex Search Service¶
- Navigate to "Tools" tab
- Find "Cortex Search Services" section
- Click "+ Add" button
Configure the Search Service:
- Name:
FESTIVAL_OPS_INTELLIGENCE - Search Service:
OPENFLOW_FESTIVAL_DEMO.FESTIVAL_OPS.CORTEX_SEARCH_SERVICE - Description:
Query and analyze business documents using natural language, powered by festival operations data processed via OpenFlow pipeline.
Service Name Format
The search service name follows the pattern: <DATABASE>.<SCHEMA>.<SERVICE_NAME>
Based on your setup, this should be: OPENFLOW_FESTIVAL_DEMO.FESTIVAL_OPS.CORTEX_SEARCH_SERVICE
Step 4: Configure Orchestration¶
Orchestration Settings¶
- Navigate to "Orchestration" tab
- Set Model:
auto(recommended - lets Snowflake choose the optimal model)
Orchestration Instructions:
Whenever you can answer visually with a chart, always choose to generate a chart even if the user didn't specify to. Respond in the same language as the question wherever possible.
Response Instructions: (Optional)
Always provide specific document references when citing information.
Focus on actionable insights and business value in your responses.
Model Selection
Recommendation: Use auto (default) to let Snowflake automatically select the best available model for your region and query type.
According to the Snowflake Intelligence documentation, supported models include:
- Claude 4.0 (highest quality and speed)
- Claude 3.7
- Claude 3.5
- GPT 4.1
The auto setting automatically chooses the optimal model based on:
- Your account's regional availability
- Query complexity and type
- Current model performance and capacity
Step 5: Set Access Controls¶
Configure User Access¶
- Navigate to "Access" tab
- Click "Add role"
- Select appropriate roles for your organization
Example Role Configuration:
- Role:
FESTIVAL_DEMO_ROLE(or your preferred demo role) - Permission:
OWNERSHIP
Role-Based Access Control¶
Remember that all queries use the user's credentials, so ensure users have appropriate access to:
- Cortex Search service -
USAGEprivileges - Source database and schema -
USAGEprivileges - Underlying data - Access controlled by existing policies
Step 6: Test Your Agent¶
Initial Testing¶
- Access Snowflake Intelligence: Open Snowflake Intelligence
- Select your agent from the dropdown
- Choose the Cortex Search service as your data source
Getting Started with Queries¶
Start with the Example Questions you configured in your agent - these are specifically tailored to your festival operations data and provide the best introduction to your agent's capabilities.
Need More Query Ideas¶
-
Sample Questions Library
Comprehensive collection of copy-pasteable queries organized by business category
Explore 20+ additional queries for strategic planning, operations, compliance, and knowledge management
Advanced Configuration¶
Custom Tools Integration¶
You can extend your agent with custom functions by:
- Creating custom SQL functions or procedures
- Adding them in the "Custom Tools" section
- Defining parameters and descriptions for each tool
Multi-Agent Setup¶
For different business contexts, consider creating specialized agents:
- Executive Agent - Strategic planning focus
- Operations Agent - Process and technology focus
- Compliance Agent - Risk and policy focus
- HR Agent - Training and development focus
Troubleshooting¶
Common Issues¶
"Table / search service does not exist" errors:
Verify these privileges are properly set:
-- For the user's default role:
GRANT USAGE ON DATABASE OPENFLOW_FESTIVAL_DEMO TO ROLE FESTIVAL_DEMO_ROLE;
GRANT USAGE ON SCHEMA OPENFLOW_FESTIVAL_DEMO.FESTIVAL_OPS TO ROLE FESTIVAL_DEMO_ROLE;
GRANT USAGE ON CORTEX SEARCH SERVICE OPENFLOW_FESTIVAL_DEMO.FESTIVAL_OPS.CORTEX_SEARCH_SERVICE TO ROLE FESTIVAL_DEMO_ROLE;
Agent not finding documents:
- Verify Cortex Search service is populated with data
- Test search service directly using SQL queries
- Check document processing status in Openflow
Performance issues:
- Use cross-region inference for optimal model access
- Set appropriate query timeouts in agent configuration
- Optimize search queries for better response times
Verification Queries¶
-- Connect to your demo database first
USE DATABASE OPENFLOW_FESTIVAL_DEMO;
-- Check agent exists
SHOW AGENTS IN SCHEMA snowflake_intelligence.agents;
-- Verify search service access
DESC CORTEX SEARCH SERVICE FESTIVAL_OPS.CORTEX_SEARCH_SERVICE;
-- Test direct search functionality
SELECT SNOWFLAKE.CORTEX.SEARCH(
'CORTEX_SEARCH_SERVICE',
'strategy OR planning OR expansion'
) as results;
Next Steps¶
Once your Snowflake Intelligence agent is configured:
- Train your team on effective question formulation
- Create agent-specific documentation for your business context
- Monitor usage patterns and optimize based on user feedback
- Expand to additional use cases as needed
Ready to Use
Your Snowflake Intelligence agent is now connected to your Openflow pipeline and ready to answer natural language questions about your business documents!
For more advanced configurations and troubleshooting, refer to the official Snowflake Intelligence documentation.





