Overview of the .NET + AI ecosystem

The .NET ecosystem provides many powerful tools, libraries, and services to develop AI applications. .NET supports both cloud and local AI model connections, many different SDKs for various AI and vector database services, and other tools to help you build intelligent apps of varying scope and complexity.

Important

Not all of the SDKs and services presented in this doc are maintained by Microsoft. When considering an SDK, make sure to evaluate its quality, licensing, support, and compatibility to ensure they meet your requirements.

Semantic Kernel for .NET

Semantic Kernel is an open-source SDK that enables AI integration and orchestration capabilities in your .NET apps. This SDK is generally the recommended AI orchestration tool for .NET apps that use one or more AI services in combination with other APIs or web services, data stores, and custom code. Semantic Kernel benefits enterprise developers in the following ways:

  • Streamlines integration of AI capabilities into existing applications to enable a cohesive solution for enterprise products.
  • Minimizes the learning curve of working with different AI models or services by providing abstractions that reduce complexity.
  • Improves reliability by reducing the unpredictable behavior of prompts and responses from AI models. You can fine-tune prompts and plan tasks to create a controlled and predictable user experience.

For more information, see the Semantic Kernel documentation.

.NET SDKs for building AI apps

Many different SDKs are available for .NET to build apps with AI capabilities depending on the target platform or AI model. OpenAI models offer powerful generative AI capabilities, while other Azure AI Services provide intelligent solutions for a variety of specific scenarios.

.NET SDKs for OpenAI models

NuGet package Supported models Maintainer or vendor Documentation
Microsoft.SemanticKernel OpenAI models
Azure OpenAI supported models
Semantic Kernel (Microsoft) Semantic Kernel documentation
Azure OpenAI SDK Azure OpenAI supported models Azure SDK for .NET (Microsoft) Azure OpenAI services documentation
OpenAI SDK OpenAI supported models OpenAI SDK for .NET (OpenAI) OpenAI services documentation

.NET SDKs for Azure AI Services

Azure offers many other AI services to build specific application capabilities and workflows. Most of these services provide a .NET SDK to integrate their functionality into custom apps. Some of the most commonly used services are shown in the following table. For a complete list of available services and learning resources, see the Azure AI Services documentation.

Service Description
Azure AI Search Bring AI-powered cloud search to your mobile and web apps.
Azure AI Content Safety Detect unwanted or offensive content.
Azure AI Document Intelligence Turn documents into intelligent data-driven solutions.
Azure AI Language Build apps with industry-leading natural language understanding capabilities.
Azure AI Speech Speech to text, text to speech, translation, and speaker recognition.
Azure AI Translator AI-powered translation technology with support for more than 100 languages and dialects.
Azure AI Vision Analyze content in images and videos.

Develop with local AI models

.NET apps can also connect to local AI models for many different development scenarios. Semantic Kernel is the recommended tool to connect to local models using .NET. Semantic Kernel can connect to many different models hosted across a variety of platforms and abstracts away lower-level implementation details.

For example, you can use Ollama to connect to local AI models with .NET, including several Small Language Models (SLMs) developed by Microsoft:

Model Description
phi3 models A family of powerful SLMs with groundbreaking performance at low cost and low latency.
orca models Research models in tasks such as reasoning over user given data, reading comprehension, math problem solving, and text summarization.

Note

The preceding SLMs can also be hosted on other services such as Azure.

Connect to vector databases and services

AI applications often use data vector databases and services to improve relevancy and provide customized functionality. Many of these services provide a native SDK for .NET, while others offer a REST service you can connect to through custom code. Semantic Kernel provides an extensible component model that enables you to use different vector stores without needing to learn each SDK.

Semantic Kernel provides connectors for the following vector databases and services:

Vector service Semantic Kernel connector .NET SDK
Azure AI Search Microsoft.SemanticKernel.Connectors.AzureAISearch Azure.Search.Documents
Azure Cosmos DB for NoSQL Microsoft.SemanticKernel.Connectors.AzureCosmosDBNoSQL Microsoft.Azure.Cosmos
Azure Cosmos DB for MongoDB Microsoft.SemanticKernel.Connectors.AzureCosmosDBMongoDB MongoDb.Driver
Azure PostgreSQL Server Microsoft.SemanticKernel.Connectors.Postgres Npgsql
Azure SQL Database Microsoft.SemanticKernel.Connectors.SqlServer Microsoft.Data.SqlClient
Chroma Microsoft.SemanticKernel.Connectors.Chroma NA
DuckDB Microsoft.SemanticKernel.Connectors.DuckDB DuckDB.NET.Data.Full
Milvus Microsoft.SemanticKernel.Connectors.Milvus Milvus.Client
MongoDB Atlas Vector Search Microsoft.SemanticKernel.Connectors.MongoDB MongoDb.Driver
Pinecone Microsoft.SemanticKernel.Connectors.Pinecone REST API
Postgres Microsoft.SemanticKernel.Connectors.Postgres Npgsql
Qdrant Microsoft.SemanticKernel.Connectors.Qdrant Qdrant.Client
Redis Microsoft.SemanticKernel.Connectors.Redis StackExchange.Redis
Weaviate Microsoft.SemanticKernel.Connectors.Weaviate REST API

Visit the documentation for each respective service to discover .NET SDK and API support.

Other options

This article summarized the tools and SDKs in the .NET ecosystem, with a focus on services that provide official support for .NET. Depending on your needs and stage of app development, you might also want to take a look at the open-source options for the ecosystem in the unofficial list of .NET + AI resources. Microsoft is not the maintainer of many of these projects, so be sure to review their quality, licensing, and support.

Next Steps