I’m playing around with the Chat with your data service from Azure, and I’ve been trying to connect it to a table from a sample database with the cognitive search indexation. The problem is that when I talk with the chatbot it always says that only 20 documents were retrieved as it is the maximum capability. Is there any way to solve this? The table that I wanted to test was pretty big (around 800k data). I’m fairly new to this and it seems pretty rare that this service wouldn’t connect to a table bigger than 20 rows of content
I’ve tried the simple search and was expecting the chatbot to go through my entire table not just the first rows
2
Answers
I beleive the default maximum number of documents returned in a single response is 20 for certain query types.
I guess its possible with pagination which involves making multiple requests and using continuation tokens to retrieve subsequent sets of documents. in your case I recommend this, for more info on how this works, follow the link below, to Microsoft documentation.
https://learn.microsoft.com/en-us/search/?terms=Pagination%3A
Here is the sample for ChatGPT + Enterprise data with Azure OpenAI and Cognitive Search (V2). Shows approaches for data preparation, prompt construction, and orchestration of interaction between model (GPT) and retriever (Cognitive Search and SQL).
This demo uses page-based chunking where each chunk is a page. For the purposes of this content, page-based chunking produced good results as it has enough context. Additional chunking strategies were also considered and you can find details of those in the search optimization doc.