Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: Added example of Azure AI Search as Plugin with custom schema and configurable search fields #5093

Merged
merged 4 commits into from
Feb 21, 2024

Conversation

dmytrostruk
Copy link
Member

Motivation and Context

Today, Azure AI Search connector has two limitations:

  1. It's working only with predefined schema, which is not preferred approach, because index in Azure AI Search is customizable and may use different schema from the one that exists in SK today.
  2. Search operation uses only Embedding index field to perform search, while it's possible to specify multiple vector fields with different names.

In order to resolve these limitations, major refactoring on abstraction level is required, which will impact not only Azure AI Search connector, but all other memory connectors as well, and it will take some time.

This PR contains example that shows how to register Azure AI Search functionality in Kernel as Plugin and use it to perform search operations and communicate with AI based on your data. In this example, index schema is custom and can be changed when needed, as well as searchFields parameter is configurable via KernelArguments. The usage of Azure AI Search plugin is very similar to already existing approach with AzureAISearchMemoryStore connector.

Contribution Checklist

@dmytrostruk dmytrostruk self-assigned this Feb 20, 2024
@dmytrostruk dmytrostruk requested a review from a team as a code owner February 20, 2024 18:12
@markwallace-microsoft markwallace-microsoft added the .NET Issue or Pull requests regarding .NET code label Feb 20, 2024
Copy link
Member

@markwallace-microsoft markwallace-microsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the getting started story to run this sample?

One suggestion (and this would be a new task)

There is this sample https://github.com/Azure/azure-search-vector-samples which allows you to set up AI Search and vectorize some data e.g. you could use https://github.com/Azure-Samples/azure-search-sample-data

It would be great if there is a readme which suggests a path for someone to go from zero to having this sample up and running. This could be a Blog article or a page in our developer documentation.

@dmytrostruk
Copy link
Member Author

What is the getting started story to run this sample?

One suggestion (and this would be a new task)

There is this sample https://github.com/Azure/azure-search-vector-samples which allows you to set up AI Search and vectorize some data e.g. you could use https://github.com/Azure-Samples/azure-search-sample-data

It would be great if there is a readme which suggests a path for someone to go from zero to having this sample up and running. This could be a Blog article or a page in our developer documentation.

@markwallace-microsoft Great suggestion, thanks! I will think about ways how to provide all required information to run this sample as part of separate task.

@dmytrostruk dmytrostruk added this pull request to the merge queue Feb 21, 2024
Merged via the queue into microsoft:main with commit 6954e97 Feb 21, 2024
18 checks passed
@dmytrostruk dmytrostruk deleted the azure-ai-search-example branch February 21, 2024 13:34
@dmytrostruk dmytrostruk linked an issue Feb 21, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.Net: Sample search plugins that uses Azure AI Search
3 participants