Skip to main content

Design Your Semantic Model for Analysis

Learning Objectives

After this unit, you'll be able to:

  • Apply best practices to structure a semantic model for AI-driven analytics.
  • Develop semantic models for AI with a deeper understanding of their requirements.

Introduction

A well-designed semantic model is a powerful analytics tool. It helps your analytics agents understand data and confidently answer questions. In this unit, learn how to make your semantic model more resilient and how to prevent common artificial intelligence (AI) misunderstandings by following some best practices. Each guideline is based on lessons learned from product and engineering research and real use cases.

Designing an agent-ready semantic model helps your agent deliver useful answers to questions like: “How many escalated cases occurred in Q2?” or “What was my refund rate this year compared to last year?”

Give Custom Objects Clear, and Specific Labels

Agents rely on field names and object names to understand data. Choosing specific and descriptive labels for custom fields helps agents recognize and apply the data correctly.

Start preparing your data by replacing vague labels. For example, while reviewing your semantic model, you notice that you have a Product table that includes a Start Date field. This field is ambiguous, since start date can mean availability, manufacturing, or even a marketing start date. Remove ambiguity by renaming it, Product.Availability Start Date.

When creating new fields in Data Cloud, use thoughtful names and labels from the start to reduce confusion later. Also, avoid abbreviations to maintain clarity and prevent misunderstandings.

Pro tip: Use business-friendly display names for custom fields. This additional context and clarity helps the agent understand the fields and their purpose.

Write Descriptions That Add Context to Custom Fields

Entity descriptions are the agent’s cheatsheet. Make sure that they’re clear, concise, and add context. Keep descriptions under 255 characters, including spaces. Explain the purpose, scope, and relationships to other entities. Avoid vague terms, and specify relevant data formats. This prevents ambiguity for downstream use.

For example, let’s say you have a field named total_net_revenue and you want the agent to understand what revenue means in this case. Instead of writing “Revenue number” in the description, add extra information such as, “Total revenue from product sales after discounts, returns, and allowances. Calculated in USD from finalized ERP transactions. Updated daily. Used to assess company earnings and performance trends.” Avoid descriptions that simply restate the label or don’t explain how the field is used.

Pro tip: Test your field and object descriptions with an LLM. Ask the agent, “How do you interpret this field?”

Remove Ambiguity

Ambiguous fields confuse agents and users alike. While reviewing your semantic model, you might notice that opportunity data is unclear. Some sales teams mark opportunities as Closed Won by setting Opportunity.Status=Closed Won, while others use Opportunity.Closed Won=True for the same effect. This created confusion. How does the agent decide which field to trust if both fields are valid for different scenarios?

Ambiguity can cause agents to make incorrect assumptions and give misleading information. You have a few options to proactively resolve this overlap.

First, you can define business-specific knowledge in your semantic model using Business Preferences. This helps the agent respond to analytical questions within your business's unique context and logic. Another option is to change both labels and descriptions to clarify the difference. For example Closed Won is set to True after a contract is signed, while Status changes after the prospect changes to a customer. Each field has a different purpose. Agents look at everything including names, descriptions, field roles, and sample values to figure out meaning. To keep your model clear, regularly scan for fields or objects that seem too similar. Use distinct labels and tailored descriptions to separate their meanings.

Watch out for:

  • Duplicate field names in different objects.
  • Synonyms that look different but mean the same thing.

Avoid Redundant Calculated Fields

Too many variations on the same calculation can cause problems. You notice that you have several calculated fields aimed at identifying Closed Won opportunities, but each uses slightly different logic. Some checked the stage name, others used a Boolean field, and one used a custom flag.

To fix this, consolidate the logic into a single calculated field named Closed Won (Standardized), and remove or hide the redundant versions. This helps reduce agent confusion and simplifies dashboard filters for business users.

If you have two calculated fields that do almost the same thing, ask yourself: Does this new calculation add unique business value?

Define Metrics for High-Impact Questions

Metrics help the agent prioritize which logic to use. Metrics apply filters, date logic, and formatting that make it easy for analytics agents to understand and reuse. Any calculated field that appears frequently in analysis or decision-making is a good candidate to be upgraded to a metric. It then becomes a reusable, self-contained answer pattern.

In your semantic model, you notice that you have several calculated fields that directly support leadership questions. One of these questions is, “How much are we spending on each new customer this quarter?”, for which you created a calculated field with this formula:

Customer Acquisition Cost (CAC)=SUM([Marketing Spend])/COUNTD([New Customers].

Instead, create a new metric called Average Quarterly Customer Acquisition Cost. This metric applies the following.

  • Measure: Customer Acquisition Cost (CAC)
  • Time Dimension: Lead Creation Date
  • Dimensions: Marketing Channel, Campaign Name, Region, Product Category
  • Filter: Customer Status=New

Now, with a metric, ‌an analytics agent can provide valuable business insights and be more equipped with details to respond to complex business questions.

Pro tip: If a calculated field answers a key question, define a metric for it.

Use Predefined Calculated Fields Strategically

Calculated fields ‌encode business logic the analytics agent might otherwise try to infer. Build a calculated field called Refund Rate (12M Rolling) that handles time-scoped filtering automatically. This enables the agent to provide quick comparisons across years without having to build the logic from scratch.

Create calculated fields that serve an analytical purpose and have clear labels and descriptions. Hide intermediate or helper fields if they aren’t useful in dashboards or agent queries.

Assign Semantic Field Types

Field types signal how data should behave in queries. After reviewing your semantic model, you set Revenue and Quantity Sold as measures, and fields like Region, Customer Segment, and Case Type as dimensions.

Marking semantic roles helps agents know which fields to aggregate and which to group or filter by.

Keep the Model Fully Connected

Your analytics agents need to trust their data. Ensure logical connections between objects and a clear hierarchy of information. Think of it as building a robust map where every destination is clearly marked and connected.

A well-connected semantic model supports better queries. It reduces broken answers and makes analytics agents’ behavior more predictable. A well-organized and interconnected semantic model helps an agent retrieve the necessary information and answer a question fully and accurately.

Wrap Up

Designing your semantic model for analytics agent readiness is all about creating a structure that is both clear and easy to understand. You aren’t just preparing data. You’re preparing it to be interpreted by an intelligent system that needs clarity to deliver answers.

As you start working on your semantic model, here’s a summary of the best practices to guide you.

  • Use specific, meaningful field and object names.
  • Add short, clear descriptions that explain business use and purpose.
  • Remove or hide overlapping logic and ambiguous fields.
  • Create metrics for high-value questions and use calculated fields intentionally.
  • Assign field roles (dimension or measure) and keep the model fully connected.

Showing extra care early on leads to smoother, faster, and smarter agent interactions later. Now, you’re well on your way to creating a semantic model that supports efficient and effective AI-driven analytics.

Teilen Sie Ihr Trailhead-Feedback über die Salesforce-Hilfe.

Wir würden uns sehr freuen, von Ihren Erfahrungen mit Trailhead zu hören: Sie können jetzt jederzeit über die Salesforce-Hilfe auf das neue Feedback-Formular zugreifen.

Weitere Infos Weiter zu "Feedback teilen"