I have seen references to anaphors in the Knowledge Base Action documentation:
If the user refers to an object via “the first one”, “that one”, or “it”, you should mark those terms as mention
While I don’t think it’s part of rasa’s core, it’s worth checking the code of ActionQueryKnowledgeBase to see if they make use of it there (if at all they do). So maybe it’s something you can replicate in a custom action.
@josejulio thanks, this is a very useful link and it will help in some of my scripts.
Has anyone used this functionality?
I don’t think it covers all possible uses of pronouns.
For example:
User: I have a meeting with John Doe today, write this event in my diary for 10 am.
Bot: (performs a custom action and communicates with the diary application via the API, recording an event) The event is placed in your diary.
User: By the way, his birthday is in 2 days, set a reminder.
Bot: (sets a reminder) A reminder is added to your diary.
In this case, there is no use of a knowledge base, but pronouns and entity references are used. How then? Just heuristically determine which entity I’m referring to?
I don’t know much about it, but an idea could be to store the last used object in a slot.
You could make use of custom actions to store other things like at what point in the conversation it happened or any other information that would provide more context.
Later, when you detect a pronoun you can make use of said slot to determine to give more context to your action.