Skip to main content

Build your context repository Private Preview

This guide walks you through creating a context repository, generating an initial semantic model from your catalog, and refining definitions until the model reflects how your business thinks.

Setup, configuration, and deployment steps differ between Snowflake Cortex Analyst and Databricks Genie. Engine-specific differences are called out throughout this guide.

Prerequisites

Before you begin, make sure:

  • Context Engineering Studio is enabled on your workspace and your team has the CES persona. See Enable Context Engineering Studio.
  • The Atlan service account has the required permissions granted on your query engine.
  • You've identified a domain to start with. Start narrow. A good first context repository covers a popular dashboard with high query volume. Pick an accessible domain expert who can confirm whether answers are correct, then expand to adjacent domains as separate repositories.

Connect your query engine

Before building a context repository, you need to connect Context Engineering Studio to your query engine. This is a one-time step per workspace. Once connected, you can create multiple context repositories without reconnecting.

  1. In Context Engineering Studio, click Configure in the top navigation.

  2. Under Snowflake Connection, click Connect. CES supports one Snowflake connection per workspace. If a connection is already configured, remove it before adding a new one.

  3. Select your Snowflake connection from the list of available Atlan connectors.

  4. Select the Warehouse CES uses to execute queries.

  5. Enter the Target database and Target schema where semantic views are deployed.

  6. Click Run preflight check. CES verifies authentication, warehouse access, schema access, CREATE SEMANTIC VIEW, and Cortex Analyst access.

  7. Fix any failing grant and click Re-run until the preflight passes, then click Save.

Create context repository

  1. In the Context Engineering Studio chat window, describe your domain and the types of questions your repository must answer.

    Example:

    Build a context repository for the Sales domain to analyze pipeline performance and revenue.

    For more precise control, you can specify which assets to include or exclude:

    Build a context repository for the Sales domain. Use tables like invoice, customer, and order_summary.
    Don't include temp_sales_staging or archived_transactions.
  2. CES automatically selects the most relevant assets from your catalog, configures columns and relationships based on your description, and generates the semantic model with metrics, filters, and business logic. You can refine your asset selection further through the chat window at any time.

  3. Once complete, your repository appears in the right pane with the following structure:

    • model.yaml — Core semantic model configuration with metrics, filters, and relationships
    • assets/ — Core data assets including metrics, filters, custom instructions, skills, and Python scripts for logic
    • references/ — Business definitions and domain documentation (glossary, asset definitions)
    • sub-skills/ — Domain-specific skill extensions for specialized analytical tasks
    • knowledge/ — Business context, glossary terms, and user personas

Next steps