You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn-pr/wwl-azure/give-your-ai-agent-skills/includes/2-understand-native-plugins.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff 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.
2
2
3
3
## Creating a plugin
4
4
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:
6
6
7
7
```c#
8
8
usingSystem.ComponentModel;
@@ -37,7 +37,7 @@ public class TaskManagementPlugin
37
37
}
38
38
```
39
39
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.
41
41
42
42
```c#
43
43
varbuilder=newKernelBuilder();
@@ -51,7 +51,7 @@ var arguments = new KernelArguments { ["id"] = id };
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.
55
55
56
56
## Invoke functions automatically
57
57
@@ -116,7 +116,7 @@ To enhance the LLM's ability to understand and utilize your plugin functions, co
116
116
117
117
-**Use descriptive and concise function names**
118
118
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.
Copy file name to clipboardExpand all lines: learn-pr/wwl-azure/give-your-ai-agent-skills/includes/4-configure-function-choices.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff 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.
Copy file name to clipboardExpand all lines: learn-pr/wwl-azure/give-your-ai-agent-skills/includes/5-exercise-configure-available-functions.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff 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!
## Task 2: Enforcing Required Function Choice Behavior
101
101
102
-
Inthistask, youwillrequirethemodeltochooseatleastonefunction, ensuringtheassistantprovidesthenecessaryinformationaboutweatherfor a particular destination.
102
+
Inthistask, you'll require the model to choose at least one function, ensuring the assistant provides the necessary information about weather for a particular destination.
0 commit comments