microsoft / sample-app-aoai-chatGPT

Sample code for a simple web chat experience through Azure OpenAI, including Azure OpenAI On Your Data.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Prashantty opened this issue · comments

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

  • Azure OpenAI model name and version (e.g. 'gpt-4o, 2024-02-15-preview"')
  • Is chat history enabled? Yes
  • Are you using data? If so, what data source? (e.g. Azure AI Search, Azure CosmosDB Mongo vCore, etc) -> Azure Blob Storage

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."

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