Tableau Agent Best Practices
Tableau Agent does its best to understand the intent of your questions as well as the context of your data and your business. But without data that is optimized for AI, Tableau Agent can get things wrong.
This article describes some steps you can take to make sure you get the best results from Tableau Agent.
General Information
Use clean, well modeled data
Messy data is hard to analyze and Tableau Agent is focused on analysis, not cleaning and prepping your data.
- Do: Clean and prep your messy data before analysis. Try using Tableau Agent in Tableau Prep(Link opens in a new window) to clean your data.
- Don't: Expect an analytical agent to do data prep.
- Do: Use relationships in data modeling.
- Don't: Hardcode joins
- Don't: Use data blending
- Do: Use certified data sources and update them for AI consumption.
- Do: Hide unnecessary fields. If a user shouldn't build a viz with it, the agent shouldn't see it.
Use clear field names and descriptions
Tableau Agent doesn’t understand the data in the same way a human would. Without good names and descriptions, Tableau Agent may misinterpret a field or get confused about which field to query. Remove any guesswork about how the data fits into an analysis.
- Do: Use unique, descriptive, and complete field names.
- Don't: Leave a field name as "Age" when it could be "Case Age at Close"
- Don't: Leave abbreviations or ambiguous fields like "P_ID" or "Name"
- Don't: Use duplicate field names or names that are too similar. For example "Region1", "Region1_copy". Use a distinct name for each field, or hide duplicates if they aren't needed in your analysis.
- Do: Provide a description that defines what the field is.
- Do: Include the business context and expected synonyms.
- Don't: Assume all your users will always refer to the field by its official name
- Do: Describe how the field is typically used in analysis and how it's different from similar fields.
- Don't: Copy and paste descriptions across similar fields
- Do: Maintain the descriptions for standard Salesforce fields.
- Do: Document any unique business logic or data anomalies (such as how to interpret nulls, or when to use "Invoice Date" rather than "Purchase Date").
Create Business Preferences
Applies to Tableau Agent in Dashboards in the Dashboard Q&A capability only
To ground Tableau Agent in your organization’s business knowledge, you can create and upload a Business Preferences file. Business preferences can include things like your organization-wide rules, terminology, and business logic (such as defining fiscal years or stock thresholds). For more information, see Improve response quality for Dashboard Q&A(Link opens in a new window).
When creating your business preferences file, follow these guidelines:
-
Do: Create clear, concise, individual preferences identified with a “#” at the beginning of each preference item. Tableau Agent reads this line entry as the separator between preferences. You can have one or more additional lines in between this separator to further explain the business preference.
Example:
# Revenue is in USD
Format with a $, use comma as thousands separators. Do not include cents.
-
Don't: Include more than 50 preferences or over 8000 characters.
-
Don't: Include complex instructions. Instead break them down into simple, distinct preferences.
-
-
Do: Refer directly to exact field names or calculated fields in your data source to clarify which fields your business preference applies to.
-
Don't: Use vague or ambiguous field references that make Tableau Agent guess which field or metric you are referring to.
-
-
Do: Create calculated fields directly in your data source before writing your preferences, then reference those calculated fields in your instructions.
-
Don't: Write rules in your business preferences that require Tableau Agent to perform raw mathematical manipulations or define multi-step formulas on the fly. For example, "Multiply percentages by 100".
-
-
Do: Include domain-specific guidelines, unique terminology for your organization. For example “When referring to opportunities, TPS is short for total product sales”, or information not included in your semantic model schema.
-
Don’t: Include general business information. Tableau Agent needs specific information about how to interpret or display data.
-
The following types of business preferences aren’t currently supported:
-
Not for AI use: Blocking topics or questions. For example, “Don’t answer any questions about salary".
-
Visual formatting: For example “Use a line chart when displaying Sales over time.”
-
LLM response structure: For example, "When responding, don't show a visualization" or "On every response, first tell the user 'Thank you,' then show the answer, and then end with 'Goodbye.'"
Pre-define calculated fields
While Tableau Agent can help create calculations through natural language, if a user asks for a calculation incorrectly or vaguely, an incorrect calculation can result.
- Do: Create any common calculations ahead of time so you can ensure consistency and accuracy.
Specify field properties
The agent relies on field properties as analytical guardrails. Default or misconfigured properties can lead to poor analytical outcomes.
- Do: Verify field roles (dimensions and measures) and data types (such as date, numeric, boolean).
- Don't: Leave a field such as Postal Code as a numeric field (measure) if it should be considered an attribute (dimension).
- Don't: Leave dates stored as text.
- Do: Set a default aggregation.
- Don't: Assume the user or agent will know to use average with "unit price" rather than sum
AI readiness checklist
Use this checklist to implement best practices when preparing your published data source and workbooks for AI consumption.
Model Structure
Clean data
Business preferences (.md or .txt) are uploaded with clear rules that describe unique domain logic
Note: This feature is currently only used by Tableau Agent in Dashboards, in Dashboard Q&A.
Relationships instead of joins
No data blending
Fields
Field names are specific and contextual
All fields have useful, differentiated descriptions
Unnecessary fields are hidden
Common or expected calculations already exist
Fields have the correct properties: role, data type, default aggregation
