When building a conversational system, how you handle off topics tends to swing one way or the other for people new to it.
They either totally forget about handling chit-chat/off topic. This leads to the system feeling stupid to the end user, even if it has a high accuracy. Or feeling like a search engine.
Or they go the other way and try to answer everything they can possibly think of, without realising the rabbit hole they are going down. Also they may only put in one response to the same type of question, making it feel like a computer program.
The correct way to handle off topics is: Answer the topic not the question, and drive the user back to the intended usage of the conversational system!
To give an example:
User: Hey Watson, do you love Siri?
Watson: I have never really thought about other AI systems. I am too busy selling goods for pets.
User: Please tell me if you love Siri.
Watson: I would much prefer to help you in buying things for your pet, rather then talking about Artificial intelligences.
User: But do you love Siri?
Watson: Can we please get back to buying things for your pet.
The first response detects that the person is talking about an “AI” related item. But instead of trying to expend time on the nature of the question, you can deflect it with a broad response.
The second response is the same but a bit cooler, and pushing the user back to the topic.The last response stops playing with the user.
You can achieve this quite easily with the following advanced output.
{ "output": { "text": { "values": [ "I have never really thought about other AI systems. I am too busy selling goods for pets.", "I would much prefer to help you in buying things for your pet, rather then talking about Artificial intelligences.", "Can we please get back to buying things for your pet." ], "selection_policy": "sequential" } } }
Someone playing with the system however will have it return to the first response on the 4th try. So you can set a counter that say after X number of off topic responses, then have it either redirect to a person, or stop responding completely.
The detection part is tricker. One way to approach this is to have a single intent that detects off topic, and then use a second workspace to drill down to the related off topic. This prevents polluting your main intents, and only requires further calls when needed. I may go into more detail on this later.
For more information on how to handle off topic/chit chat and much more, I strongly recommend doing the Designing Conversational Solutions (Watson Conversation Service) training.