I am working on a bot which is supposed to, among others, provide data about employees in the company. For this I need to extract both first names and surnames of the employees and put them in their respective slots. This already works quite well.
However I need to be able to react to switching from a query about one employee, to a query about another. This works well if the entities are extracted correctly (the slots just get refilled) but if only the first name, or only the surname is extracted, the bot is wrongly thinking that all the required slots have been filled correctly.
As an example, suppose the conversation is as follows:
User: Give me the email to Adam Smith
Bot: Here’s the email to Adam Smith
User: What about the email for Zdzisław Brown?
Bot: Here’s the email to Adam Brown
The surname has been refilled, but first name was not. Is there some canonical way of proceeding in such situations? I realize that recognizing discontinuities in conversation is a very subtle and context-sensitive task.
The way I would like to solve it is via a custom component which i can include in the pipeline. But the problem is that I need access to the entities in the message before they get put into slots. Would putting my component after the CRF entity recognizer do the trick, or is it already too late, and the slots are already filled?