# Use Sample Queries to Optimize Your Model for AI

**URL:** https://community.omni.co/t/use-sample-queries-to-optimize-your-model-for-ai/443
**Category:** Modeling
**Tags:** ai
**Created:** [February 11, 2026, 6:41pm UTC](https://community.omni.co/t/use-sample-queries-to-optimize-your-model-for-ai/443 "2026-02-11T18:41:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Averyrobins](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.omni.co/averyrobins/32/622_2.png) [@Averyrobins](https://community.omni.co/u/Averyrobins)
#### Post date: [February 11, 2026, 6:41pm UTC](https://community.omni.co/t/use-sample-queries-to-optimize-your-model-for-ai/443/1 "2026-02-11T18:41:46Z")

</div>

AI has generated a massive amount of hype in the BI world over the past several years, and rightfully so! Leveraging it against your company’s data can save time, money, and headaches. But there’s a catch: most AI-powered analytics don’t actually understand your business. Generic LLMs can generate SQL, but they don’t know what something like “revenue” really means at your company. This means queries run, but quietly return the wrong answers.

To avoid making decisions based on AI slop, companies should pair AI with a [semantic modeling layer](https://docs.omni.co/analyze-explore/sql/generation#semantic-model). A semantic modeling layer provides the context (metrics, dimensions, joins, & definitions) for the AI to understand your business and return reliable results. Omni is purpose-built for this pairing.

### Two Parameters that Optimize AI in Omni

There are two specific parameters in Omni’s model that help you get the most out of AI. First is the [`ai_context`](https://docs.omni.co/modeling/dimensions/parameters/ai-context#ai_context) parameter, and second is [`sample_queries`](https://docs.omni.co/modeling/topics/parameters/sample-queries). If you’d like templates for your ai\_context parameter, see our blog post here. This post focuses on Sample Queries.

### What are Sample Queries?

_[Sample queries](https://docs.omni.co/modeling/topics/parameters/sample-queries)_ are examples you add at the model or topic level to show Blobby (Omni’s AI) how your business typically retrieves data. These should be queries that are commonly run by your team– they’ll improve the quality of generated results.

### \*\*Sample Queries Topic-level Example

(Domain-specific facts + do’s and don’ts)\*\*

**Pro Tip:** You can save a workbook query as a sample query to a topic by clicking **Model \> Save as sample query to topic**.

Below are example queries from our own model that inform Blobby how to retrieve data:

> Active Trials:
> 
> query:
> 
> fields:
> 
> [
> 
> salesforce\_\_opportunity.name,
> 
> salesforce\_\_opportunity\_owner.name,
> 
> salesforce\_\_opportunity.lead\_solutions\_engineer,
> 
> salesforce\_\_opportunity.stage\_name,
> 
> salesforce\_\_opportunity.close\_date,
> 
> salesforce\_\_opportunity.i\_arr\_c
> 
> ]
> 
> base\_view: salesforce\_\_opportunity
> 
> filters:
> 
> salesforce\_\_opportunity.is\_closed:
> 
> is: false
> 
> salesforce\_\_opportunity.opp\_in\_trial:
> 
> is: true
> 
> limit: 1000
> 
> sorts:
> 
> - field: salesforce\_\_opportunity.close\_date
> 
> topic: salesforce\_\_opportunity
> 
> description: Show a list of all active trials
> 
> exclude\_from\_ai\_context: false
> 
> Deals Won This Quarter:
> 
> query:
> 
> fields:
> 
> [
> 
> salesforce\_\_opportunity.name,
> 
> salesforce\_\_opportunity\_owner.name,
> 
> salesforce\_\_opportunity.lead\_solutions\_engineer,
> 
> salesforce\_\_opportunity.close\_date,
> 
> salesforce\_\_opportunity.competitors\_c,
> 
> salesforce\_\_opportunity.data\_tools\_in\_use\_c,
> 
> salesforce\_\_opportunity.stage\_name,
> 
> salesforce\_\_opportunity.total\_iarr
> 
> ]
> 
> base\_view: salesforce\_\_opportunity
> 
> filters:
> 
> salesforce\_\_opportunity.is\_won:
> 
> is: true
> 
> salesforce\_\_opportunity.close\_date:
> 
> time\_for\_duration: [1 fiscal quarter ago, 1 fiscal quarter]
> 
> limit: 1000
> 
> sorts:
> 
> - field: salesforce\_\_opportunity.close\_date
> 
> desc: true
> 
> topic: salesforce\_\_opportunity
> 
> description: List of deals won in this fiscal quarter
> 
> exclude\_from\_ai\_context: false
> 
> Won iARR:
> 
> query:
> 
> fields: [salesforce\_\_opportunity.total\_iarr]
> 
> base\_view: salesforce\_\_opportunity
> 
> filters:
> 
> salesforce\_\_opportunity.is\_won:
> 
> is: true
> 
> limit: 1000
> 
> sorts:
> 
> - field: salesforce\_\_opportunity.total\_iarr
> 
> desc: true
> 
> topic: salesforce\_\_opportunity
> 
> description: how much iARR we’ve won across all time
> 
> prompt: "What is our total won iARR? "
> 
> ai\_context: use this when asked about our total iarr
> 
> Open Trials:
> 
> query:
> 
> fields:
> 
> [
> 
> salesforce\_\_opportunity.name,
> 
> salesforce\_\_opportunity\_owner.name,
> 
> salesforce\_\_opportunity.lead\_solutions\_engineer,
> 
> salesforce\_\_opportunity.stage\_name,
> 
> salesforce\_\_opportunity.close\_date,
> 
> salesforce\_\_opportunity.i\_arr\_c
> 
> ]
> 
> base\_view: salesforce\_\_opportunity
> 
> filters:
> 
> salesforce\_\_opportunity.is\_closed:
> 
> is: false
> 
> salesforce\_\_opportunity.opp\_in\_trial:
> 
> is: true
> 
> limit: 1000
> 
> sorts:
> 
> - field: salesforce\_\_opportunity.close\_date
> 
> topic: salesforce\_\_opportunity
> 
> prompt: Show me our open trials
> 
> hidden: true

Happy querying!
