Semantic Kernel: Diving into Microsoft’s AI orchestration SDK

[ad_1]

For C#, you may set up Semantic Kernel from NuGet. The command line is:

     dotnet add bundle Microsoft.SemanticKernel

For Python, you may set up Semantic Kernel from PyPI. The command line is:

     pip set up semantic-kernel

It’s attainable that you will want to make use of pip3 relatively than pip.

In Java, you may construct the mission within the repo from the Maven wrapper, and that may pull in all the things you want.

Irrespective of which language you utilize, you’ll want an API key, both from OpenAI or Azure OpenAI. Save the API key domestically in a secure place. You’ll additionally must enter the API key someplace (it varies by language) in order that the code can use it to name LLMs. Should you run the Bing search instance (see screenshot under) you’ll additionally must get a Bing API key from Azure.

Except you may have a powerful curiosity in Python or Java, I recommend that you just learn and run the C# pocket book examples, that are at present in the very best form, i.e. they principally work with out throwing errors and principally match the documentation. Coming into the API key for these occurs interactively within the first instance.

The repository has a part on studying Semantic Kernel. A number of the content material referenced is useful. Nonetheless, among the titles now not match the content material, and among the content material is at present lacking examples for explicit languages.

Sample C# notebook for Semantic Kernel

This pattern is the final of the C# notebooks for Semantic Kernel. It makes use of Bing search along side the Semantic Kernel and an OpenAI mannequin to offer present outcomes for queries.

IDG

Semantic Kernel Cookbook

The Semantic Kernel Cookbook, an open-source handbook primarily targeted on the implementation of the Semantic Kernel for newcomers, is accessible in English and Simplified Chinese language. It’s an attention-grabbing complement to the official Semantic Kernel documentation, written by kinfey, a Microsoft Cloud Advocate.

Undertaking Miyagi

Undertaking Miyagi is an “as-is” demo envisioning pattern for the Copilot stack. It contains examples of utilization for Semantic Kernel, Promptflow, LlamaIndex, LangChain, vector shops (Azure AI Search, CosmosDB Postgres pgvector), and generative picture utilities reminiscent of DreamFusion and ControlNet. Undertaking Miyagi can also be attention-grabbing as a complement to the official Semantic Kernel documentation.

Semantic Kernel mission

Given how a lot Microsoft has invested in Copilots and Copilot+ PCs, you’ll suppose that the Semantic Kernel mission would get some severe sources. However no. In December 2023 the Semantic Kernel repo bought over 100 commits every week; in June 2024, it has been getting about 30 commits every week. The core framework code appears to be progressing, particularly the C# model, and the Python and Java code appears to be catching up, however the documentation and examples don’t appear to be getting a lot love regardless of being outdated.

Maybe I’m seeing a traditional growth cycle for an open supply mission. There was a giant spike in code additions and deletions in Might 2024, just like the spikes in April and October of 2023. It’s attainable that the documentation and instance writers have been ready for the code to calm down earlier than updating their components of the mission.

Or, probably, Microsoft merely doesn’t care concerning the Semantic Kernel open-source mission. Their inside efforts have been sufficient to launch a number of Copilots. So far as exterior growth of AI purposes goes, they could be content material to let LangChain or LlamaIndex dominate the ecosystem relatively than pushing their very own Semantic Kernel, so long as builders use Azure or OpenAI providers. Time will inform.

Execs

  1.             A free open-source SDK that permits you to construct brokers that may name your present code.
  2.             Helps C#, Python, and Java.
  3.             Moderately simple to be taught and use, particularly in C#.
  4.             Can generate its personal plans.

Cons

  1.             Utilizing planners is pricey (makes use of a number of AI tokens) and introduces noticeable delays for the person.
  2.             The documentation and examples appear to be out-of-date or lacking for Python and Java.

Value

Free open supply, MIT License.

Platform

C#, Python, and Java.

[ad_2]

Leave a Reply

Your email address will not be published. Required fields are marked *