CertSafari
    Databricks Certified Context Engineer Associate· Lessons

    Domain 2 · Lesson 8/45

    Genie Space Configuration: Instructions, Example SQL and Trusted Assets

    Given a business domain, select and validate the instructions, sample questions, and trusted SQL assets that together produce a production-ready Genie space.

    17 min read
    2.25% of exam
    5 sources
    Published 3 Oct 2026
    Docs as of 30 Sep 2026

    What you will be able to do

    • List the Unity Catalog, warehouse and permission requirements for creating and editing a Genie space (now called a Genie Agent)
    • Scope a business domain into a small, well-annotated set of tables for one audience
    • For each piece of business knowledge, choose a SQL expression, an example SQL query, a SQL function or a text instruction
    • Write example SQL queries and parameterized trusted assets that Genie can match and verify
    • Structure text instructions for clarification questions and summaries without conflicts
    • Test a space before sharing it, telling apart the assets that teach Genie from the ones that only measure it

    Key concept

    Structured context over prose — A Genie space learns your business best from structured assets: annotated tables, SQL expressions and example SQL queries. Use plain-text instructions only for global guidance that SQL cannot express. Every configuration choice in this lesson follows from that ranking.

    1.Before you curate: data, compute and permissions

    The exam says "Genie space". The current documentation says "Genie Agent" and notes that Genie Agents were formerly known as Genie Spaces. Both names refer to the same object. Databricks describes it as a natural-language chat interface. Data analysts configure it with Unity Catalog data, example SQL queries, instructions and trusted assets, and business users then question it through the chat UI.

    Before you add any instructions, the space has hard requirements. All of its data must be registered to Unity Catalog. That includes managed, external and foreign tables, views, metric views and materialized views. A space can hold up to 50 tables, views or metric views. It also needs a pro or serverless SQL warehouse, and Databricks recommends serverless for the best performance.

    What an author needs to create or edit a Genie Agent
    RequirementWhat it covers
    Databricks SQL workspace entitlementRequired to create or edit an agent
    CAN USE on a pro or serverless SQL warehouseSelecting the compute that runs Genie's generated SQL
    SELECT privileges on the dataReading the tables and views used in the agent
    At least CAN EDIT on the Genie AgentEditing the agent; creators automatically get CAN MANAGE

    Credentials work in two ways, and exam questions often test the difference. When you save a warehouse, your compute credentials are embedded in the space so every user can reach that warehouse. Those embedded credentials cover the warehouse only. Data access is always checked against each end user's own Unity Catalog permissions. If another author later changes the warehouse, their credentials are embedded instead. Genie also relies on partner-powered AI features, which must be enabled at both the account and workspace levels.

    Checkpoint 1 of 9· Check yourself

    An analyst with CAN EDIT on a Genie space switches its default warehouse. A business user who has no SELECT on one of the space's tables then asks a question about that table. What happens?

    Sources1

    2.Scope the domain: one audience, few tables, good metadata

    Selecting assets for a business domain starts with deciding who the space serves. The documentation says to define the audience and purpose first, because that choice determines which data, instructions and test questions belong in the space. Treat 50 tables as a ceiling, not a target. The guidance is to start as small as possible and aim for five or fewer tables. Limit the columns too, and hide any column that is confusing or unimportant. If the topic seems to need many tables, pre-join them into views or metric views. Metric views work especially well because they pre-define metrics, dimensions and aggregations.

    Genie writes SQL from Unity Catalog column names and descriptions, so the metadata on those tables is your first set of instructions. Descriptions should be precise and contextual. If you use AI-generated descriptions, check them for accuracy and keep them only if they match what you would have written yourself. You can also add column synonyms and custom descriptions inside the space. That metadata applies only to the space and doesn't overwrite what is stored in Unity Catalog.

    Checkpoint 2 of 9· Check yourself

    A domain seems to need more than 50 tables. According to the documentation, what should the curator do before adding data to the space?

    Choosing data is therefore a decision about attachment. Anything Genie needs must be listed under the space's Sources, and attaching a source still leaves access governed by each user's Unity Catalog permissions. If you skip this decision and ask Genie Code to build the space from a description of your domain, it identifies relevant data and confirms the sources with you before building.

    Sources2

    3.Pick the right home for each piece of business knowledge

    With the data scoped, the next decision is where each business rule should live. The documentation ranks the options. Use SQL expressions in the knowledge store for frequently used metrics, filters and dimensions, such as revenue or gross margin. Use complete example SQL queries for hard-to-interpret, multi-part or complex questions. Use SQL functions registered in Unity Catalog for logic that a static or parameterized query cannot capture. Use text instructions only as a last resort, for guidance that genuinely needs natural language, and never for metrics, filters or query patterns that SQL can express.

    The ranking matters because instructions compete with each other. Genie performs best with a limited, focused set of instructions, and too many can reduce effectiveness, especially in longer conversations. Each space also has two separate budgets, and the exam may ask which asset counts against which.

    Asset types, when to use them, and which per-space limit they count toward
    AssetUse it forCounts toward
    SQL expressions (measures, filters, dimensions)Standard business terms and metrics200 knowledge store snippets
    Table descriptions and join relationshipsWhat the data means and how tables JOIN200 knowledge store snippets
    Example SQL queriesCommon or complex questions, matched by title100 instructions (each query is one)
    SQL functionsComplex logic a static or parameterized query cannot capture100 instructions (each function is one)
    General text instructionsGlobal context that fits no other format100 instructions (the whole block is one)

    The snippet limit has explicit exclusions. Text instructions, example SQL queries, SQL functions, column descriptions and prompt matching settings don't count toward the 200 knowledge store snippets. Prompt matching is added automatically when you attach tables. It matches user wording to actual column values and corrects spelling, and you can choose which columns it is enabled on.

    Checkpoint 3 of 9· Match them up

    Match each business need to the asset the documentation recommends

    Tap a term, then the definition that fits it.

    Checkpoint 4 of 9· Exam question

    A context engineer is registering Unity Catalog tables and views into a new Genie space for a finance analytics team. What is the maximum number of tables or views that can be added to a single Genie space?

    Sources23

    4.Example SQL queries and trusted assets

    Databricks recommends example SQL queries as the main way to give a space instructions. Each one pairs a question with the SQL that answers it. Use the most typical way a user would phrase the question as its title, because the title is what Genie matches incoming prompts against. When a question matches, Genie can use the example directly. When a question is only similar, Genie borrows the example's structure. Pick examples that show logic unique to your organization, such as which opportunities count as pipeline.

    You don't have to write every example yourself. When you attach data, Genie searches for popular workspace queries on those assets that you have at least CAN VIEW on. It offers them in a Review Suggested Queries dialog, where you accept or reject each one, and accepted queries become fully editable. Genie doesn't suggest queries on tables that aren't attached. If you built a dedicated view for the space, queries that ran against the original source tables won't show up. Queries that only perform basic writes are also skipped.

    Trusted assets are the subset that gives users a verified answer. There are two kinds: parameterized example SQL queries and SQL functions registered in Unity Catalog. A parameter is added with a colon followed by a name (such as :parameter_name). It has a data type (String, Date, Date and Time, Decimal or Integer) and a comment that helps Genie pick the right value. Choose the type carefully, because a value that doesn't match the type can lead to inaccurate results. SQL functions handle logic too complex for a query. Genie cannot view or modify the SQL inside them, and users need EXECUTE on any function used as a trusted asset. You can also add usage guidance to an example to tell Genie when it is particularly relevant.

    Checkpoint 5 of 9· Check yourself

    When does a Genie response come back as a verified answer?

    Checkpoint 6 of 9· Exam question

    A retail analytics team is finalizing compute settings before promoting their Genie space to production. Which SQL warehouse configuration satisfies the requirement for a Genie space, and which type does Databricks recommend for the best experience?

    Sources31

    5.Text instructions: global, specific and consistent

    After SQL has covered what it can, what remains goes in text instructions. General text instructions apply to every prompt. If a rule only matters for some questions, put it in an example query, a function or table metadata instead. Typical general instructions are company facts like a fiscal calendar, plus formatting rules. You can write them as one note or group them by topic, as in this documented example:

    Example general instructions: company-specific facts and formatting rulesmarkdown
    - **Company-specific business information**:
      - Fiscal year starts in February, for example fiscal year 26 or FY26 is February 1, 2026 through January 31, 2027
    - **Formatting**:
      - Always respond in Spanish
      - If no other specification exists, round all decimals to two places
      - Omit commas in results for any column including "Id" or "id" or "\_id"

    Clarification instructions follow a fixed shape. First state the trigger (the topic), then the missing details, then the required action (Genie must ask first), and finally the exact question to ask. Put clarification instructions at the end of the general instructions so Genie gives that behavior priority.

    Summaries have their own rules. To customize the natural-language summaries that accompany results, add a section at the end titled "Instructions you must follow when providing summaries", for example to cite the tables and columns used or to state the date range. Only text instructions affect summaries. SQL examples and SQL expressions don't, and summary length and detail level can't be controlled.

    Instructions must also agree with each other. Genie is nondeterministic, so conflicting guidance raises the risk of bad answers, and reviewing for inconsistencies is a key setup task. If the text says to round to two decimals, every example query must round to two decimals as well.

    Checkpoint 7 of 9· Put it in order

    Put the parts of a clarification instruction in the order the documentation gives them

    1. 1.Trigger condition: the topic, e.g. "When users ask about sales performance breakdown..."
    2. 2.Example clarification: "Please specify the time range and sales channel you are looking for."
    3. 3.Required action: "...you must ask a clarification question first..."
    4. 4.Missing details: "...but don't include time range, sales channel, or which KPIs..."

    Sources32

    6.Validate before you share: be the first user

    A space is ready for production only after you have tested it. Databricks recommends adding example SQL, instructions and knowledge store configuration before sharing, and making yourself the space's first user. Ask realistic questions, open Show code, and read the generated SQL. If Genie gets it wrong, anyone with CAN EDIT or higher can fix the SQL, run it, and click Add as instruction to save the question and SQL as a new example query. Genie Code can also find the cause of a wrong answer and propose context changes for you to accept or reject.

    No. Benchmarks are for evaluation only. Genie doesn't use benchmark questions or their SQL to improve its context, so a question you want Genie to learn from must be saved as an instruction (an example query). Three kinds of "sample question" are easy to mix up. Common questions are optional prompts shown on the chat landing page, and author-defined ones appear before auto-generated ones. Example query titles are what Genie matches prompts against. Benchmark questions only measure accuracy.

    After launch, validation continues. User feedback (Yes, Fix it, Request review) doesn't change Genie's behavior by itself. It points you to what to fix. Users with CAN MANAGE review flagged responses and use the Monitor tab to filter questions by time, rating, user or status. They can also run Analyze Agent Usage to surface recurring issues. Treat the space as an ongoing collaboration that builds up knowledge over time, not a one-time deployment.

    Checkpoint 8 of 9· Check yourself

    Genie answered a question wrongly, and an editor corrected the SQL. Which action makes Genie answer similar questions correctly in future?

    Checkpoint 9 of 9· Exam question

    During review of a Genie space for the HR domain, an engineer finds that ambiguous columns like `status_cd` have no description and business acronyms like "FTE" are never mapped to their meaning. Business users keep phrasing questions that Genie cannot resolve to the correct column. Following the recommended configuration hierarchy, what should the engineer prioritize fixing first?

    Sources2145

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.Text instructions are the primary way to teach a Genie space your metrics and filters.Why is that wrong?

      Text instructions are a last resort. Metrics and filters belong in SQL expressions, and complex questions in example SQL queries.

      Covered in Pick the right home for each piece of business knowledge

    2. 2.Example SQL queries and text instructions use up the 200-snippet knowledge store limit.Why is that wrong?

      Example queries, SQL functions and the general instructions block count toward the separate 100-instruction limit. Only table descriptions, join relationships and SQL expressions count toward the 200 snippets.

      Covered in Pick the right home for each piece of business knowledge

    3. 3.Naming a table in the instructions is enough for Genie to query it.Why is that wrong?

      Genie queries only sources attached to the space, whatever the instructions or metadata mention.

      Covered in Scope the domain: one audience, few tables, good metadata

    4. 4.Adding benchmark questions with correct SQL teaches Genie to answer them.Why is that wrong?

      Benchmarks only measure accuracy. To teach Genie, save the question and SQL as an example query.

      Covered in Validate before you share: be the first user

    5. 5.Any example SQL query Genie learns from produces a verified answer.Why is that wrong?

      Verified answers come only from trusted assets: parameterized example queries whose exact text is used in chat mode, and Unity Catalog SQL functions.

      Covered in Example SQL queries and trusted assets

    Sources

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

    1. 1.
      “Genie Agents were formerly known as Genie Spaces.”
      ↩︎ Before you curate: data, compute and permissions
      “You can add up to 50 tables, views, or metric views to a Genie Agent.”
      ↩︎ Before you curate: data, compute and permissions
      “Genie Agents require a pro or serverless SQL warehouse.”
      ↩︎ Before you curate: data, compute and permissions
      “Genie Agent creators automatically have CAN MANAGE permissions on agents they create.”
      ↩︎ Before you curate: data, compute and permissions
      “Data access is always evaluated using each end user's own Unity Catalog permissions.”
      ↩︎ Before you curate: data, compute and permissions
      “Genie does not suggest queries on tables that are not added to the agent.”
      ↩︎ Example SQL queries and trusted assets
      “Before sharing the agent with users, Databricks recommends adding example SQL queries, instructions, and knowledge store configurations to improve response accuracy.”
      ↩︎ Validate before you share: be the first user
      “Author-defined common questions take priority and appear first.”
      ↩︎ Validate before you share: be the first user
      “Genie does not query tables or Unity Catalog functions that are not attached, even if the agent's instructions or metadata reference them.”
      ↩︎ Exam trap 3
      “These embedded credentials grant access to the warehouse only.”
      ↩︎ Checkpoint
      “Genie does not query tables or Unity Catalog functions that are not attached, even if the agent's instructions or metadata reference them.”
      ↩︎ Prediction
    2. 2.
      “An agent should answer questions for a particular topic and audience, not general questions across various domains.”
      ↩︎ Scope the domain: one audience, few tables, good metadata
      “Inspect any AI-generated descriptions for accuracy and clarity”
      ↩︎ Scope the domain: one audience, few tables, good metadata
      “This metadata is scoped to your Genie Agent and does not overwrite metadata stored in Unity Catalog.”
      ↩︎ Scope the domain: one audience, few tables, good metadata
      “Use text instructions only as a last resort”
      ↩︎ Pick the right home for each piece of business knowledge
      “Too many instructions can reduce effectiveness, especially in longer conversations”
      ↩︎ Pick the right home for each piece of business knowledge
      “Add clarification question instructions at the end of your general instructions”
      ↩︎ Text instructions: global, specific and consistent
      “Only text instructions affect summary generation.”
      ↩︎ Text instructions: global, specific and consistent
      “if text instructions specify rounding decimals to two digits, then example SQL queries must also round to two digits.”
      ↩︎ Text instructions: global, specific and consistent
      “You should be your agent's first user.”
      ↩︎ Validate before you share: be the first user
      “Structured definitions through SQL are more reliable and maintainable than plain text guidance.”
      ↩︎ Key concept
      “Avoid using text instructions to define metrics, filters, or query patterns that can be expressed through SQL.”
      ↩︎ Exam trap 1
      “prejoin related tables into views or metric views before adding them to your agent”
      ↩︎ Checkpoint
      “Use example SQL queries for complex questions”
      ↩︎ Checkpoint
      “When users ask about sales performance breakdown but don't include time range, sales channel, or which KPIs in their prompt”
      ↩︎ Checkpoint
    3. 3.
      “Each example SQL query, each SQL function, and the entire General instructions text block each count as one instruction.”
      ↩︎ Pick the right home for each piece of business knowledge
      “use the most typical phrasing of the user's question as the title”
      ↩︎ Example SQL queries and trusted assets
      “Genie cannot view or modify the SQL used in the function”
      ↩︎ Example SQL queries and trusted assets
      “Agent users must have EXECUTE permission on any SQL functions used as trusted assets.”
      ↩︎ Example SQL queries and trusted assets
      “If the input value does not match the selected type, Genie treats it as the incorrect type, which can lead to inaccurate results.”
      ↩︎ Example SQL queries and trusted assets
      “Text instructions are only for context that should be applied globally and do not fit into the other formats.”
      ↩︎ Text instructions: global, specific and consistent
      “Text instructions, example SQL queries, SQL functions, column descriptions, and prompt matching settings do not count toward this limit.”
      ↩︎ Exam trap 2
      “In chat mode, when the exact text of a parameterized query is used in a response, Genie provides a verified answer.”
      ↩︎ Exam trap 5
      “In chat mode, when the exact text of a parameterized query is used in a response, Genie provides a verified answer.”
      ↩︎ Checkpoint
    4. 4.
      “Unlike instructions, benchmarks are for evaluation only.”
      ↩︎ Validate before you share: be the first user
      “Genie does not use benchmark questions or SQL to improve its context.”
      ↩︎ Exam trap 4
    5. 5.
      “Your Genie Agent's behavior does not change based on user feedback alone.”
      ↩︎ Validate before you share: be the first user
      “Then, you can save it as an instruction to teach Genie how to answer in the future.”
      ↩︎ Checkpoint

    Ready to test yourself?

    Practise Databricks Certified Context Engineer Associate in quiz mode.

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