Microsoft Dev Blogs

Building Generative AI apps with .NET 8

thumbnail

.NET and AI Overview

In this post, we'll explore how .NET and AI combine to create amazing applications, with a focus on building generative AI apps with .NET 8. We'll cover how to get started, the use of Semantic Kernel, debugging and diagnosing applications with .NET Aspire, and the growing ecosystem of AI tools for .NET developers.

Getting Started

Newcomers to AI development can check out the new .NET + AI documentation and samples, which include quickstart guides for using Open AI models with the Azure OpenAI SDK or the Semantic Kernel library.

Semantic Kernel (SK)

Semantic Kernel (SK) is an open-source library that simplifies building AI solutions that can call existing code. It provides abstractions for accessing models and vector stores using dependency injection in .NET, allowing for easy component swapping during app experimentation and iteration.

.NET Aspire

.NET Aspire offers strong support for debugging and diagnosing applications through the .NET OpenTelemetry SDK, simplifying configuration of Logging, Tracing, and Metrics. Deployment to production can be done with tools like Prometheus and Azure Monitor.

Building on AI Fundamentals

The .NET runtime and libraries are continuously evolving to better embrace AI, providing developers with efficient tools to build AI applications. Components like Phi and Phi-3 Vision showcased at Build 2024 highlight the capabilities of local and edge AI models.

Ecosystem of AI Tools

There is a growing ecosystem of AI tools and services for .NET developers, with recent announcements including the Official OpenAI library for .NET, Azure Functions OpenAI Bindings, AI Application Templates, and Prompty for prompt tooling. Additionally, new technology like Vector Support in Azure SQL Database and AI Chat Protocol for JavaScript web apps were introduced.

AI Solutions with .NET

H&R Block's use of AI in their applications exemplifies how developers can integrate AI into their projects. To learn more about their journey and experiences, check out the session from Build 2024 on infusing .NET apps with AI.