Skip to main content
The fastest way to build a semantic model is with the Credible AI agent. The agent analyzes your data sources and generates a comprehensive model—identifying your primary tables, defining relationships, and creating dimensions and measures.
New to semantic modeling? See What is a Semantic Layer? to understand the concepts, or the Malloy Language Documentation for language details.

Prerequisites

The agent only knows about your data after the connection is indexed—this is configured when you set up the connection. Indexing can take some time (status indicator coming soon), so if the agent doesn’t have data for a new connection, wait a few minutes and verify you’re within the table limits.

Build a Model with the AI Agent

  1. Open the Credible Chat panel in VS Code
  2. Describe what you want to model - Be specific about your data and analysis goals Examples:
    • “Build a model of my ecommerce data so I can analyze sales by product and brand”
    • “Create a semantic model for customer analytics including lifetime value”
    • “Model the orders table with customer and product relationships”
  3. Follow the agent’s prompts and review the generated model in your editor
  4. Accept the model - Click Tab or Accept to apply the proposed model to your file
The AI agent will analyze your data and create:
  • Sources connected to your tables
  • Joins between related tables
  • Dimensions for grouping and filtering
  • Measures for calculations and aggregations

Working with the Agent

Beyond initial model creation, you can use the Credible modeling agent to:
  • Create views - Ask the agent to create views (saved queries) in your model. The agent will create and compile the query so you can see the analysis.
  • Edit existing code - Highlight a section of your model and ask the agent to modify it.
  • Learn Malloy - Ask the agent questions about the Malloy language (e.g., “How do I write date filters in Malloy?”)

Validate as You Build

Use the buttons above each source in VS Code to validate your model:
  • Schema - View the compiled structure of your source
  • Explore - Open the Data Explorer to interactively query
  • Preview - Quick data preview to verify connections

Next Steps