Edit

Share via


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.

Microsoft.Extensions.AI library for .NET

Microsoft.Extensions.AI is a set of core .NET libraries created in collaboration with developers across the .NET ecosystem, including Semantic Kernel. These libraries provide a unified layer of C# abstractions for interacting with AI services, such as small and large language models (SLMs and LLMs), embeddings, and middleware.

Microsoft.Extensions.AI provides abstractions that can be implemented by various services, all adhering to the same core concepts. This library is not intended to provide APIs tailored to any specific provider's services. The goal of Microsoft.Extensions.AI is to act as a unifying layer within the .NET ecosystem, enabling developers to choose their preferred frameworks and libraries while ensuring seamless integration and collaboration across the ecosystem.

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

.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:

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