sample-app-aoai-chatGPT
sample-app-aoai-chatGPT copied to clipboard
Metadata being passed to chat completion
Hi! First off thank you for your work.
I have some questions about the backend using Azure Cognitive Search.
I see that if no data is to be used in the answer, the openAI api is called right away, whereas with data you use the requests library to handle the call. Is that a reason for that?
Moreover, I really would like to understand how the metadata are given to the chat completion. I guess in the "content_colums" variable i have to give all the columns I want to provide for the chat completion as well, is that right? There I would put the chunk itself as well as the title and the author for example. Are they then concatenated to the prompt? I see that in the response object, in choices->messages->[citation] there is a metadata field as well, but it is always empty and I am not sure how to access it / fill it. Also, if I want the chat to answer a question like "Provide me all the publications of author X", this requires sort of an understanding of the field author being the author. Does the chat completion receive a name along with the name of the field for example? Do I have any control on this or is inside the Azure OpenAI API call? Could you reference maybe to more detailed documentation if this exists?
Thank you for your time and help! @sarah-widder