Skip to main content

Posts

Microsoft.Extensions.AI–Part III–Tool calling

I'm on a journey discovering what is possible with the Microsoft.Extensions.AI library and you are free to join. Yesterday I looked at how to integrate the library in an ASP.NET Core application. Today I want to dive into a specific feature; tool calling. This post is part of a blog series. Other posts so far: Part I – An introduction to Microsoft.Extensions.AI Part II – ASP.NET Core integration Part III –Tool calling (this post) What is tool calling? With tool calling you are providing your LLM with a set of tools (typically .NET methods) that it can call. This allows your LLM to interact with the outside world in a controlled way. In Semantic Kernel these tools were called ‘plugins’ but the concept is the same. To be 100% correct it is not the LLM itself that is calling these tools but the model can request to invoke a tool with specific arguments (for example a weather tool with the location as a parameter). It is up to the client to invoke the tool and pa...
Recent posts

Microsoft.Extensions.AI–Part II - ASP.NET Core Integration

Last week I finally started my journey with Microsoft.Extensions.AI after having used only Semantic Kernel for all my agentic AI workflows. I started with a short introduction on what Microsoft.Extensions.AI is and we created our first 'Hello AI' demo combining Microsoft.Extensions.AI and AI Foundry Local. This post is part of a blog series. Other posts so far: Part I – An introduction to Microsoft.Extensions.AI Part II – ASP.NET Core integration (this post) Most of the time you will not have your AI workloads running in a console application but integrated in an ASP.NET Core app so that is exactly what we are trying to achieve today. Integrating Microsoft.Extensions.AI in ASP.NET Core We’ll start simple, we want to show a Razor page where we can enter some text and let the LLM respond. Important is that the results are streamed to the frontend. Start by creating a new ASP.NET Core application. Use the Razor pages template in Visual Studio: We up...

GitHub Copilot–We still need the human in the loop

I picked up a bug today where we got a NullReferenceException . I thought this was a good scenario where I could ask GitHub Copilot to find and fix the issue for me. Here is the orignal code containing the issue: I asked Copilot to investigate and fix the issue using the /fix slash command; /fix This code returns a NullReferenceException in some situations. Can you investigate an issue and suggest a solution? GitHub Copilot was successful in identifying the root cause of the problem. I was passing a ConnectionName using a different casing as the key found in the dictionary (e.g. Northwind vs northwind ). That’s good. However then I noticed the solution it suggested: Although that is a workable solution that certainly fixes the issue, it is certainly not the simplest and most performant solution. I undid the changes done by Copilot and updated the Dictionary construction instead: The human in the loop is still required... More information Tips & Tricks for Git...

Start your own coding adventure with GitHub Copilot

Imagine learning programming concepts not through dry textbooks or boring exercises, but by embarking on epic quests in mystical realms. Doesn't sound that appealing to you? Yes? Join Copilot Adventures , Microsoft's innovative approach to coding education that transforms programming practice into an engaging, story-driven experience. What is Copilot Adventures? Copilot Adventures is an open-source educational project that combines the power of GitHub Copilot with immersive storytelling to teach programming concepts. Instead of solving abstract problems, you work through coding challenges embedded in rich fantasy narratives—from mechanical clockwork towns to enchanted forests where mystical creatures perform sacred dances. The project leverages GitHub Copilot, Microsoft's AI-powered coding assistant, to help learners write code while exploring these fictional worlds. It's essentially a "choose your own adventure" for programmers, where each story presen...

An introduction to Microsoft.Extensions.AI–Part I

Last year, when the AI hype really exploded, the 'go to' library to build AI solutions in .NET at that time from Microsoft was Semantic Kernel. So although at that time still in preview, I started using Semantic Kernel and never looked back. Later Microsoft introduced Microsoft.Extensions.AI but I never had the time to take a good look at it. Now I finally found some time to explore it further. My goal is to write a few posts in which I recreate an application that I originally created in Semantic Kernel to see how far we can get. But that will be mainly for the upcoming posts. In this post we focus on the basics to get started. What is Microsoft.Extensions.AI? Microsoft.Extensions.AI libraries provide a unified approach for representing generative AI components and enable seamless integration and interoperability with various AI services. Think of it as the dependency injection and logging abstractions you already know and love but specifically designed for AI services. ...

The one question that transforms every coaching session

As rewarding coaching can be, as challenging it is. While reading the 'How to be a more effective coach?' post by JD Meier, he shared one 'bonus' question that really created a breakthrough in how I tackle these coaching conversations. What would make this conversation wildly valuable for you today? This one question makes all the difference as it shifts the focus from you to them , immediately. Why this question works so well It transfers ownership immediately The moment you ask this question, something profound happens. The conversation stops being about your agenda and becomes entirely about theirs. You're not trying to fix, advise, or direct. Instead, you're creating a container for their most important work to emerge. This transfer of ownership is crucial because: People are more invested in solutions they help create People often know what they need better than we do It honors their autonomy and expertise in their own lives ...

Getting started with AI development in .NET

Getting started in the world of AI development can be a challenge. Every day new libraries, models and possibilities appear. So what is your first step and where can I find good examples on how to tackle different problems? This is where Microsoft wants to help through the AI Dev Gallery. The AI Dev Gallery is an open-source app designed to help Windows developers integrate AI capabilities within their own apps and projects. The app contains the following: Over 25 interactive samples powered by local AI models Easily explore, download, and run models from Hugging Face and GitHub The ability to view the C# source code and simply export a standalone Visual Studio project for each sample You can download the AI Dev Gallery directly or through the Windows App Store: A walkthrough Let me walk you through some of the features in the AI Dev Gallery application. After opening the app you arrive on the Home page where you have a carrousel of different use cases: ...