Jason Haley

Ramblings from an Independent Consultant

Semantic Kernel Hello World Plugins Part 2

Two weeks ago I blogged Part 1, in which I moved the prompt to a prompt template. In this part, I implement a native function that will take in the current date and make the call to the LLM. I’ve put the code for this blog in the HelloWorld.Plugin2.Console project in the same repo as the other SK entries: semantic-kernel-getting-started. Semantic Kernel Plugin: Native Function There is a good Microsoft Learn module: Give your AI agent skills that walks you through the details of what a native function is and how to implement them. The functions in that learn module don’t make calls to OpenAI - which is something I wanted to do … so I had to do some digging on how to make this work. Turns out it isn’t that hard to do - though I also discovered there is a lot of SK demo …

Semantic Kernel Hello World Plugins Part 1

A couple of weeks ago, in my last entry I created a simple Hello World application with Semantic Kernel. Since then, I’ve worked my way through the MS Learning path: APL-2005 Develop AI agents using Azure OpenAI and the Semantic Kernel SDK - which I highly recommend if you are also learning SK. In this entry I’m going to start with the code from the last entry and extract the prompt to a plugin. I’ve put the code for this blog in the same repo as the last entry: semantic-kernel-getting-started Semantic Kernel Plugins There are two types of plugin functionality in the sample code: prompts and native functions. Just a quick review, the hello world example is to call OpenAI with a simple prompt with today’s day and return a historical fact about the date. The output …

Semantic Kernel Hello World

This past Thursday night after the Virtual Boston Azure meetup, Bill Wilder (@codingoutloud) created an AI mini-workshop (hands on) for the attendees that were interested in getting hands on with code using the Azure OpenAI API. This post is me using the same idea but with Semantic Kernel. OpenAI Chat Hello World C# Bill provided the following code for us to get a simple OpenAI chat working: using Azure; using Azure.AI.OpenAI; string? key = "..."; string? endpoint = "..."; string? deployment = "..."; // output today's date just for fun Console.WriteLine($"\n----------------- DEBUG INFO -----------------"); var today = DateTime.Now.ToString("MMMM dd"); Console.WriteLine($"Today is {today}"); …

Demo Review: Azure Vector Search AI Assistant

Demo Review: Azure Vector Search AI Assistant This is the fourth C# demo in The RAG Demo Chronicles (Blog Series) and is the first demo so far that saves its history to a database. This Retrieval Augmented Generation (RAG) demo is a little different than the last three because it primarily uses data from a database as the content to search instead of documents. It also uses Semantic Kernel more than other demos have, which is neat to see too. This demo has me thinking about the many times in my career when executives or product managers have wanted a tool easy enough to use to create their own reports. Certainly, gets the ideas flowing! Demo Details NOTE: The demo is on the cognitive-search-vector branch Item of Interest As of 2/27/2024 Author: 3 Date created: 5/7/2023 Update within last …

Demo Review: Azure Search OpenAI Demo C#

Demo Review: Azure Search OpenAI Demo C# If you are looking for Retrieval Augmented Generation (RAG) demos that utilize Azure Search and Azure OpenAI (along with several other supporting Azure services), then there is a set of related demos that do just that in GitHub. This family of RAG demos consists of: azure-search-openai-demo-csharp - written in C#. azure-search-openai-demo - written in python. azure-search-openai-javascript - written in javascript/typescript. azure-search-openai-demo-java - written in java. This post is about #1 above, I will cover #2 and #3 in later posts, but I will leave the Java version to someone else to review. Before digging into this family of demos, it is important to note they are not the same functionality ported to different languages. The thing they have …