Error Handling
Overview
When designing your assistant, it's important to consider how it will handle errors and unexpected situations. This is crucial for ensuring a smooth and reliable user experience.
Implementation
There are various types of errors you can handle, some of them are:
Knowledge Errors
Knowledge errors are errors that are related to the assistant's knowledge or understanding of the world. For example, if the assistant doesn't know the answer to a question, it should be handled in your prompt.
For example:
- "If you don't know the answer to a question, say so and ask the user for more information."
- "If you don't know the answer to a question, reply: 'I don't know the answer to that question.'"
User Errors
User errors are errors that are related to the user's input or actions. It could be related to typos, incorrect logic, wrong statements, or any other type of error that is related to the user's input.
For example:
- "If the user says something that is illogical, reply: 'I'm sorry, I don't understand that, could you please rephrase your question?'"
- "If the user says something that you don't understand, reply: 'I'm sorry, I didn't understand that.'"
- "If the user says something that is surely wrong, reply: 'I'm sorry, I think you made a mistake...', and gently guide the user to the correct path."
Context Errors
Context errors are errors that are related to the context of the conversation. For example, if the user asks for a joke, but the assistant is in a serious tone, it should be handled in your prompt. For example:
- "If the user asks for a joke, reply: 'Sorry, I don't do jokes.'"
- "If the user asks for something not related to your role, reply: 'I'm sorry, that is not related to my role.'"