Skip to main content


Showing posts with the label Semantic Kernel

Functions And Plugins In Semantic Kernel

It's been a while since Semantic Kernel is around and in the last few months, a lot of many things have changed, specifically from the implementation point of view. Hence, I thought of summarize the key functions to help you understand better, which are also listed in Evan's blog.. As of today, there are 3 different ways to add plugins into the Semantic Kernel. Here are those: From a directory: Need to provide parent_directory and plugin_name  Using KernelPlugin instance  Using KernelFunction: Need to create a custom class or a dictionary where methods are decorated with kernel_function Similarly, there are few different ways to add functions in Semantic Kernel: KernelFunction.from_prompt a.k.a KernelFunctionFromPrompt(function_name, plugin_name, description, prompt, template_format, prompt_template, prompt_template_config, prompt_execution_settings)  KernelFunctionFromPrompt.from_yaml(yaml_str, plugin_name (optional)) KernelFunctionFromPrompt.from_directory(path, plugin_name (

Generate The Streamed Response Using Semantic Kernel

Semantic Kernel , a powerful tool for integrating large language models into your applications, now supports streaming responses. In this blog post, we’ll explore how to leverage this feature to obtain streamed results from LLMs like AzureOpenAI and OpenAI. Why Streamed Responses Matter When working with language models, especially in conversational scenarios, streaming responses offer several advantages: Real-time Interaction: Streaming allows you to receive partial responses as they become available, enabling more interactive and dynamic conversations. Reduced Latency: Instead of waiting for the entire response, you can start processing and displaying content incrementally, reducing overall latency. Efficient Resource Usage: Streaming conserves memory and resources by handling data in smaller chunks. How to Use Streaming Responses I've published a complete video on how to generate this using Python and that can be found on my YouTube channel named Shweta Lodha . Here, I'm jus

Learn to Call Your Custom Function Using Semantic Kernel

In this tutorial, we will dive into the fascinating world of Semantic Kernel and explore how to seamlessly integrate our custom functions into AI applications. Whether you’re a developer, data scientist, or just curious about the intersection of language models and native code, this tutorial is for you! 📌 Key Points Covered: Why Create Functions for Your AI?  Large language models excel at generating text, but there are tasks they can’t handle alone. I'll discuss scenarios where native functions shine, such as retrieving data from external sources, performing complex math, and interacting with the real world. Creating Your Native Functions: Set up a new folder for your plugins Dive into the creation of your own plugin to demonstrate the required operations Implement functions as required Running Your Native Functions: I'll also highlight, how  Semantic Kernel utilizes  KernelFunctions to invoke our custom functions. 🎥  Watch the Full Tutorial: Shweta Lodha