News

Microsoft Pushes Open Source 'Semantic Kernel' for AI LLM-Backed Apps

Since recently introducing the open source Semantic Kernel to help developers use AI large language models (LLMs) in their apps, Microsoft has been busy improving it, publishing new guidance on how to use it and touting its capabilities.

Developers can use Semantic Kernel (SK) to create natural language prompts, generate responses, extract information, invoke other prompts or perform other tasks that can be expressed with text.

LLM prompting is an emerging discipline for getting the most out of queries to machine learning models that power advanced AI systems like ChatGPT from Microsoft partner OpenAI. The recently introduced GPT-4 is the latest LLM from OpenAI, which claims it significantly outperforms ChatGPT.

Being able to write effective LLM prompts, called prompt engineering, is one of the most sought-after skills in IT these days, with job postings for the position citing salary ranges up to $335,000.

When Microsoft announced Semantic Kernel on March 17, prompting was a key part of the project's description: "Semantic Kernel (SK) is a lightweight SDK that lets you mix conventional programming languages, like C# and Python, with the latest in Large Language Model (LLM) AI 'prompts' with prompt templating, chaining, and planning capabilities."

Better prompting is also one of the four key benefits of the open source project:

  • Fast integration: SK is designed to be embedded in any kind of application, making it easy for you to test and get running with LLM AI.
  • Extensibility: With SK, you can connect with external data sources and services -- giving their apps the ability to use natural language processing in conjunction with live information.
  • Better prompting: SK's templated prompts let you quickly design semantic functions with useful abstractions and machinery to unlock LLM AI's potential.
  • Novel-But-Familiar: Native code is always available to you as a first-class partner on your prompt engineering quest. You get the best of both worlds.

In fact, that open source GitHub repo has an entire section devoted to prompt templating, which is done with a bespoke prompt template language.

As part of its post-debut push to publicize SK, Microsoft just today (March 30) published a post titled "Semantic Kernel Planner: Improvements with Embeddings and Semantic Memory," which details improvements to the project's Planner skill, allowing users to create and execute plans based on semantic queries. The post explains a recent tweak that made the Planner skill even more versatile.

[Click on image for larger view.] Semantic Kernel (source: Microsoft).

The tweak involved the integration of embeddings into the Planner skill in order to enhance its usability and functionality. Embeddings are vectors or arrays of numbers that represent the meaning and the context of tokens processed by the model. Used to encode and decode input and output texts, embeddings can help an LLM understand the relationships between tokens and generate relevant and coherent texts. They are used for text classification, summarization, translation and generation, including image and code generation.

"As the Semantic Kernel evolves in its Alpha stage, we'll prioritize other methods of using embeddings for plan creation that will be even more powerful," Microsoft said.

Semantic Kernel embeddings were also showcased in an earlier post titled "Semantic Kernel Embeddings and Memories: Explore GitHub Repos with Chat UI," which explains how they can help developers ask questions about or explore a GitHub repo with natural language queries. Along with embeddings, that's done with the help of SK memories (collections of embeddings), which help provide broader context to a prompt (or an ASK in the SK world).

[Click on image for larger view.] A Semantic Kernel ASK (source: Microsoft).

The post highlights a sample app, GitHub Repo Q&A Bot, which shows how developers can use a SK function to download any GitHub repo, store it in memories (collections of embeddings), and query it with a chat UI.

Microsoft said the sample can be used as a guide for storing and querying items like:

  • Large internal procedure manuals
  • Educational materials for students
  • Corporate contracts
  • Product documentation

Microsoft's push to publicize SK also involved a post this week titled "How to Deploy Semantic Kernel to Azure in Minutes." That's done with Azure functions, Microsoft's serverless computing service that lets users run code without managing servers or infrastructure.

The demo uses Visual Studio Code and requires installation of the Azure Tools extension.

"If you have been following the Semantic Kernel GitHub repo, you have probably experimented with some of the examples and seen how powerful and flexible the platform is for adding intelligence to your own apps. You might be eager to take your Semantic Kernel skills to the next level and deploy our SDK to the cloud," Microsoft said.

If the above three posts published in the two weeks since the introduction of Semantic Kernel are any indication, Microsoft plans on taking it to a lot more places than that.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube