Skip to main content

Modeling AI Assistant

Overview

Semantics enable Wren AI to comprehend your data structure and provide more precise answers to user inquiries. The Modeling AI Assistant automates the creation of semantics and relationships, improving the AI's data understanding. This tool is accessible in the top-right corner of the modeling page and offers two main features:

  • Generate semantics: Automatically creates semantics based on your data schema.
  • Generate relationships: Identifies relationships between your models automatically.

Accessing the Modeling AI Assistant

  1. Go to the Modeling page.
  2. Find the "Modeling AI Assistant" button in the top-right corner. modeling-ai-assistant
  3. Hover over the button to display a dropdown menu with available features: modeling-ai-assistant-hover

Generate semantics

Well-defined descriptions of models and columns enable Wren AI to understand your data structure and provide more precise answers to user inquiries.

  1. Select "Generate semantics" from the Modeling AI Assistant dropdown.

  2. Choose the models for which you want to generate semantics. generate-semantics-pick-models

  3. After selecting models, proceed to generate semantics. In the user prompt field, provide a concise description of your dataset's purpose. Clearly state what the data represents and its usage. generate-semantics-user-prompt For example, for e-commerce: "This dataset includes historical pricing information, discount rates, and promotional activities. It supports dynamic pricing strategies, promotion effectiveness analysis, and competitive pricing assessments."

  4. Review the generated semantic descriptions. The AI will produce descriptions for each model and its columns. generated-semantics

    Each model will feature:

    • A general description of the model.
    • Detailed descriptions of its columns.
  5. Click "Save" to retain the generated semantics.

  6. Important: Deploy your changes to activate the semantics.

Generate relationships

Good relationships help connect your data models logically. With Modeling AI Assistant, you can automatically discover potential connections between your models, saving time in manual relationship configuration.

  1. Select "Generate relationships" from the Modeling AI Assistant dropdown menu.

  2. Allow the AI to process your data schema. This step may take some time, especially with numerous models. generate-relationships-processing

  3. Examine the proposed relationships.

    The AI will suggest potential links between your models, presented in a table with four columns:

    • From: The originating field of the relationship
    • To: The destination field of the relationship
    • Type: The nature of the relationship (e.g., Many-to-one)
    • Description: A brief explanation of the relationship's purpose

    generated-relationships

    For each model, you have the option to:

    • Assess the proposed connections
    • Modify relationships using the edit icon
    • Delete relationships using the delete icon
    • Save or discard your modifications
  4. Click "Save" to preserve the generated relationships.

  5. Important: Deploy your changes to implement the relationships.

tip

What types of relationships can Wren AI identify?

Wren AI is capable of detecting three types of relationships among your models, such as:

  • One-to-one relationships: Each record in one model corresponds to exactly one record in another model. For instance, each user has a single profile.
  • One-to-many relationships: A single record in one model can relate to multiple records in another model. For example, one organization may oversee many projects.
  • Many-to-one relationships: Several records in one model can associate with a single record in another model. For instance, many projects may be managed by one organization.