Thanks for reaching out to us, you can store the feedback and use it to fine-tune the model or retrain the model as below steps -
Reference document for fine-tuning is here - https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/fine-tuning?tabs=turbo%2Cpython&pivots=rest-api
Here's a basic outline of how you might go about it:
- Create the Feedback Mechanism: This might be as simple as having buttons for 'Like' and 'Dislike' that appear after your bot provides a response. Alternatively, you could have your bot directly ask the user for feedback after certain interactions.
- Store the Feedback: You'll need to store the feedback you receive in some way. This could be in a database or other storage system. You will want to store both the feedback itself (like or dislike) and the context it was given in (the conversation that led up to it).
- Analyze the Feedback: Once you have collected feedback, you can analyze it to understand what users are finding helpful and what they are not. This could involve looking for patterns in the feedback or using machine learning techniques to create a model of what users like and dislike.
- Use the Feedback to Train Your Model: You can use the feedback you've collected and analyzed to improve your bot. This might involve retraining your model on new data that includes the feedback, or it might involve making changes to your bot's conversation flow based on what you've learned. Here is a simple example:
def handle_message(message):
bot_response = generate_bot_response(message)
show_bot_response(bot_response)
show_feedback_request()
def show_feedback_request():
print("Was this response helpful?")
print("[1] Yes")
print("[2] No")
def handle_feedback(feedback):
if feedback == '1':
store_feedback("positive")
elif feedback == '2':
store_feedback("negative")
In this example, after each bot response, the user is asked for feedback. Their feedback is then stored for later analysis. Remember, while Azure AI Search and OpenAI GPT-3.5 can generate responses based on input, they can't learn directly from feedback in real-time. You will need to collect this feedback and use it to retrain or refine your models over time.
Also, while OpenAI's models can generate text based on inputs, they can't be directly trained on new data by end-users. For that kind of functionality, you'd need to use a different kind of model or service that allows for custom training.
Regards,
Yutong