Skip to content

Commit

Permalink
Remove PlannerSkill and add SequentialPlanner (microsoft#523)
Browse files Browse the repository at this point in the history
### Motivation and Context
This pull request contains a series of changes that refactor and improve
the planning module and tests in the SemanticKernel project. The
planning module is responsible for creating and executing plans based on
natural language prompts and available skills. The changes aim to
simplify the code, enhance the functionality, and increase the test
coverage and quality of the planning module.

### Description
- Add a new SequentialPlanner class that uses semantic function to
generate plans from natural language prompts
- Add a new SequentialPlanParser class that parses the XML output of the
semantic function and converts it into a Plan object
- **Remove PlannerSkill**
- Rename PlannerConfig class that contains common configuration options
for planner instances, such as the maximum number of tokens, the
relevancy threshold, and the excluded or included functions
- Refactor the Plan class to make it more consistent and robust, and add
support for serialization, named outputs, and nested plans
- Add unit tests for the SequentialPlanner, SequentialPlanParser, and
Plan classes and refactor the existing planning tests to use mock
functions and skills.
- Fix a failing web skill test by skipping it due to inconsistent Bing
search results
  • Loading branch information
lemillermicrosoft authored Apr 21, 2023
1 parent a73bf9a commit 77259db
Show file tree
Hide file tree
Showing 43 changed files with 1,996 additions and 4,352 deletions.
29 changes: 17 additions & 12 deletions FEATURE_MATRIX.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,48 @@

## AI Services
| | C# | Python | Notes |
|---|---|---|---|
|---|---|---|---|
| TextGeneration ||| Example: Text-Davinci-003 |
| TextEmbeddings ||| Example: Text-Embeddings-Ada-002 |
| ChatCompletion ||| Example: GPT4, Chat-GPT |
| Image Generation ||| Example: Dall-E |

## AI Service Endpoints
| | C# | Python | Notes |
|---|---|---|---|
|---|---|---|---|
| OpenAI ||| |
| AzureOpenAI ||| |
| Hugging Face ||| Coming soon to Python - both native and web endpoint support |
| Hugging Face ||| Coming soon to Python - both native and web endpoint support |
| Custom ||| Requires the user to define the service schema in their application |

## Tokenizers
| | C# | Python | Notes |
|---|---|---|---|
|---|---|---|---|
| GPT2 || 🔄 | Can be manually added to Python via `pip install transformers` |
| GPT3 ||| |
| tiktoken | 🔄 || Coming soon to Python and C#. Can be manually added to Python via `pip install tiktoken` |
| GPT3 ||| |
| tiktoken | 🔄 || Coming soon to Python and C#. Can be manually added to Python via `pip install tiktoken` |

## Core Skills
| | C# | Python | Notes |
|---|---|---|---|
|---|---|---|---|
| TextMemorySkill ||| |
| PlannerSkill || 🔄 | |
| ConversationSummarySkill ||| |
| ConversationSummarySkill ||| |
| FileIOSkill ||| |
| HttpSkill ||| |
| MathSkill ||| |
| TextSkill ||| |
| TimeSkill ||| |

## Connectors and Skill Libraries
## Planning
| | C# | Python | Notes |
|---|---|---|---|
| Qdrant (Memory) ||| Vector optimized |
|---|---|---|---|
| Plan ||| |
| SequentialPlanner ||| |

## Connectors and Skill Libraries
| | C# | Python | Notes |
|---|---|---|---|
| Qdrant (Memory) ||| Vector optimized |
| ChromaDb (Memory) || 🔄 | |
| Milvus (Memory) ||| Vector optimized |
| Pinecone (Memory) ||| Vector optimized |
Expand Down
8 changes: 4 additions & 4 deletions dotnet/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@
<PackageVersion Include="System.Linq.Async" Version="[6.0.1, )" />
<PackageVersion Include="System.Text.Json" Version="[6.0.0, )" />
<PackageVersion Include="Azure.AI.OpenAI" Version="[1.0.0-beta.5, )" />

<!-- Microsoft.Extensions.Logging -->
<PackageVersion Include="Microsoft.Extensions.Logging" Version="[6.0.0, )" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="[6.0.0, )" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="[6.0.0, )" />

<!-- Microsoft.Extensions.Configuration -->
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
<PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.UserSecrets" Version="7.0.0" />

<!-- Test -->
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageVersion Include="Moq" Version="4.18.4" />
<PackageVersion Include="xunit" Version="2.4.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageVersion Include="coverlet.collector" Version="3.2.0" />

<!-- Skills -->
<PackageVersion Include="DocumentFormat.OpenXml" Version="2.20.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="[7.0, )" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Microsoft.SemanticKernel.Core</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Microsoft.SemanticKernel</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Microsoft.SemanticKernel.Connectors.AI.OpenAI</_Parameter1>
</AssemblyAttribute>
Expand Down

This file was deleted.

Loading

0 comments on commit 77259db

Please sign in to comment.