Deploying conversational interfaces across the enterprise helps scale self-serve data access, but it introduces a critical data governance challenge. To boost adoption and ensure system reliability, data expert teams must implement safeguards that guarantee the underlying models consistently return accurate, trustworthy answers rather than estimates.
Looker addresses this through “authored context,” a feature set designed to equip AI-powered data agents with essential business knowledge and operational guardrails.
This article outlines two pillars of authored context: System Instructions and Golden Queries. System Instructions define personas and organizational terminology, while Golden Queries provide the agent with precise context on answering frequent questions using specific models and metadata. Together, they allow developers to build internal analytics tools that users can trust.
Looker’s semantic layer remains the primary determinant of data reliability, even as you add Authored Context.
Consider this relationship:
- The Engine (Looker Model): This is your non-negotiable source of truth. It defines the dimensions, measures, and joins that constitute your business logic. Without a strong engine, even the best context cannot prevent unreliable results.
- The Expert Driver (Authored Context): System Instructions and Golden Queries act as a guidance system. They help the AI interpret natural language and business jargon to find the most accurate path through the data engine you have constructed.
Authored context’s purpose is to complement a strong model, bridging the final gap between your business’s unique language and the structured world of your data. A great Looker model remains the prerequisite for great conversational analytics.
For a more detailed in depth look on leveraging Golden Queries specifically for customer-facing embedded applications, be sure to check out our companion article, Golden Queries: The API-First Secret to Build Smarter Customer-Facing Analytics.
Layering on Context: System Instructions
With a strong Looker model foundation in place, you can add System Instructions. If you think of a Looker data agent as a new employee who has already studied your company’s org chart and financial reports (the model), then System Instructions are the onboarding session where you explain the company culture and unwritten rules.
The core components include:
- system_instruction: Defines the agent’s persona and primary function (e.g., “You are an expert sales analyst…”).
- glossaries: Defines business-specific terms, jargon, and abbreviations (e.g., what “Loyal Customer” means).
- additional_descriptions: A catch-all for other important instructions, like the typical user persona or default behaviors.
Here is how a system instruction structure looks like -
-system_instruction:str #Describe the expected behavior of the agent
-glossaries: #Define business terms, jargon, and abbreviations that are relevant to your use case
-glossary:
-term:str
-description:str
-synonyms:list[str]
-additional_descriptions: #List any additional general instructions
-text:str
Where do Golden Queries fit in?
A well-designed BI dashboard is a curated experience built to answer specific, critical questions. For example, a sales leader’s dashboard is designed to instantly answer questions like, “What are our top-selling products this quarter?” or “Which sales region is showing the most growth?”
Golden Queries operate on a similar principle, acting as pre-built logic behind each of those dashboard widgets. For every key question a dashboard is designed to answer, a BI developer should have already written and tested the perfect query to pull the correct data. Golden Queries are the expert-approved queries we curate for AI to ensure it can answer your most important questions with complete accuracy. When a user asks a critical question, the agent doesn’t have to guess or construct a query from scratch, but uses the Golden Query for that specific question to fetch the correct, deterministic answer, just as a BI dashboard would display a trusted metric.
For those looking to apply Golden Queries to customer-facing embedded apps, we recommend our companion piece, Golden Queries: The API-First Secret to Build Smarter Customer-Facing Analytics.
Here is what a golden query structure looks like
looker_golden_queries = [
{
"natural_language_questions": [
"{{primary_question}}",
"{{alternative_phrasing_1}}",
"{{alternative_phrasing_2}}"
],
"looker_query": {
"model": "{{looker_model_name}}",
"explore": "{{explore_name}}",
"fields": ["{{view_name}}.{{dimension_1}}", "{{view_name}}.{{dimension_2}}"],
"filters": [
{
"field": "{{view_name}}.{{filter_field}}",
"value": "{{filter_value}}"
}
],
"sorts": ["{{view_name}}.{{sort_field}} {{direction}}"],
"limit": "{{limit_count}}"
} } ]
How to Use System Instructions and Golden Queries
To gain the most value from System Instructions and Golden Queries, you will want to use them together, in conjunction with your Looker model.
Use System Instructions to:
- Define the agent’s persona and general rules.
- Establish a glossary of business terms.
- Set default behaviors for ambiguous situations.
Use Golden Queries to:
- Ensure deterministic, accurate answers for your most critical business questions.
- Teach complex logic that is hard to describe in words.
- Correct a pattern of misinterpretation for a specific question.
- Handle nuanced language and demonstrate correct filter values.
System Instructions provide your agent its core knowledge and Golden Queries train it to answer your most important questions with the same reliability as a trusted dashboard. For more information, please visit our documentation here.