Interested in working with AI in .NET? Here's a collection of samples, tutorials, SDKs, and videos to help you get started and go deeper. Topics covered currently include generative artificial intelligence (GenAI) and large language models (LLMs).
Inspired by frontend-dev-bookmarks, ruby-bookmarks, awesome-machine-learning, awesome-generative-ai and awesome-dotnet.
Contributions are always welcome! Please take a look at the contribution guidelines and quality standard pages first. If you find issues with the content/links here, you can also report them. If you have general feedback, or have a request for a specific sample, feel free to ask in the Discussions section as well.
Note: This list is currently hosted on GitHub by me, Jordan Matthiesen, and inclusion here doesn't imply a direct endorsement from me or my employer. I'm including projects I (and other contributors) find useful and think that the broader .NET developer community will find helpful. Feedback is welcome!
- AI for .NET Developers docs - The .NET + AI documentation site, providing an overview of AI concepts for .NET developers.
- Generative AI with .NET for Beginners - An introductory course from Microsoft, summarizing the differences betwen Generative AI, Machine Learning (ML) and how you can get started with both.
- Source code for AI Beginner Series - The presentation and sample source from the above intro series.
- .NET Conf: Focus on AI 2024 event - A 2024 event hosted by the .NET team and friends. This event includes intros and some deep dives into a variety of .NET + AI related topics.
- Building Intelligent Apps with .NET and Azure - .NET Conf 2023 session with a guided walkthrough to using OpenAI APIs, through the Azure OpenAI SDK, with .NET.
- .NET + AI news from the .NET Blog - This is the AI category of the official .NET blog from Microsoft, where you can find the latest AI-specific posts from the .NET team.
- .NET + AI on StackOverflow - Search results for the
.net
+artificial-intelligence
tags on StackOverflow, a great place to post questions to the community. - Azure AI Community - Discord community for discussions about Azure AI.
- Build your own Course Assistant with AI "Are you using Azure OpenAI Service to build Copilot applications? Do you understand the concept of Copilot Stack? In this session we will use Semantic Kernel to build your first Copilot application based on Copilot Stack." - Hosted by Luis Quintanilla (Microsoft) and Kinfey Lo (Microsoft)
- Semantic Kernel tutorial with dotnet: From Zero to Raccoon-Hero - A video series tutorial showing how to create a production-ready LLM tool using Azure OpenAI, .NET, Semantic Kernel and OpenTelemetry.
- Azure Search with OpenAI - C# Sample - Documentation | Announcement Post ChatGPT + Enterprise data with Azure OpenAI and Cognitive Search (.NET)
- eShop Reference Application - An eCommerce sample application built on .NET 8, .NET Aspire, and using Semantic Kernel to demonstrate an AI chat bot.
- eShopSupport - A sample customer support application for the eShop eCommerce solution. This sample demonstrates a variety of AI features: data generation, sentiment analysis, entity extraction, summarization, classification, as well as chat interactions.
- Using Phi2 with TorchSharp - A sample demonstrating how to access the Phi2 model in your local system, using .NET with the help of the TorchSharp library.
- Using Llama2 with TorchSharp - This sample shows how to use the Llama2 model from your local system, using .NET with the help of the TorchSharp library.
- Generate images with Azure OpenAI Servide - Quick start tutorial showing how to use the Azure OpenAI SDK for C# to generate images using DALL-E.
- Generate images with AI using Stable Diffusion, C#, and ONNX Runtime - Overview of how you could access the Stable Diffusion model to generate images using .NET with the ONNX runtime
- Demystifying Retrieval Augmented Generation with .NET - A detailed walkthrough of how to work with your data in .NET, using the concept known as Retrieval Augmented Generation.
- Making AI powered .NET apps more consistent and intelligent with Redis - A walkthrough on using Redis as the multi-purpose data store for intelligent apps. Highligint Retrievel Augmented Generation and Semantic Caching with Redis.
- AugmentR - An example chat bot demonstrating the use of Semantic Kernel in a .NET Aspire project, augmenting chats with data from public internet URLs.
- Vector Search AI Assistant - Demo app showing how to combine data from CosmosDB, with Azure OpenAI Services and queries against cognitive search to create an AI search assistant.
- Vector Search AI Assistant with MongoDB - Demo app showing how to combine data from Azure CosmosDB for MongoDB, with queries against Azure OpenAI Services.
- Samples for Retrieval Augmented Generation on Azure - Includes many examples in C# showing how to work with CosmosDB + MongoDB or NoSQL.
- Getting started using Azure OpenAI Assistants with C# - [Pre-release] A walkthrough showing how to use AI assistants with the Azure OpenAI SDK and C#.
- AI Chat App Quickstart using ASP.NET Core and a Blazor frontend - Includes support for working with OpenAI models, local models, models available through GitHub Models, and Azure AI Model Catalog.
- Tutorial: Create a recommendation app with .NET MAUI and ChatGPT - Guided tutorial walking through how to create a simple .NET MAUI application that works with ChatGPT.
- Quickstart: Add DALL-E to your .NET MAUI Windows desktop app - Guided tutorial walking through how to create a simple .NET MAUI application that generates images using DALL-E.
- Building generative AI powered bots with Teams Toolkit and AI library for .NET | .NET Conf 2023 - How to create bots for use in Microsoft Teams, using generative AI and .NET.
- Enable Hybrid Search (Vector + Semantic) for your external data on Copilot for Microsoft 365 using Azure AI Search and .NET - Microsoft sample showing how to integrate Azure Search in a Teams message extension.
- AutoGen.Net - Official .NET implementation of the AutoGen python project. AutoGen is a multi-agent conversation framework built by MS Research that allows you to easily construct multi-agent conversation and workflows.
- Introducing the Azure AI Inference SDK - This SDK lets you easily access and use a wide range of AI models from the Azure AI Model Catalog for inference tasks like chat.
- Microsoft.Extensions.AI Source on GitHub
- Introducing Microsoft.Extensions.AI preview - A set of core .NET libraries developed 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.
- Samples for Microsoft.Extensions.AI
- OllamaSharp source and docs - A library for working with Ollama to run AI models locally.
- OpenAI SDK for .NET on GitHub - Includes the source, documentation, and samples for working with the library.
- Announcing the OpenAI Library for .NET - Announcement blog post shared on the .NET blog.
- Semantic Kernel Source on GitHub
- Overview - Semantic Kernel - A library built by Microsoft that lets you "build agents that can call your existing code." Provides native support for working in .NET.
- Semantic Kernel Cookbook - A set of examples for achieving common tasks using Semantic Kernel, with Polyglot Notebooks available for .NET developers.
- LangChain [Unofficial] - .NET implementation of the popular LangChain Python project. Note: Currently it's in an early state, and looking for contributors!
- NRedis Stack .NET SDK - A .NET SDK for working with Redis Enterprise for Vector Similarity Search
- Redis OM for .NET - A .NET SDK for Redis Search, Object Mapping, and Semantic Caching
- Milvus C# SDK - A .NET SDK for working with the Milvus vector DB solution.
- Pinecone - Official SDK for working with the Pinecone vector DB.
- Qdrant .NET SDK - SDK for working with the Qdrant vector DB.
- Weaviate - [Unofficial] Community supported SDK for using the Weaviate vector DB.
- Prompt files - using Prompty - An asset class and format for LLM prompts that aims to provide observability, understandability, and portability for developers.
- Add AI to Your .NET Apps Easily with Prompty - A blog post with examples of how to use Prompty.
- Azure OpenAI - An overview of the Azure OpenAI service and including Quick Start samples for .NET.
- Azure OpenAI Service Samples - Sample notebooks demonstrating how to use the Azure OpenAI SDK, with may samples in C#/.NET as Polyglot Notebooks.
- Azure Functions bindings for OpenAI's GPT engine - [In Development] Very early review of new OpenAI bindings in Azure Functions, including support for C#.