28.5 C
New York
Monday, July 22, 2024

Semantic Kernel: Diving into Microsoft’s AI orchestration SDK

Semantic Kernel: Diving into Microsoft’s AI orchestration SDK


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

     dotnet add package deal Microsoft.SemanticKernel

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

     pip set up semantic-kernel

It’s attainable that you’ll want to make use of pip3 somewhat than pip.

In Java, you possibly can construct the venture within the repo from the Maven wrapper, and that can pull in the whole lot you want.

Irrespective of which language you utilize, you’ll want an API key, both from OpenAI or Azure OpenAI. Save the API key regionally 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. When you run the Bing search instance (see screenshot under) you’ll additionally must get a Bing API key from Azure.

Until you could have a robust curiosity in Python or Java, I recommend that you just learn and run the C# pocket book examples, that are presently in the perfect form, i.e. they principally work with out throwing errors and principally match the documentation. Getting into the API key for these occurs interactively within the first instance.

The repository has a part on studying Semantic Kernel. Among the content material referenced is useful. Nevertheless, a few of the titles not match the content material, and a few of the content material is presently lacking examples for specific 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 together with the Semantic Kernel and an OpenAI mannequin to supply present outcomes for queries.

IDG

Semantic Kernel Cookbook

The Semantic Kernel Cookbook, an open-source handbook primarily centered on the implementation of the Semantic Kernel for rookies, is offered 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 equivalent to DreamFusion and ControlNet. Undertaking Miyagi can also be attention-grabbing as a complement to the official Semantic Kernel documentation.

Semantic Kernel venture

Given how a lot Microsoft has invested in Copilots and Copilot+ PCs, you’ll suppose that the Semantic Kernel venture would get some critical sources. However no. In December 2023 the Semantic Kernel repo obtained over 100 commits per week; in June 2024, it has been getting about 30 commits per 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 old-fashioned.

Maybe I’m seeing a traditional growth cycle for an open supply venture. There was an enormous spike in code additions and deletions in Could 2024, much 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 quiet down earlier than updating their elements of the venture.

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

Professionals

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

Cons

  1.             Utilizing planners is dear (makes use of a lot of AI tokens) and introduces noticeable delays for the consumer.
  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.



Supply hyperlink

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles