Request irrelevant query for a chatbot

What can we do if we have a chatbot customized on our application and then the user requests something else. for example the chatbot is for taking orders but then in the middle of the conversation it asks about how to cook. It asks something that cannot be filtered by OpenAI moderation because it is not something against openAI policy, but it is completely different from what the bot is supposed to do. How can we handle this situation in prompt engineering for a chatbot?

If you are designing a bot and thinking of handling this type of scenario, there are some options that you can do like:

  • Clearly define the scope: You can inform about what the bot can and cannot do.
  • Create fallback responses: These responses should be polite and informative. For instance, saying to the user that the question is out of context.
  • Implement continuous learning and improvement: from time to time, check the conversation. If you notice a trend in out-of-scope, consider if it would be beneficial to expand your bot’s capabilities to handle these requests.
1 Like