Snowflake-Labs/sfguide-supply-chain-assistant-with-snowflake-intelligence
Python
Captured source
source ↗Snowflake-Labs/sfguide-supply-chain-assistant-with-snowflake-intelligence
Language: Python
License: MIT
Stars: 1
Forks: 13
Open issues: 1
Created: 2025-10-29T15:29:57Z
Pushed: 2025-11-21T18:09:05Z
Default branch: main
Fork: no
Archived: no
README:
Supply Chain Assistant with Snowflake Intelligence
Solution Overview
Modern supply chain operations face a critical challenge: efficiently managing raw material inventory across multiple manufacturing facilities. Operations managers must constantly balance inventory levels, deciding whether to transfer materials between plants with excess and shortage, or purchase new materials from suppliers. Making these decisions manually is time-consuming, error-prone, and often results in suboptimal cost outcomes.
This quickstart demonstrates how to build an intelligent supply chain assistant using Snowflake Intelligence and Cortex AI capabilities. By combining natural language querying with semantic search over both structured and unstructured data, you'll create a complete solution that helps operations managers make data-driven decisions about inventory management.
Here is a summary of what you will be able to learn by following this quickstart:
- Setup Environment: Create a comprehensive supply chain database with tables for manufacturing plants, inventory, suppliers, customers, orders, shipments, and weather data
- Cortex Analyst: Build semantic models for supply chain operations and weather forecasts that enable natural language text-to-SQL queries
- Cortex Search: Index unstructured supply chain documentation for intelligent retrieval using RAG (Retrieval Augmented Generation)
- Custom Tools: Integrate web search, web scraping, HTML generation, and email capabilities into your AI agent
- Snowflake Intelligence: Create a comprehensive AI agent with 7 tools that intelligently routes user questions and combines multiple data sources
- Advanced Analytics: Perform complex multi-domain analysis including supply chain optimization, weather impact analysis, and external research
The Problem

Supply chain operations managers face daily challenges managing raw material inventory across manufacturing facilities:
- Inventory Imbalances: Some plants have excess raw materials while others face shortages, creating inefficiency
- Complex Decision Making: Determining whether to transfer materials between plants or purchase from suppliers requires analyzing multiple factors including material costs, transport costs, lead times, and safety stock levels
- Manual Analysis: Traditional approaches require running multiple reports, spreadsheet analysis, and manual cost comparisons
- Time Sensitivity: Inventory decisions need to be made quickly to avoid production delays or excess carrying costs
The Solution

This solution leverages Snowflake Intelligence and Cortex AI capabilities to create an intelligent assistant that:
1. Answers Ad-Hoc Questions: Operations managers can ask natural language questions about inventory levels, orders, shipments, and supplier information - the agent automatically converts questions to SQL and executes them 2. Provides Contextual Information: The assistant can search and retrieve relevant information from supply chain documentation using semantic search 3. Intelligent Routing: Automatically determines whether to query structured data (via Cortex Analyst) or search documents (via Cortex Search) based on the nature of the question 4. Complex Analysis: Handles sophisticated multi-table queries like identifying plants with low inventory alongside plants with excess inventory of the same materials, and comparing costs between suppliers and inter-plant transfers 5. No-Code Agent Creation: Build and deploy the entire solution using Snowflake Intelligence's visual interface without writing application code
What is Snowflake Cortex?
Snowflake Cortex provides fully managed Generative AI capabilities that run securely within your Snowflake environment and governance boundary. Key features include:
Cortex Analyst - Enables business users to ask questions about structured data in natural language. It uses a semantic model to understand your data and generates accurate SQL queries automatically.
Cortex Search - Provides easy-to-use semantic search over unstructured data. It handles document chunking, embedding generation, and retrieval, making it simple to implement RAG (Retrieval Augmented Generation) patterns.
Cortex Agents - Orchestrates multiple AI capabilities (like Analyst and Search) to intelligently route user queries to the appropriate service and synthesize responses.
Learn more about Snowflake Cortex.
What is Snowflake Intelligence?
Snowflake Intelligence is a unified experience for building and deploying AI agents within Snowflake. It provides:
- No-Code Agent Builder: Create agents that combine multiple tools (Cortex Analyst, Cortex Search, Custom Tools) without writing code
- Integrated Tools: Easily connect your semantic models and search services as agent capabilities
- Conversational Interface: Interact with your agent through a chat interface within Snowsight
- Enterprise Ready: Built on Snowflake's security and governance foundation
Learn more about Snowflake Intelligence.
What You Will Learn
- How to model a multi-tier supply chain in Snowflake with proper relationships
- How to create semantic models for Cortex Analyst with dimensions, measures, and verified queries
- How to set up Cortex Search services on unstructured documents
- How to build comprehensive AI agents using Snowflake Intelligence
- How to combine multiple semantic models in a single agent for cross-domain analysis
- How to integrate custom tools (functions and stored procedures) into your agent
- How to enable web search and scraping capabilities within your AI assistant
- How to write effective tool descriptions and semantic models for accurate AI responses
- How to handle complex analytics questions that span multiple data sources
What You Will Build
- A comprehensive supply chain database with 11 tables and realistic sample data
- Two semantic models: one for supply chain…
Excerpt shown — open the source for the full document.
Notability
notability 2.0/10Routine guide with minimal traction