How can I leverage OpenAI’s APIs to develop a feature that analyzes specific user conversations, and upon the user’s request, provides suggestions for responding to customer questions based on past conversation data? How can I utilize OpenAI’s APIs to implement a functionality where, in a scenario where a user and customer have previously engaged in conversations, the agent can leverage an AI button to provide helpful response suggestions using old conversation contents with that customer when the customer asks a new question during their ongoing conversation?
This would require you save the old conversation or at least an embedding of them, which you can then match against the current conversation and provide user with suggestions based on that.
The only downside is that with scaling and the number of users increasing, the amount of data that you would have to store would increase as well.
You might also have to experiment with how much conversation you want to save and how much you need to provide for generation in the next part of the response and so on for best results
If i save old conversations’ embeddings in vector db how i will use them in openAI’s apis for create suggestions for current conversation?
Embed the current conversation using the open ai embeddings endpoint and use cosine similarity to find the matching conversations