The relationship between Intents, Entities, Contexts in BP's NLU

Can anyone help me to explain the relationship between Intents, Entities, Contexts in BP’s NLU? Thanks so much. :grinning: :grinning: :grinning:

Hi @Nghia_Nguyen,

Intents are what the user wants :
Book me a flight from paris to tokyo tomorow please -> Book_flight

Entities are words in the sentences that gives information :
Book me a flight from paris to tokyo tomorow please
-> paris = from_city / tokyo = to_city / tomorow = date

Finally contexts are a pre-classification which helps to ease the intent classification :
Book me a flight from paris to tokyo tomorow please
-> context=reservation then intent=book_flight

If context was airline_fees for exemple then the intent would maybe be flight_price instead.

For the relations between them :
Intents classification use extracted entities to improve the accuracy, for exemple if I extract to_city then it helps me to know the intent is about travelling.

Contexts are making a sort of “intent pre-selection” and refine the choices. You can see it as a two level intent classification.

Feel free to ask more question if it wasn’t clear enough :slight_smile:

p.s in our new version botpress albert comming this fall context are changed for topics.

1 Like