Is it possible to use two data sources or indexes in Semantic Kernel? #6703
-
I am trying to use two indexes in a single Azure AI Search instance. I attempted to add two extensions, but I keep receiving an error indicating that only one data source can be defined. Is it possible to use two data sources or indexes in Semantic Kernel? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
The limitation of the current connector is you can only have one data source with AzureAISearch |
Beta Was this translation helpful? Give feedback.
-
@Cobra86 , when you say two extensions, do you mean the Azure Open AI Service /extensions API with dataSource parameter? I am wondering is it better to just use the generic /completions API and inject the Azure AI Search retrieval content manually? |
Beta Was this translation helpful? Give feedback.
-
Since But I'm not sure it's possible to specify multiple indexes as part of one request. |
Beta Was this translation helpful? Give feedback.
-
I was able to switch between two different Azure AI services at runtime, but I was doing it manually, allowing the user to toggle between the services. I'm not sure if it's good practice to create Kernel plugins and then call chatCompletion.GetChatMessageContentAsync within the plugin function. |
Beta Was this translation helpful? Give feedback.
-
Also, I can't use Azure AI search extension and kernel plugins together. |
Beta Was this translation helpful? Give feedback.
Since
index
is configured on per-request basis, I think it should be possible to use multiple indexes for different requests:semantic-kernel/dotnet/samples/Concepts/ChatCompletion/AzureOpenAIWithData_ChatCompletion.cs
Lines 50 to 55 in 8033515
But I'm not sure it's possible to specify multipl…