Developer Concepts

Bot compiler is being developed to be a schema to create and share chat-bots and different state machines that form the chat-bot. Each chat-bot can be represented as a set of state machines, one calling another.

Fundamental concepts :

MicroBots

Bot compiler facilitates code reusability with the concept of microbots. As a response to any event, an instance of a microbot can be created.These microbots can be defined in the microbots section of the schema or can import microbots created by other developers. This enables writing microbots which can be reused in many bots, e.g. Payment microbot, User details retrieval microbot, etc, basically any conversation flow which can be used in multiple bots can be a microbot only within the project or shared with the community. This is analogous to importing external packages in traditional languages.

Transitions

Each state in a state machine has transitions corresponding to the intents it is expecting to hear in that state. Let's take an example to understand this better here.

"start": {
        "response": {
                "type": "text",
                "value": "Ok, would you like a beverage along with your order?"
        },
        "transitions": {
                "yes": {
                        "nextState": "question1"
                },
                "no": {
                        "nextState": "db1"
                },
                "string": {
                        "reply": "I did not quite get that, do you want extra beverage?"
                }
        }
}

Here 'start' is the state, response is the section which says what to respond with, it can either be a plain text or a function call which can be implemented by the developer, more on this in Response types.

NLP engines such as Dialogflow by google and LUIS by Microsoft map plain text queries to Intents & Entities. Each intent has zero or more entities associated with it. Every intent is dispatched as an event to the state machine. Each state handles these events in transitions. Here that start state handles yes, no and string intents.

Data Store

Entities collected with intents and and the strings collected explicitly after asking for values is stored in a dictionary for each user. More about this in Data store.

results matching ""

    No results matching ""