AI enrichment tutorial in C#
Demonstrates AI enrichment by building an indexing pipeline that detects and extracts text and text representations of images and scanned documents stored as blobs in Azure Blob storage. This sample leverages cognitive skills from the Cognitive Services APIs, such as entity recognition and language detection. It uses the REST APIs to make calls to Azure Cognitive Search, including index definition, data ingestion and AI enrichment, and query execution.
This sample is a C# console application that uses .NET Core. The code is described in C# Tutorial: AI-generated searchable content from Azure blobs using the .NET SDK.
- Visual Studio
- Sample file set (mixed content types)
- Azure Storage account
- Azure Cognitive Search service
- Clone or download this sample repository.
- Extract contents if the download is a zip file. Make sure the files are read-write.
- Create a Blob container named
cog-search-demoand upload the sample files of mixed content type.
- For the Blob container, get the connection string.
- For Azure Cognitive Search, get the service name, admin API key, and a query API key.
This sample is available in two versions.
v10 uses the previous Microsoft.Azure.Search client libraries
v11 uses the new Azure.Search.Documents client library, highly recommended for all new projects
Run the sample
- In applicationsettings.json, enter the search service name, keys, and storage account connection string.
- Press F5 to run the program.
You can learn more about Azure Cognitive Search on the official documentation site.