[QUERY] What happended to AzureSearchChatDataSource and reasoning models for Use your own data
Opened this issue · 1 comments
Library name and version
Azure.AI.OpenAI 2.3b2
Query/Question
With non-reasoning OpenAI models like gpt4, gpt4.1-mini, I used AzureSearchChatDataSource to directly use Azure Search as a datasource for my RAG application via AzureOpenAIClient
e.g.
var chatDataSource = new AzureSearchChatDataSource
{
Endpoint = new Uri(options.Value.SearchEndpoint),
IndexName = options.Value.SearchIndexName,
InScope = true,
QueryType = DataSourceQueryType.VectorSemanticHybrid,
Authentication = DataSourceAuthentication.FromApiKey(options.Value.SearchKey),
SemanticConfiguration = options.Value.SearchSemanticConfiguration,
VectorizationSource = DataSourceVectorizer.FromDeploymentName(options.Value.EmbeddingId)
};
m_ChatCompletionsOptions.SetNewMaxCompletionTokensPropertyEnabled();
m_ChatCompletionsOptions.AddDataSource(chatDataSource); this will then fail with a validation error:
{
"requestid": "1b7cfa98-de62-440f-b230-72919bfa42a0",
"code": 400,
"message": "Validation error at #/max_completion_tokens: Extra inputs are not permitted"
}As soon as I remove the AddDataSource the error goes away, but obviously won't work, as there are no sources ;)
If you follow the tutorials on https://learn.microsoft.com/de-de/dotnet/api/overview/azure/ai.openai-readme?view=azure-dotnet-preview#use-your-own-data-with-azure-openai it still creates AzureSearchChatDataSource
But for reasoning models gpt-5 (and gpt4o etc.), this does not work anymore and I apparently have to calculate the embeddings myself, then search the documents myself and build complex system prompts so that the citations are returned.
If I look at https://github.com/Azure-Samples/azure-search-openai-demo all the examples which support reasoning models now do it independently, first calculate embeddings for query, then search documents, then build prompt manually.
The ease of use quality now is gone.
Is the functionality of AzureSearchChatDataSource ever coming back?
Environment
No response
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jpalvarezl @trrwilson.