Easily Add GenAI to .NET Apps using Microsoft.Extensions.AI
summary
Builds a .NET MAUI chat app that plugs into Microsoft.Extensions.AI so any provider (Azure OpenAI, OpenAI, Amazon Bedrock, Ollama) swaps with two or three lines; uses the IChatClient abstraction plus Microsoft.Extensions.AI.OpenAI extensions and Semantic Kernel for plumbing. Implements streaming responses, chat history, and function invocation so the LLM calls local methods (returns hobby lists, colors) and it reliably works live as haiku replies. Adds unit tests using local evaluators that score 1–5 (equivalence, relevance, safety) and run offline.
AI-written summary · about
chapters (12)
- 0:00GenAI in .NET apps
- 3:59Why Microsoft.Extensions.AI
- 7:34GenAI client in .NET MAUI
- 13:40Streaming chat responses
- 18:21Chat history and system prompts
- 21:30Custom functions with AI
- 31:16Key GenAI concepts
- 33:45Unit testing GenAI responses
- 44:36Safety evaluation for GenAI
- 49:13Fine-tuning evaluators
- 51:21Resources and next steps
- 52:07Q&A
related talks
46mInfusing your .NET Apps with AI: Practical Tools and Techniques
44mAI Building Blocks for .NET: Add intelligence to your C# Apps
01h 10mPractical Applications of Generative AI: How to Sprinkle a Little AI in Your App
01h 00mBuilding next-level conversational AI apps with .NET and Aspire
01h 10mPractical Applications of Generative AI: How to Sprinkle a Little AI in Your App
59mHow to add genuinely useful AI to your webapp (not just chatbots)
01h 38mIntegrating AI into Your Apps: A Developer's Guide to Generative AI APIs
39mAI app 101: Starting from scratch with Semantic Kernel
