Bixby Developer Center

Guides

Modeling

This section discusses the concept of modeling, which is integral to Bixby's design.

  • The Bixby Language
    Describes Bixby's modeling language.
  • Modeling
    Describes the different types of models and the syntax convention to use.
  • Modeling Concepts
    Describes how to model concepts, as well as more advanced topics related to concepts.
  • Modeling Actions
    Describes how to model actions, as well as more advanced topics related to actions.
  • Utilizing Library Capsules
    Describes how to import Bixby's library capsules to provide new functionality for your models and actions.

Modeling Overview

In the Overview and Quick Start Guide, you learned how Bixby turns natural language input into a structured intent. Bixby's Planner takes the intent and builds an execution graph out of your models.

Models come in two kinds in Bixby: concepts and actions in the *.bxb format. For more information on formatting and language conventions, read about the Bixby Language.

Concepts

A concept describes any "thing." It could represent a concrete object, such as coffee, flowers, or an airport. A concept can also be abstract, such as a day, flight, or order. Well-modeled concepts are essential to Bixby because the planner uses concept models as inputs and goals when executing plans. Concepts are comparable to data types and data structures in a programming language.

Examples of concepts from the dice rolling sample capsule in the Quick Start Guide include NumDice (the number of dice being rolled) and NumSides (how many sides the dice have), as well as RollResult (the result of rolling the dice). The first two are examples of primitive concepts, simple types. RollResult is an example of a structure concept, a more complex concept with named properties (which are themselves other concepts defined in the capsule):

structure (RollResultConcept) {
description (The result object produced by the RollDice action.)
property (sum) {
type (SumConcept)
min (Required)
max (One)
}
property (roll) {
description (The list of results for each dice roll.)
type (RollConcept)
min (Required)
max (Many)
}
}

View master on GitHub

Modeling Concepts describes concepts in great detail, including how to express relationships between concepts.

Actions

An action defines an operation that Bixby can perform, directly or indirectly, on behalf of a user. If concepts are nouns, actions are verbs.

In the dice rolling sample capsule, there's only one action: RollDice, which takes NumSides and NumDice as inputs and outputs a RollResult:

action (RollDice) {
collect{
input (numDice) {
type (NumDiceConcept)
min (Required)
max (One)
}

input (numSides) {
type (NumSidesConcept)
min (Required)
max (One)
}
}
output (RollResultConcept)
type (Calculation)
}

View master on GitHub

Modeling Actions goes into more detail about actions, including validation and error handling.