Skip to content

dotnet/ai-samples

Repository files navigation

page_type languages products urlFragment name description
sample
azdeveloper
bicep
csharp
powershell
azure
ai-services
azure-openai
ai-samples
AI Samples for .NET
.NET samples demonstrating how to use AI in your .NET applications.

AI Samples for .NET

Welcome to the official home for .NET samples demonstrating how to use AI in your .NET applications. If you're new to AI, start at the top and work your way down. Otherwise, jump in wherever suits your interests.

Microsoft.Extensions.AI (preview)

Microsoft.Extensions.AI is a set of core .NET libraries developed in collaboration with 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) and embeddings.

Core benefits:

  • Unified API: Offers a consistent and standard set of APIs and conventions for integrating AI services into .NET applications.
  • Flexibility: Allows .NET library authors to use AI services without forcing a specific AI provider, making it parameterizable with any provider.
  • Ease of Use: Enables .NET application developers to experiment with different packages using the same underlying abstractions and to utilize a single API throughout their application.
  • Componentization: Facilitates the addition of new capabilities and simplifies the componentization and testing of applications.

For more details, see the Introducing Microsoft.Extensions.AI Preview blog post.

Topic GitHub Link
Abstraction implementations GitHub Link
Azure OpenAI GitHub Link
OpenAI GitHub Link
Azure AI Inference GitHub Link
Ollama GitHub Link

Microsoft.Extensions.AI.Evaluation (preview)

Microsoft.Extensions.AI.Evaluation is a set of .NET libraries that provide the tooling necessary to evaluate the quality and efficacy of LLM responses in your intelligent applications.

The Microsoft.Extensions.AI.Evaluation libraries are built on top of core AI abstractions defined in the Microsoft.Extensions.AI libraries above. For more details, see the following blog post: Evaluate the quality of your AI applications with ease

Topic GitHub Link
Microsoft.Extensions.AI.Evaluation API Usage Examples

Quickstarts using OpenAI

# Topic GitHub Link
1 Text Summary Hike Benefits Summary Project
2 Chat App Hiker AI Project
4 Function Calling Hiker AI Pro

Quickstarts using the Azure OpenAI SDK

# Topic GitHub Link
1 Text Summary Hike Benefits Summary Project
2 Chat App Hiker AI Project
4 Function Calling Hiker AI Pro

Chat samples

# Topic GitHub Link
1 Customer Support Customer Support Project

Build 2024 - Infusing your .NET Apps with AI: Practical Tools and Techniques

Discover how to bring AI into your .NET application! This session covers the tools, libraries, and best practices for incorporating LLMs or other AI capabilities to create an "intelligent app". We'll explore practical examples, including how to leverage Azure AI services and the .NET AI ecosystem, to enhance your apps with AI.

Youtube: Infusing your .NET Apps with AI: Practical Tools and Techniques

Tutorial: Infusing your .NET Apps with AI: Practical Tools and Techniques

# Topic YouTube Link and Time GitHub Link
1 Hello Semantic Kernel 3m 0s Hello Semantic Kernel
2 Add Chat History 5m 40s Add Chat History
3 Add Plugin - Function Call 7m 10s Add Plugin - Function Call
4 Add Logging 9m 24s Add Logging
5 Add Plugin - Bing Search 11m 15s Add Plugin - Bing Search
6 Modify Kernel Behavior with Dependency Injection 12m 37s Modifying Kernel Behavior with Dependency Injection
7 Using Semantic Kernel in a Web App 15m 57s Using Semantic Kernel in a Web App

.NET Foundation

There are many .NET related projects on GitHub.

  • .NET home repo - links to 100s of .NET projects, from Microsoft and the community.
  • ASP.NET Core home - the best place to start learning about ASP.NET Core.

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the .NET Foundation Code of Conduct.

License

.NET (including the csharp-notebooks repo) is licensed under the MIT license.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages