What are Skills?
ASK⇾ | Kernel | Planner | Skills | Memories | Connectors | >>> | ⇾GET |
---|
A skill refers to a domain of expertise made available to the kernel as a single function, or as a group of functions related to the skill. The design of SK skills has prioritized maximum flexibility for the developer to be both lightweight and extensible.
Tip
Try the Simple chat summary sample app to quickly see Skills in action.
What is a Function?
A function is the basic building block for a skill. A function can be expressed as either:
- an LLM AI prompt — also called a "semantic" function
- native computer code -- also called a "native" function
When using native computer code, it's also possible to invoke an LLM AI prompt — which means that there can be functions that are hybrid LLM AI × native code as well.
Functions can be connected end-to-end, or "chained together," to create more powerful capabilities. When they are represented as pure LLM AI prompts in semantic functions, the word "function" and "prompt" can be used interchangeably.
What is the relationship between semantic functions and skills?
A skill is the container in which functions live. You can think of a semantic skill as a directory of folders that contain multiple directories of semantic functions or a single directory as well.
SkillName (directory name)
│
└─── Function1Name (directory name)
│
└─── Function2Name (directory name)
Each function directory will have an skprompt.txt
file and a config.json
file. There's much more to learn about semantic functions in Building Semantic Functions if you wish to go deeper.
What is the relationship between native functions and skills?
Native functions are loosely inspired by Azure Functions and exist as individual native skill files as in MyNativeSkill.cs
below:
MyAppSource
│
└───MySkillsDirectory
│
└─── MySemanticSkill (a directory)
| │
| └─── MyFirstSemanticFunction (a directory)
| └─── MyOtherSemanticFunction (a directory)
│
└─── MyNativeSkill.cs (a file)
└─── MyOtherNativeSkill.cs (a file)
Each file will contain multiple native functions that are associated with a skill.
Where to find skills in the GitHub repo
Skills are stored in one of three places:
- Core Skills: these are skills available at any time to the kernel that embody a few standard capabilities like working with time, text, files, http requests, and the Planner.
semantic-kernel/dotnet/src/SemanticKernel/CoreSkills
Semantic Skills: these skills are managed by you in a directory of your choice.
Native Skills: these skills are also managed by you in a directory of your choice.
For more examples of skills, and the ones that we use in our sample apps, look inside:
semantic-kernel/samples/skills
Take the next step
Now that you know about the kernel, planner, skills, you can take on memories._