npx skills add ...
npx skills add exploreomni/omni-cursor-plugin --skill omni-ai-optimizer
npx skills add exploreomni/omni-cursor-plugin --skill omni-ai-optimizer
Optimize your Omni Analytics model for Blobby, Omni's AI assistant — configure ai_context, ai_fields, sample_queries, and create AI-specific topic extensions. Use this skill whenever someone wants to improve AI accuracy in Omni, make Blobby smarter, configure AI context, add example questions, tune AI responses, set up sample queries, curate fields for AI, create AI-optimized topics, troubleshoot why Blobby gives wrong answers, or any variant of "make the AI better", "Blobby isn't answering correctly", "add context for AI", "optimize for AI", or "teach the AI about our data".
Optimize your Omni semantic model so Blobby (Omni's AI assistant) returns accurate, contextual answers.
Tip: Use
omni-model-explorerto inspect current AI context before making changes.
Requires Modeler or Connection Admin permissions.
When unsure whether an endpoint or parameter exists, fetch the OpenAPI spec:
Use this to verify endpoints, available parameters, and request/response schemas before making calls.
Blobby generates queries by examining:
synonyms — alternative names for fieldsai_context — explicit instructions you writeai_fields — which fields are visible to AIsample_queries — example questions with correct querieshidden: true fields are excludedImpact order: ai_context > ai_fields > sample_queries > synonyms > field descriptions.
Add via the YAML API:
Terminology mapping — map business language to field names:
Data nuances — explain what isn't obvious from field names:
Behavioral guidance — direct common patterns:
Persona prompting — set the analytical perspective:
Reduce noise for large models:
Same operators as topic fields: wildcard (*), negation (-), tags (tag:).
Teach Blobby by example. Build the correct query in a workbook, retrieve its structure, then add to the topic YAML:
Focus on questions users actually ask — check Analytics > AI usage in Omni.
Create a curated topic variant for Blobby using extends:
Good descriptions help both Blobby and human analysts.
Map alternative names, abbreviations, and domain-specific terminology so Blobby matches user queries to the correct field. Works on both dimensions and measures.
Synonyms vs ai_context: Use synonyms for field-level name mapping. Use ai_context for topic-level behavioral guidance, data nuances, and multi-field relationships.
omni-model-explorerai_context mapping business terms to fieldssynonyms to key dimensions and measuresai_fields to remove noisesample_queries for top 3-5 questionsdescription valuesextends for AI-specific topic variantscurl -L -X POST "$OMNI_BASE_URL/api/v1/models/{modelId}/yaml" \
-H "Authorization: Bearer $OMNI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fileName": "order_transactions.topic",
"yaml": "base_view: order_items\nlabel: Order Transactions\nai_context: |\n Map \"revenue\" → total_revenue. Map \"orders\" → count.\n Map \"customers\" → unique_users.\n Status values: complete, pending, cancelled, returned.\n Only complete orders for revenue unless specified otherwise.",
"mode": "extension",
"commitMessage": "Add AI context to order transactions topic"
}'ai_context: |
"revenue" or "sales" → order_items.total_revenue
"orders" → order_items.count
"customers" → users.count or order_items.unique_users
"AOV" → order_items.average_order_valueai_context: |
Each row is a line item, not an order. One order has multiple line items.
total_revenue already excludes returns and cancellations.
Dates are in UTC.ai_context: |
For trends, default to weekly granularity, sort ascending.
For "top N", sort descending and limit to 10.ai_context: |
You are the head of finance analyzing customer payment data.
Default to monetary values in USD with 2 decimal places.ai_fields:
- all_views.*
- -tag:internal
- -distribution_centers.*
# Or explicit list
ai_fields:
- order_items.created_at
- order_items.total_revenue
- order_items.count
- users.name
- users.state
- products.categorysample_queries:
- prompt: "What month has the highest sales?"
ai_context: "Use total_revenue grouped by month, sorted descending, limit 1"
query:
fields:
order_items.created_at[month]: created_month
order_items.total_revenue: total_revenue
base_view: order_items
sorts:
- field: order_items.total_revenue
desc: true
limit: 1
topic: order_transactions# ai_order_transactions.topic
extends: [order_items]
label: AI - Order Transactions
fields:
- order_items.created_at
- order_items.status
- order_items.total_revenue
- order_items.count
- users.name
- users.state
- products.category
ai_context: |
Curated view of order data for AI analysis.
[detailed context here]
sample_queries:
- prompt: "Top selling categories last month?"
query:
fields:
products.category: category
order_items.total_revenue: revenue
base_view: order_items
filters:
order_items.created_at: "last month"
sorts:
- field: order_items.total_revenue
desc: true
limit: 10
topic: ai_order_transactionsdimensions:
status:
label: Order Status
description: >
Current fulfillment status. Values: complete, pending, cancelled, returned.
Use 'complete' for revenue calculations.dimensions:
customer_name:
synonyms: [client, account, buyer, purchaser]
order_date:
synonyms: [purchase date, transaction date, order timestamp]
measures:
total_revenue:
synonyms: [sales, income, earnings, gross revenue, top line]
average_order_value:
synonyms: [AOV, avg order, basket size]