System Prompt and Instruction Design · Topic 1 of 2
Building a Production Ready Genie Space
Databricks Context Engineer: pick Genie space instructions, sample questions, SQL expressions and trusted assets, then validate with benchmarks.
- 5 min
- Includes a diagram
- Curation elements: tables and views (up to 50), general instructions, sample questions, SQL expressions, example SQL, trusted assets, benchmarks.
- General instructions carry vocabulary and business rules; keep them short and focused.
- SQL expressions define measures, filters and dimensions with one fixed meaning.
What it is
A Genie space lets business users ask questions about data in natural language, and Genie answers by writing SQL over the tables you curate. Newer Databricks documentation calls it a Genie Agent; the exam uses Genie space.
Genie's context is the curation you give it: Unity Catalog tables and views, general instructions, sample questions, SQL expressions and trusted assets. A space is production ready when each element does its own job and a benchmark set shows the answers are accurate.
How it works
The curation elements

| Element | What it is | Use it for |
|---|---|---|
| Unity Catalog tables and views | Up to 50 per space; start small, the docs suggest five or fewer | The data Genie can query; table and column comments describe it |
| General instructions | Free text guidance | Domain vocabulary and business rules, such as "MRR means monthly recurring revenue" |
| Sample questions | Example questions shown to users on the space | Showing users what they can ask |
| SQL expressions | Named measures, filters and dimensions | Business terms with one fixed SQL definition, such as "active customer" |
| Example SQL queries | Questions paired with correct SQL | Teaching Genie how to handle common or complex questions |
| Trusted assets | Parameterized example SQL queries and Unity Catalog SQL functions | High stakes, repeated questions; their answers carry the Trusted label |
| Benchmarks | Questions with reviewed correct answers | Measuring accuracy before and after changes |
Genie does not use volumes or whole catalogs. It works from the specific tables and views you add, so keep the set focused on the domain.
Matching the element to the symptom
| Symptom in validation | Most direct fix |
|---|---|
| Genie misreads domain terms ("the enterprise segment", "MRR", "churned") | Add general instructions that define the vocabulary |
| A metric is calculated differently each time | Define it once as a SQL expression |
| A complex join or regulatory report comes out wrong | Add an example SQL query, or a trusted asset when the answer must be certified |
| Genie picks the wrong table or column | Improve table and column comments in Unity Catalog, remove overlapping tables |
| Users do not know what to ask | Add sample questions |
Sample questions do not teach Genie terminology. They guide users, so they are the wrong fix when the problem is how Genie interprets a word.
Databricks advises keeping text instructions limited and focused, because too many reduce their effectiveness in longer conversations. Where a term has one exact calculation, prefer a SQL expression or example SQL, since structured definitions are more reliable and easier to maintain.
Trusted assets
A trusted asset is a parameterized example SQL query or a Unity Catalog SQL function that you have checked. When Genie answers with one, the answer carries the Trusted label, telling the user a curated query produced it.
CREATE FUNCTION finance.treasury.desk_exposure(desk STRING)
RETURNS TABLE (trade_date DATE, exposure DOUBLE)
COMMENT 'Daily exposure for one desk, by trade date'
RETURN SELECT trade_date, SUM(notional)
FROM finance.treasury.trades
WHERE business_unit = desk GROUP BY trade_date;
Use trusted assets for the few questions where a wrong answer is costly. They do not cover open ended questions, so the rest of the space still needs instructions and good metadata.
Validating with benchmarks
A benchmark set is a list of realistic questions, each with a reviewed correct answer. Run it before release and after every curation change, and compare accuracy instead of judging from a few manual chats.
Worked example: a benchmark of 40 questions scores 28 correct (70%). Nine failures are vocabulary misreadings and three involve one quarterly report. You add four lines of general instructions, the rerun scores 37 of 40 (about 93%), and the quarterly report behind the remaining three failures becomes a trusted asset.
Change one element at a time. If you add instructions, examples and new tables together, you cannot tell which change helped or hurt.
How the exam asks about this
- "Genie answers numbers correctly but does not understand the team's jargon." Add general instructions that define the vocabulary.
- "Regulatory figures must come only from a reviewed query, with a visible marker." Register a trusted asset, a parameterized query or Unity Catalog SQL function, so answers show the Trusted label.
- "How should the team confirm the space is ready for production?" Run a benchmark set of reviewed questions and track accuracy across changes.
What to remember for the exam
- Curation elements: tables and views (up to 50), general instructions, sample questions, SQL expressions, example SQL, trusted assets, benchmarks.
- General instructions carry vocabulary and business rules; keep them short and focused.
- SQL expressions define measures, filters and dimensions with one fixed meaning.
- Trusted assets are parameterized example SQL queries and Unity Catalog SQL functions; their answers carry the Trusted label.
- Sample questions guide users; they do not teach Genie terminology.
- Validate with benchmarks, changing one element at a time.
Do not add volumes or a whole catalog to fix missing data. Genie works only from the specific Unity Catalog tables and views in the space, and adding many overlapping tables makes wrong table choices more likely.
Common mistakes
Fixing vocabulary with sample questions. Sample questions are prompts for users, not definitions for Genie. Define the terms in general instructions, or as SQL expressions when they map to one calculation.
Making everything a trusted asset. Trusted assets cover a few well known questions. Users still ask open questions, which depend on metadata, instructions and expressions.
Validating by chatting. A handful of manual questions hides regressions. A benchmark set with reviewed answers gives an accuracy number you can compare after each change.
Check yourself
Genie treats "the enterprise segment" as a table name instead of a filter on the customer segment column. What should you add?
General instructions that explain the term means a filter on the customer segment column, so Genie interprets the phrase correctly.
Which objects can act as trusted assets?
Parameterized example SQL queries and Unity Catalog SQL functions, whose answers carry the Trusted label.
How do you prove a curation change improved the space?
Rerun the benchmark set and compare accuracy before and after, changing only one element at a time.
Topic 1 of 2 in System Prompt and Instruction Design
Test yourself on System Prompt and Instruction Design
The full Databricks Context Engineer Associate question bank has 600 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Databricks. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.