For more information, follow the official (Learning Path)[https://learn.microsoft.com/en-us/training/paths/develop-ai-agents-azure-open-ai-semantic-kernel-sdk/] from Microsoft.
This repository provides a hands-on learning path for using Semantic Kernel with Azure OpenAI and OpenAI services in Python. The notebooks and scripts guide you through building, extending, and interacting with AI-powered applications using Semantic Kernel.
- build_your_kernel: Learn how to set up a Semantic Kernel, configure Azure OpenAI services, and invoke prompts.
- run_prompts_with_semantic_kernel: Explore creating and invoking prompt-based functions, using both standard and Handlebars templates, and working with chat history and multimodal content.
- create_semantic_kernel_plugins: Discover how to create, register, and invoke custom plugins (native functions) with the kernel, including advanced topics like function calling and execution settings.
- guided_project: Apply your knowledge in a practical project, integrating a currency conversion plugin and building a conversational itinerary planner.
- Kernel Initialization: Setting up the Semantic Kernel and connecting to Azure OpenAI or OpenAI services.
- Prompt Functions: Creating functions from prompt strings, templates, and YAML, including support for Handlebars templating.
- Plugins: Defining and registering native Python plugins with the kernel using the
@kernel_function
decorator and type annotations for better LLM understanding. - Function Invocation: Invoking functions directly, via the kernel, or through chat history with automatic function calling.
- Chat History: Managing and iterating over chat history, including multimodal messages (text and images).
- Execution Settings: Controlling function calling behavior with
FunctionChoiceBehavior
and prompt execution settings. - Practical Scenarios: Building a travel planner, task management, flight booking, and currency conversion bots.
Applying Filters on Functions:
The current learning path does not include a section on applying filters to functions for prompt injection protection or advanced function selection. This is due to the lack of official documentation for Python at this time. For more information, see the Semantic Kernel documentation on prompt injection attacks.
- Clone the repository.
- Set up your Python environment and install dependencies.
- Configure your .env file with Azure OpenAI or OpenAI credentials. This file should be created in the root directory.
- Open the notebooks in the learning_path directory and follow along.