When to use user entities in Dialog Flow?

不想你离开。 提交于 2019-12-05 19:33:27

While this would work... sorta... it isn't really a good application of User Entities. The biggest issue is that you're now making an API call to create an alias for terms like "this" or "that" or "that first one". And you're constantly changing those entity definitions, including removing old aliases and setting new ones.

User Entities are best for things that you know about that user that will differ from other users. To use your cities as an example, you may use user entities to store a person's favorite cities or any nicknames they have for those cities. Once the user logs in, you'd then set @user_cities and their nicknames for a city are now available.

Update To use another example, again with your cities framework.

You might change a User Entity for features and aliases about a particular city once it is selected. So if the user selected "Sydney", you might create a @feature user entity containing entries for the opera house, or the beach, but not anything about a clock tower. While for "London" we might add entities about a tower and a bridge, but not a beach.

The focus is on what you want to hear from the user vs what you want to remember about the conversation.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!