AI enrichment tutorial in C#

Flask sample MIT license badge

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.



  1. Clone or download this sample repository.
  2. Extract contents if the download is a zip file. Make sure the files are read-write.
  3. Create a Blob container named cog-search-demo and upload the sample files of mixed content type.
  4. For the Blob container, get the connection string.
  5. For Azure Cognitive Search, get the service name, admin API key, and a query API key.

This sample is available in two versions.

Run the sample

  1. In applicationsettings.json, enter the search service name, keys, and storage account connection string.
  2. Press F5 to run the program.

Next steps

You can learn more about Azure Cognitive Search on the official documentation site.