Skip to content

Commit d9a02c7

Browse files
committed
Bug fixes
1 parent 8f77979 commit d9a02c7

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

learn-pr/wwl-azure/give-your-ai-agent-skills/includes/2-understand-native-plugins.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Plugins are a key component of the Semantic Kernel SDK. Plugins allow you to encapsulate your functions into a collection that can be used by the AI. Behind the scenes, Semantic Kernel uses function caling to perform planning and invoke your code. The LLM (Large Language Model) can request specific functions and the Semantic Kernel will route the request to the appropriate function in your code. The results are returned back to the LLM so that it can generate a final response.
1+
Plugins are a key component of the Semantic Kernel SDK. Plugins allow you to encapsulate your functions into a collection that can be used by the AI. Behind the scenes, Semantic Kernel uses function calling to perform planning and invoke your code. The LLM (Large Language Model) can request specific functions and the Semantic Kernel will route the request to the appropriate function in your code. The results are returned back to the LLM so that it can generate a final response.
22

33
## Creating a plugin
44

5-
For the Semantic Kernel to correctly route requests to your functions, the plugins you create must include details that describe the function's behavior. The details need to be written in a way that can be understood by the AI. The function's input, output and side effects should be described so that they AI can use the function. To create a plugin function, you add the following attributes to your function: `KernelFunction`, `Description`, and `return` if there is data returned from the function. Here is an example of a task managment plugin with a function and its description:
5+
For the Semantic Kernel to correctly route requests to your functions, the plugins you create must include details that describe the function's behavior. The details need to be written in a way that can be understood by the AI. The function's input, output and side effects should be described so that they AI can use the function. To create a plugin function, you add the following attributes to your function: `KernelFunction`, `Description`, and `return` if there's data returned from the function. Here's an example of a task management plugin with a function and its description:
66

77
```c#
88
using System.ComponentModel;
@@ -37,7 +37,7 @@ public class TaskManagementPlugin
3737
}
3838
```
3939

40-
In this example, there is a simple `CompleteTask` function that marks a task as complete. To call your function, you need to add the plugin to the kernel using `Plugins.AddFromType`. This will give the kernel access to the plugin's functions. Afterwards you can invoke a function using the `InvokeAsync` method.
40+
In this example, there's a simple `CompleteTask` function that marks a task as complete. To call your function, you need to add the plugin to the kernel using `Plugins.AddFromType`. This will give the kernel access to the plugin's functions. Afterwards you can invoke a function using the `InvokeAsync` method.
4141

4242
```c#
4343
var builder = new KernelBuilder();
@@ -51,7 +51,7 @@ var arguments = new KernelArguments { ["id"] = id };
5151
var updatedTask = await kernel.InvokeAsync("TaskManagement", "complete_task", arguments);
5252
```
5353

54-
Using plugin functions allows your agent to perform tasks beyond the capabilities of a typical LLM, such as managing data, interacting with external systems, or handling specific business logic. The modularity of plugins make it easy to add new functionality to your agent without modofying core logic. This approach keeps your code organized, reusable, and easier to maintain.
54+
Using plugin functions allows your agent to perform tasks beyond the capabilities of a typical LLM, such as managing data, interacting with external systems, or handling specific business logic. The modularity of plugins make it easy to add new functionality to your agent without modifying core logic. This approach keeps your code organized, reusable, and easier to maintain.
5555

5656
## Invoke functions automatically
5757

@@ -116,7 +116,7 @@ To enhance the LLM's ability to understand and utilize your plugin functions, co
116116

117117
- **Use descriptive and concise function names**
118118

119-
Names that clearly convey the function's purpose will help the model understand when to call the function. Avoid using abbreviations or acroynms to shorten function names. The DescriptionAttribute increases token consumption, so use it to provide context and instructions when necessary.
119+
Names that clearly convey the function's purpose will help the model understand when to call the function. Avoid using abbreviations or acronyms to shorten function names. The DescriptionAttribute increases token consumption, so use it to provide context and instructions when necessary.
120120

121121
- **Minimize function parameters**
122122

learn-pr/wwl-azure/give-your-ai-agent-skills/includes/3-exercise-create-native-plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ A starter project is available for you to use for this exercise. Use the followi
2222

2323
1. Open the project in Visual Studio Code.
2424

25-
1. Open the **appsettings.json** file and update the values with your Azure OpenAI Services model id, endpoint, and API key.
25+
1. Open the **appsettings.json** file and update the values with your Azure OpenAI Services modelId, endpoint, and API key.
2626

2727
```json
2828
{

learn-pr/wwl-azure/give-your-ai-agent-skills/includes/4-configure-function-choices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Function advertising and function choice behavior allow developers to control how the AI model accesses and invokes external functions during execution. These lets you tailor the AI's responses based on specific scenarios, such as integrating with APIs for real-time data, restricting functionality for privacy or security, or enhancing the relevance of responses by narrowing the available functions. By strategically managing these behaviors, developers can optimize their AI application's performance.
1+
Function advertising and function choice behavior allow developers to control how the AI model accesses and invokes external functions during execution. These let you tailor the AI's responses based on specific scenarios, such as integrating with APIs for real-time data, restricting functionality for privacy or security, or enhancing the relevance of responses by narrowing the available functions. By strategically managing these behaviors, developers can optimize their AI application's performance.
22

33
## Function Advertising
44

learn-pr/wwl-azure/give-your-ai-agent-skills/includes/5-exercise-configure-available-functions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
In this exercise, you extend your AI travel assistant to help users convert currency and get the weather forecast in ther destination city. You focus on function choice behaviors to ensure the assistant invokes the correct functions for specific tasks. Let's get started!
1+
In this exercise, you extend your AI travel assistant to help users convert currency and get the weather forecast in their destination city. You focus on function choice behaviors to ensure the assistant invokes the correct functions for specific tasks. Let's get started!
22

33
## Task 1: Advertise selected functions
44

@@ -99,7 +99,7 @@ WeatherPlugin: Provides weather forecasts for travel destinations.
9999

100100
## Task 2: Enforcing Required Function Choice Behavior
101101

102-
In this task, you will require the model to choose at least one function, ensuring the assistant provides the necessary information about weather for a particular destination.
102+
In this task, you'll require the model to choose at least one function, ensuring the assistant provides the necessary information about weather for a particular destination.
103103

104104
1. Add the weather plugin to the kernel with the following code:
105105

@@ -132,7 +132,7 @@ In this task, you will require the model to choose at least one function, ensuri
132132

133133
1. Enter `dotnet run` in the terminal to test the code.
134134

135-
You should see a response similar to the following oujtput:
135+
You should see a response similar to the following output:
136136

137137
```output
138138
User: What is the weather in Tokyo

0 commit comments

Comments
 (0)