CertSafari
    Snowflake SnowPro Specialty: Gen AI (GES-C02)· Lessons

    Domain 1 · Lesson 2/15

    Cortex Analyst, Cortex Agents and external access

    Outline Gen AI capabilities in Snowflake.

    11 min read
    9% of exam
    5 sources
    Published 21 Oct 2026
    Docs as of 18 Oct 2026

    What you will be able to do

    • Explain how semantic views, their YAML specification, verified queries and custom instructions make Cortex Analyst's SQL accurate and governed
    • Describe the Cortex Agents plan, use-tools, reflect loop and the surfaces where users talk to agents
    • Explain how cross-region inference widens the set of models available to agents and Cortex Analyst, and its latency consideration
    • Match the Cortex REST APIs and the Snowflake-managed MCP server to the consumers that call them
    • Use the main Cortex Code CLI commands for interactive and CI/CD work

    1.Cortex Analyst and semantic views

    Cortex Analyst is Snowflake's managed text-to-SQL service. Business users ask questions in natural language and get answers from structured data without writing SQL. It is exposed as a REST API, so you can put it inside Streamlit apps, Slack, Teams or your own chat interface. The generated SQL runs in your own warehouse under your existing RBAC policies. For inference, the model sees only semantic metadata such as table names, column names and descriptions.

    A database schema alone does not tell a model what "active customer" means or how revenue should be summed. Semantic views fill that gap. They are schema-level objects that describe a business layer over your tables:

    • logical tables for business entities
    • dimensions for categorical context
    • facts for row-level quantities
    • metrics that aggregate facts into KPIs
    • relationships that fix the join paths

    Semantic views can be written in the YAML specification for semantic views or managed with SQL commands. Older semantic model YAML files kept on stages still work, but semantic views are the recommended approach for new work. Because they are native objects, semantic views bring RBAC, sharing, and public or private access modifiers on facts and metrics.

    Two features of a semantic view deal with inconsistent or off-limits answers. Verified queries pair sample questions with the SQL that answers them correctly. When an executive asks a recurring question, the generated SQL is steered toward the verified answer rather than a fresh guess each time. Custom instructions give Cortex Analyst guidance both for SQL generation and for question categorization. That categorization is where you tell it which kinds of question it should not answer.

    Checkpoint 1 of 7· Check yourself

    A finance team wants Cortex Analyst to politely decline any question about individual salaries instead of generating SQL for it. Which semantic view feature is the right place to say so?

    Sources1

    2.Cortex Agents and Snowflake Intelligence

    A Cortex Agent is a managed orchestrator that brings structured and unstructured data together in one governed workflow. Each request goes through a loop. The agent plans: it resolves ambiguity, splits the request into subtasks and picks a tool for each one. It then calls those tools, for example Cortex Analyst for structured data, Cortex Search for documents, or the code execution sandbox. Finally it reflects on the results, and either asks a clarifying question, calls another tool, or answers. Snowflake runs the loop, the runtime and the sandbox for you.

    An agent is a schema-level object that bundles four things: a model (Snowflake recommends auto), natural-language orchestration instructions, tools and resources. Besides Analyst and Search, the tools can include Data to Chart, custom tools built from stored procedures or UDFs, packaged skills, web search, and MCP connectors to remote servers such as Jira or Salesforce. Threads keep conversation context across turns, so the client application does not have to manage state. Tools decide what the agent can reach. An agent with no tools can still converse, but it answers only from the model's general knowledge.

    There are two ways to put an agent in front of people. Applications call it through the REST API. Users can also talk to agents directly in Snowflake's own interfaces, Snowflake CoWork and Cortex Code. The exam guide's name for the business-user chat experience over agents is Snowflake Intelligence, while the current documentation names the interface where users talk to agents directly Snowflake CoWork. Whichever name is used, agents run under the caller's privileges. If the caller's role cannot use some of an agent's tools, the run continues with the tools it can access.

    Checkpoint 2 of 7· Put it in order

    Put the stages of an agent's reasoning loop in the order they run for a single request.

    1. 1.Use tools: call the chosen tools, such as Cortex Analyst or Cortex Search
    2. 2.Reflect and respond: judge the results, then clarify, call another tool or answer
    3. 3.Plan: parse the request, split it into subtasks and choose a tool for each

    Sources2

    3.Cross-region inference and model availability

    Cross-region inference (CORTEX_ENABLED_CROSS_REGION) is the account parameter that lets Cortex send inference requests outside the account's home region. For capability planning, its effect is on availability: it decides which models and products your account can use at all. Setting it to ANY_REGION gives access to the full set of supported models and Cortex products.

    Agent models show this clearly. They run through cross-region inference, so a model's availability is listed by routing scope, not by region. A model such as claude-sonnet-4-5 is available to your account only if your configured scope is marked for it. Cortex Analyst runs natively in a fixed list of AWS and Azure regions. Accounts in other regions can still use it once cross-region inference is enabled, and Snowflake recommends routing to AWS US regions for the best performance. The trade-off is latency and residency: the prompt and response travel to the processing region while the request runs, although customer data is not persisted there.

    Checkpoint 3 of 7· Check yourself

    A compliance team requires every inference request to be processed in the account's home region, and accepts a narrower model selection. Which value of CORTEX_ENABLED_CROSS_REGION fits?

    Sources213

    4.Cortex REST APIs and the managed MCP server

    Outside Snowsight, Cortex capabilities are reached over HTTP. Each REST endpoint matches one capability, and every request needs an authorization token.

    Cortex REST endpoints and what each exposes
    EndpointWhat it exposes
    Cortex Analyst REST APINatural-language question in, SQL and an interpretation out, with conversation history passed in messages
    Cortex Search REST APIA query against a named search service, returning the requested columns
    agent:run (Cortex Agents Run API)One request to an agent, streaming events for its reasoning, tool calls and response, with threads for context

    The Model Context Protocol (MCP) is an open standard that lets AI agents discover and call tools in other systems. The Snowflake-managed MCP server makes Snowflake one of those systems, with no separate infrastructure to deploy. You configure it to serve Cortex Analyst, Cortex Search and Cortex Agents as tools, plus custom tools and SQL execution. Any MCP-compatible client can then discover and call them. Authentication uses Snowflake OAuth by default, with External OAuth as an option, and RBAC on the server and its tools controls who can discover and call each tool.

    MCP works in both directions, and the direction decides the integration. A third-party assistant that needs Snowflake data connects to the managed MCP server. A Cortex Agent that needs Jira connects outward through an MCP connector, and that request goes over the public internet. A web application you build yourself calls agent:run.

    Checkpoint 4 of 7· Check yourself

    A role has been granted access to a Snowflake-managed MCP server, yet its MCP client gets an error when invoking the Cortex Search tool on that server. What is the most likely cause?

    Sources24

    5.Cortex Code CLI commands

    Cortex Code is Snowflake's coding agent. Besides running in Snowsight, it ships as a CLI that you run from a terminal with the cortex command. There are two kinds of command. Subcommands and flags run from your shell, before or instead of an interactive session. Slash commands such as /mcp are typed inside a session.

    Common Cortex Code CLI invocations
    CommandWhat it does
    cortex -w /path/to/projectStarts a session with the given working directory
    cortex --continue -c productionResumes the last session using a named connection
    cortex -p "List all Python files" --output-format stream-jsonRuns a one-off prompt and returns JSON output
    cortex execRuns non-interactively for CI/CD; plan mode is disabled and interactive prompts are rejected
    cortex updateUpdates the CLI to the latest version (check with cortex --version)

    Tool approval is where the CLI can hurt you. --allowed-tools pre-approves specific tools, for example "Bash(git *)" for all git commands. --disallowed-tools stops tools from being offered to the model at all. Bypass mode (--bypass, also called --dangerously-allow-all-tool-calls) approves every tool call without asking. Use it only where you trust every action the agent might take.

    Checkpoint 5 of 7· Exam question

    Which practice best describes effective prompt design when calling AI_COMPLETE for a structured extraction task in Snowflake Cortex?

    Checkpoint 6 of 7· Exam question

    A team wants fuzzy, high-quality search over a support-documentation corpus without managing embedding infrastructure, index refreshes, or reranking logic themselves. Which Snowflake capability best fits?

    Checkpoint 7 of 7· Exam question

    An engineer is setting up a new Cortex Search service and needs to identify the privileges required across the team. Which of the following are genuine requirements? (Select all that apply.)(Select 3)

    0 of 3 selected

    Sources5

    Sources

    (5)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Available as a convenient REST API, Cortex Analyst can be seamlessly integrated into any application.”
      ↩︎ Cortex Analyst and semantic views
      “Semantic Views are schema-level objects that define business concepts, metrics, and relationships”
      ↩︎ Cortex Analyst and semantic views
      “Legacy semantic model YAML files (stored on stages) are still supported for backward compatibility, but Semantic Views are the recommended approach for new implementations.”
      ↩︎ Cortex Analyst and semantic views
      “Offering verified examples: Sample questions and their SQL answers guide query generation”
      ↩︎ Cortex Analyst and semantic views
      “Custom instructions: Provide guidance to Cortex Analyst for SQL generation and question categorization”
      ↩︎ Cortex Analyst and semantic views
      “For optimal performance, configure cross-region with AWS US regions.”
      ↩︎ Cross-region inference and model availability
      “Cortex Analyst processes requests in other regions for models that are not available in your default region.”
      ↩︎ Exam trap 2
    2. 2.
      “Plan: The agent parses the request and decides how to answer it.”
      ↩︎ Cortex Agents and Snowflake Intelligence
      “Threads maintain conversation context across turns, so your client application doesn’t have to manage state.”
      ↩︎ Cortex Agents and Snowflake Intelligence
      “users can interact with them in Snowflake CoWork and Cortex Code”
      ↩︎ Cortex Agents and Snowflake Intelligence
      “If the caller’s role can’t use every configured tool, the run can still continue with the tools it can access.”
      ↩︎ Cortex Agents and Snowflake Intelligence
      “These models run through cross-region inference, so availability is shown by cross-region routing scope”
      ↩︎ Cross-region inference and model availability
      “Integrate it into your application: Call the agent through the agent:run REST API, using threads to maintain conversation context.”
      ↩︎ Cortex REST APIs and the managed MCP server
      “Tools that reach external services, such as web search and MCP connectors, send requests over the public internet.”
      ↩︎ Cortex REST APIs and the managed MCP server
      “An agent with no tools configured can still hold a conversation, but it answers only from the language model’s general knowledge”
      ↩︎ Exam trap 1
      “To answer a request, an agent follows a reasoning loop with three steps:”
      ↩︎ Checkpoint
    3. 3.
      “Setting the parameter to ANY_REGION provides access to the full set of supported models and Cortex products”
      ↩︎ Cross-region inference and model availability
      “Your customer data is not persisted in the processing region.”
      ↩︎ Cross-region inference and model availability
      “Requests are processed only in your account’s home region.”
      ↩︎ Checkpoint
    4. 4.
      “configure the MCP server to serve Cortex Analyst, Cortex Search, and Cortex Agents as tools”
      ↩︎ Cortex REST APIs and the managed MCP server
      “Snowflake OAuth by default, with optional External OAuth”
      ↩︎ Cortex REST APIs and the managed MCP server
      “Access to the MCP Server does not give access to the tools. Permission needs to be granted for each tool.”
      ↩︎ Checkpoint
    5. 5.
      “Use exec to run CoCo CLI non-interactively, which is useful in continuous integration and continuous delivery (CI/CD) pipelines.”
      ↩︎ Cortex Code CLI commands
      “They are distinct from the slash commands (like /mcp) that you type inside an interactive session.”
      ↩︎ Cortex Code CLI commands
      “Bypass mode approves every tool call without prompting you first.”
      ↩︎ Cortex Code CLI commands

    Ready to test yourself?

    Practise the 31 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.