Roles

Roles

Roles can be added to entities to define relational dependencies between two entities. Some examples of relational dependencies are:

  • Start vs. End

  • Slow vs. Quick

  • Short vs. Long

  • Cheap vs. Expensive

Relational dependencies are useful to correctly streamline backend processes when they entail multiple entities.


NLP Support

Support for roles varies per Natural Language Processing (NLP) engine. Currently, roles are only supported by Microsoft LUIS.

Example

In the previously used example we can add the first example of a relational dependency to hardcode the beginning and end the flight.

Intent: Book Flight

Original utterance"I'd like to fly from New York to Los Angeles"

Utterance with entity"I'd like to fly from [Start:City] to [End:City]"

User input: "I'd like to fly from New York to Los Angeles"

Recognised Entities:

Starting entity: New York 

Ending entity: Los Angeles