title | description | author | ms.topic | ms.author | ms.date | ms.service |
---|---|---|---|---|---|---|
How to quickly start with Semantic Kernel |
Follow along with Semantic Kernel's guides to quickly learn how to use the SDK. |
matthewbolanos |
quickstart |
mabolan |
07/11/2023 |
semantic-kernel |
In just a few steps, you can start running the getting started guides for Semantic Kernel in either C# or Python. After completing the guides, you'll know how to...
- Configure your local machine to run Semantic Kernel
- Run AI prompts from the kernel
- Make AI prompts dynamic with variables
- Create a simple AI agent
- Automatically combine functions together with planners
- Store and retrieve memory with embeddings
If you are an experienced developer, you can skip the guides and directly access the packages from the Nuget feed or PyPI.
Instructions for accessing the SemanticKernel
Nuget feed is available here. It's as easy as:
#r "nuget: Microsoft.SemanticKernel, *-*"
Instructions for accessing the SemanticKernel
Python package is available here. It's as easy as:
pip install semantic-kernel
Before running the guides in C#, make sure you have the following installed on your local machine.
[!div class="checklist"]
git
or the GitHub app- VSCode or Visual Studio
- An OpenAI key via either Azure OpenAI Service or OpenAI
- .Net 7 SDK - for C# notebook guides
- In VS Code the Polyglot Notebook - for notebook guides
If you are using the Python guides, you just need git
and python
. These guides have been tested on python versions 3.8-3.11.
To setup the guides, follow the steps below.
Tip
Have your OpenAI or Azure OpenAI keys ready to enter when prompted by the Jupyter notebook.
-
Use your web browser to visit aka.ms/sk/repo on GitHub.
-
Clone or fork the repo to your local machine.
[!NOTE] If you are new to using GitHub and have never cloned a repo to your local machine, please review this guide. [!NOTE] If you are a new contributor to open source, please fork the repo to start your journey.
If you have trouble cloning or forking the repo, you can watch the video below.
[!VIDEO https://learn-video.azurefd.net/vod/player?id=5a410eae-b131-4227-a8e5-8e24e0cefd8e]
-
While the repository is open in VS Code, navigate to the
/dotnet/notebooks
or/python/notebooks
folder. -
Choose either the
dotnet
orpython
folder based on your preferred programming language. -
Open the 00-getting-started.ipynb notebook.
-
Activate each code snippet with the "play" button on the left hand side.
If you need help running the 00-getting-started.ipynb notebook, you can watch the video below.
[!VIDEO https://learn-video.azurefd.net/vod/player?id=fc3c792e-3b4d-4009-900c-588ee35ee426]
-
Repeat for the remaining notebooks.
If you are a fan of Semantic Kernel, please give the repo a ⭐️ star to show your support.
:::image type="content" source="../media/pleasestarrepo.png" alt-text="Starring the repo for SK to show support":::
The guides are an easy way run sample code and learn how to use Semantic Kernel. If you want to learn more about the concepts behind Semantic Kernel, keep reading the docs. Based on your experience level, you can jump to the section that best fits your needs.
Experience level | Next step |
---|---|
For beginners who are just starting to learn about AI | Learn prompt engineering |
For people who are well versed in prompt engineering | Orchestrate AI plugins |
For people familiar with using AI plugins | Store and retrieve memory |
[!div class="nextstepaction"] Learn how to Orchestrate AI