Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: Ensure Action is JSON format in Stepwise Planner #1976

Merged
merged 23 commits into from
Jul 17, 2023

Conversation

matthewbolanos
Copy link
Member

@matthewbolanos matthewbolanos commented Jul 12, 2023

Motivation and Context

Sometimes, the LLM populates the [ACTION] with non-JSON data. To mitigate this from happening, this PR updates the labels for the [ACTION] section of the prompt to more explicitly state that only JSON should be written there.

Description

  • [ACTION] has been changed to [JSON ACTION] in the prompt to make it clear that JSON should appear in this section.
  • $JSON_BLOB has been changed to $JSON_ACTION to make it more clear that the instructions above are for the [JSON ACTION] section

Contribution Checklist

@matthewbolanos matthewbolanos requested a review from a team as a code owner July 12, 2023 16:20
@shawncal shawncal added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel labels Jul 12, 2023
@shawncal shawncal changed the title Ensure Action is JSON format in Stepwise Planner .Net: Ensure Action is JSON format in Stepwise Planner Jul 12, 2023
@matthewbolanos
Copy link
Member Author

Here's an example of the Planner messing up on the [ACTION]

image

@shawncal shawncal added this pull request to the merge queue Jul 14, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 14, 2023
@dmytrostruk dmytrostruk added the PR: ready to merge PR has been approved by all reviewers, and is ready to merge. label Jul 17, 2023
@shawncal shawncal enabled auto-merge July 17, 2023 16:05
@shawncal shawncal added this pull request to the merge queue Jul 17, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 17, 2023
@shawncal shawncal added this pull request to the merge queue Jul 17, 2023
Merged via the queue into microsoft:main with commit 8a33404 Jul 17, 2023
12 checks passed
piotrek-appstream pushed a commit to Appstream-Studio/semantic-kernel that referenced this pull request Jul 19, 2023
### Motivation and Context
Sometimes, the LLM populates the [ACTION] with non-JSON data. To
mitigate this from happening, this PR updates the labels for the
[ACTION] section of the prompt to more explicitly state that **_only_**
JSON should be written there.

### Description
- [ACTION] has been changed to [JSON ACTION] in the prompt to make it
clear that JSON should appear in this section.
- $JSON_BLOB has been changed to $JSON_ACTION to make it more clear that
the instructions above are for the [JSON ACTION] section

### Contribution Checklist
- [x] The code builds clean without any errors or warnings
- [x] The PR follows SK Contribution Guidelines
(https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
- [x] The code follows the .NET coding conventions
(https://learn.microsoft.com/dotnet/csharp/fundamentals/coding-style/coding-conventions)
verified with `dotnet format`
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄

---------

Co-authored-by: Gina Triolo <51341242+gitri-ms@users.noreply.github.com>
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code PR: ready to merge PR has been approved by all reviewers, and is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants