AzureCognitiveSearchChatExtensionConfiguration using Semantic Search reduces the number of document results

Juan Velázquez Romera 40 Reputation points
2023-12-14T15:11:37.3233333+00:00

Hello!

I am using AzureCognitiveSearchChatExtensionConfiguration to add context to chat mode:

 AzureCognitiveSearchChatExtensionConfiguration cognitiveSearchOptions = new()             
	{                 
		DocumentCount = 12,
        EmbeddingEndpoint = new Uri(apiEmbeddingEndpoint),                 
		SearchEndpoint = new Uri(searchEndpoint),                 	        
		IndexName = searchIndexName,                  
		QueryType = AzureCognitiveSearchQueryType.VectorSemanticHybrid,
   		SemanticConfiguration = "default"             
	};

If I use QueryType VectorHybrid it uses the correct document count, but when I activate VectorSemanticHybrid the number of results used in the context is lower than 12.

How can I configure the Semantic Search to only rerank the documents but not lose documents in the process?

Thank you

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,255 questions
{count} votes

Accepted answer
  1. Saurabh Sharma 23,761 Reputation points Microsoft Employee
    2023-12-14T22:51:28.71+00:00

    Hi @Juan Velázquez Romera

    Welcome to Microsoft Q&A! Thanks for posting the question.

    Can you please provide details how are you checking the number of documents is less than 12 ? Please include a screenshot if possible.

    Also, can you please try setting the ShouldRestrictResultScope property to false if this works?

    Thanks

    Saurabh

    0 comments No comments

0 additional answers

Sort by: Most helpful