Skip to main content
Free text that can provide context to the AI query helper. Context could include behavioral prompting or example queries and structured Omni results. Refer to the Optimizing models for AI guide for more information on best practices.

Syntax

ai_context: "<context_text>"
Or for multiline context:
ai_context: |
  <multiline_context_text>

Properties

ai_context
string
Free text that provides context to the AI query helper. Can include behavioral prompting, use case descriptions, sample queries, or other contextual information to improve AI query results.

Examples

Behavioral prompting
ai_context: |
  you are the head of finance. you are concerned with the status of customer payments. you often need to project into the future how many invoices are due and for how much. you also need to know if any invoices are late so you can reach out to those customers.
Structured query
ai_context: |
  question: which customers are behind due on payment?
    answer:
    {
    "limit": 1000,
    "sorts": [
      {
        "column_name": "share_rillet_omni_omni__invoices.due_date",
        "sort_descending": true,
        "is_column_sort": false,
        "null_sort": "OMNI_DEFAULT"
      }
    ],
    "table": "share_rillet_omni_omni__invoices",
    "fields": [
      "share_rillet_omni_omni__invoices.customer_id",
      "share_rillet_omni_omni__invoices.customer_name",
      "share_rillet_omni_omni__invoices.invoice_number",
      "share_rillet_omni_omni__invoices.due_date",
      "share_rillet_omni_omni__invoices.total_amount"
    ],
    "pivots": [],
    "dbtMode": false,
    "filters": {
      "share_rillet_omni_omni__invoices.due_date": {
        "is_negative": false,
        "kind": "BEFORE",
        "right_side": "today",
        "type": "date",
        "ui_type": "BEFORE"
      },
      "share_rillet_omni_omni__invoices.status": {
        "type": "string",
        "kind": "EQUALS",
        "values": [
          "unpaid"
        ],
        "is_negative": false,
        "case_insensitive": true
      }
    },
    "modelId": "aeb6f3f4-b0e5-4abb-97eb-eaeb42a16944",
    "version": 5,
    "rewriteSql": true,
    "row_totals": {},
    "fill_fields": [],
    "calculations": [],
    "column_limit": 50,
    "join_via_map": {},
    "column_totals": {},
    "userEditedSQL": "",
    "dimensionIndex": 0,
    "default_group_by": true,
    "join_paths_from_topic_name": "invoices"
  }