microsoft / sample-app-aoai-chatGPT

Sample code for a simple web chat experience through Azure OpenAI, including Azure OpenAI On Your Data.
MIT License
1.43k stars 2.14k forks source link

Weird behavior of AI search service #458

Open rochaktarika123 opened 6 months ago

rochaktarika123 commented 6 months ago

We have implemented this application which leverages internal documentation if it can find an answer else it provides from the pre-trained GPT datasets. I am seeing some weird behavior that if the user asks a question on the internal documentation, the app works well and can give answers but if the user asks the first question very generic like "Who is XYZ celebrity" or even a greeting "hello", that the application has to find an answer from the pre-trained datasets, it is not able to answer any further questions based on the internal documentation then. I have tried to modify the configuration parameters like temperature, top_p, or even the system prompt but the behavior is still there.

Any idea why is this happening?

QuentinAd commented 6 months ago

I have seen similar behavior. When looking at the logs in debug mode, I have seen that the Azure Search AI citations are being added to the OpenAI request in the citations (in role: tool). However for some reason it is not citing or saying the information is not there even when I see the citation added to the request.

I have seen similar behavior when not the first questions, sometimes also other questions down the conversation.

sarah-widder commented 5 months ago

Hi @rochaktarika123 you might try adjusting the 'inScope' parameter, or strictness. Turning off 'inScope' or reducing the strictness value will make the model more likely to answer outside of the internal documentation data.