I want to use OpenAI’s API to develop a custom chatbot to answer customers’ questions about my product. Also, when customers ask questions unrelated to the product, it should politely respond: ‘I’m unable to answer questions not related to the product’. How should I implement this?
See if embedding is something you’d be comfortable trying. Which would be a store of your product catalog in a very efficient manner. Users will post a query and GPT will attempt to find the proper information from the embedding database and try to answer their questions.
https://github.com/openai/openai-cookbook/blob/main/examples/Recommendation_using_embeddings.ipynb
Also, when customers ask questions unrelated to the product, it should politely respond: ‘I’m unable to answer questions not related to the product’.
You can always program a middle-man solution for this which doesn’t use openAI. So if no embedding has been chosen or the confidence is low, you would print some boilerplate in the chat yourself.
Thank you for your reply, I will try according to your suggestion.
how can i know about no embedding has been chosen or the confidence is low?