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.42k stars 2.13k forks source link

Unable to cite more than 5 documents, only 5 citation references compiled at one time. #922

Open Prashantty opened 2 weeks ago

Prashantty commented 2 weeks ago

Describe the bug Unable to cite more than 5 documents, 5 citation references compiled at one time.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior Should load more than 5 documents, if there are more than 50 documents are uploaded.

Screenshots Screenshot 2024-06-13 152554

Configuration: Please provide the following

Additional context I uploaded more than 50 documents including doc, docs, and pdf files, but at one time it only provided 5 citation references and displayed the message "please ensure that all documents are reviewed and compiled together."

sarah-widder commented 2 weeks ago

Hi @Prashantty, this behavior is controlled by the AZURE_SEARCH_TOP_K app setting, which you can modify in the Environment Variables page on your app service. For more information, check out the parameter top_n_documents in the documentation here: https://learn.microsoft.com/en-us/azure/ai-services/openai/references/azure-search?tabs=python