Entities

Entities contain the variables we want to extract from the text a user sents. For example, when a user sends I want to fly from Amsterdam to San Francisco we want to detect that Amsterdam and San Francisco are a place of departure and arrival.

Within the intent view you can mark entities by selecting them and assigning an entity type.

TIP: Mark entities consistently: mark every item you want your bot to recognize consistently. Do not skip any, as this harms the classification process.

System entities

Name Examples
Date Tomorrow, next week, 1e of July
Time 12am, 23:59, now, tomorrow at 8am
Number 2453. twenty one
Email [email protected]
URL examplecorp.com
Distance 200 meters, 12 miles, 1.5cm
Query The query matches anything you train it. The AI will learn of your examples. If you'd like to match music artists, train the AI with examples like Madonna, The Weeknd, m83, etc

Custom entities

Custom entities work in a similair way as the system query type.There is one important difference. Custom entities provide a way to give boundaries to what the AI will match.

Let's say we take the above example of a departure and destination city. Perhaps you only want a select number of cities a person can travel to. You can limit these options by creating a custom entity called city. Within this entity you provide only matched entites that are valid to travel to.

When the AI detects an entity it will determine a match based on the type. The AI could find an entity that is not valid in relation to the type of entity, For example, I want to travel to Washington could be matched in the above example, but since Washington is not in our list, it's immediatly dropped

TIP: No need to add typos as synonyms, matching also works with spelling errors

Exact matching

By default custom entities will do an exact match. When you turn of exact matching, custom entities will work the same way as a system query entity works.

Using matches

Extracted entities can be used within code, webhooks and reply text templates. They always come in the form of an array, even though only one match is made.

// Example payload inside cloud code with a destination match
{
    params: {
        destination: [{
            match: "NYc",
            value: "New York",
            id: "NY"        
        }]
    }
}

Multiple destinations would look like

// Example payload inside cloud code with a 2 destination matches
{
    params: {
        destination: [{
            match: "NYc",
            value: "New York",
            id: "NY"        
        },{
            match: "Amsterdam",
            value: "Amsterdam",
            id: "AMS"
        }]
    }
}

results matching ""

    No results matching ""