Understanding Entities in Dialogflow

hey everyone I'm Priyanka Vergara and you are watching deconstructing chatbots in today's episode we will explore entities further from the second and third episodes you might remember that entities are dialogue flows mechanism for identifying and extracting useful data from users input if you've not checked out the episode on getting started with dialogue flow please do so for more context just roll up to the second episode on the right or click in the link in description below there are three types of entities system entities developer entities and session entities now you might remember from our appointment scheduler chatbot when we said need an appointment for 4 p.m.

Tomorrow the date and time were automatically extracted a system entities date and time it was all automatic as you saw system entities allow agents to extract information about the wide range of concepts without any additional configuration data like address emails currency phone numbers are some of the common examples of system entities now so far we have been addressing our appointment scheduler in a generic manner let's say our scheduler is for DMV we click on entities and create a new entity let's call this appointment type let's think about the types of services DMV offers most people go to DMV for a driver's license maybe vehicle registration also driving tests so in our scenario let's stick to the two main services driver's license and micro registration are obviously the two main ones that I can think of that DME offers so let's create those two as entities you can add more rows with more services as entity types additionally you can check the box to add more entities automatically when an entity is not available in the entity list dialog flow identifies that this is an entity based on they're training phrases and adds that new entity automatically to the list you can also upload or download entities in bulk in CSV or JSON format now let's add more intense to accommodate the appointment type entity in our inputs when you add set an appointment for driver's license for 3:00 p.m.

Tomorrow driver's license has identified as developer entity that we just set up while time and date are obviously system entities add a few more training phrases like these now remember slot filling from episode 3 when we built our appointment scheduler to book an accurate appointment we needed to make appointment type a required field just like time and date let's define the write prompt for when a user does not provide us the appointment type now while we are at it let's modify our response to include the appointment type along with the date and time to make it look more complete when done don't forget to save your changes and then let's just our updates now with some sample inputs the first example let's say user only gives us the appointment type well it's not filling kicks in and asks for the time and the date when they want to come in all looks good we get the appointment scheduled in the second example let's say a user says I need an appointment for 4 p.m.

Tomorrow without providing us the appointment type again our slot filling kicks in and prompts the user to provide us the service information they say driver's license and we provide them a response with their appointment confirmation in our third and last example let's say the user gave us all three things we needed in just one shot set an appointment for Waker registration at 2:00 p.m. tomorrow our bot has everything it needs so it sends a confirmation response back to the user right away now the turn type of entity is session entity these are defined at session ID level which allows for a specific entity to be tied to a user and there session let's take an example to understand this better our agent had appointment type as entity which includes driver's license and vehicle registration at this point that entity could be updated to include a state ID or a motorcycle test depending on the information your agent collects from the user during the conversation the updated session entity will have state ID or motorcycle test entry for rest of the conversation with your user well try this out on your own and let me know how it goes in the comments below remember you will create manage and update session entities using the API alright that was a lot so let's summarize today we looked at the three types of entities system entity developer entity and session entities then we went hands-on and learnt how to set up these entities in our appointment scheduler chatbot don't miss the next episode of deconstructing chatbots because we are going to integrate our appointment scheduler with Twilio messaging service [Music]

Leave a Reply

Your email address will not be published. Required fields are marked *