Skip to content

Improve Planner to Support invalid ASK - Issue 159#406

Closed
rogerbarreto wants to merge 4 commits into
microsoft:mainfrom
rogerbarreto:features/support-invalid-planner-ask
Closed

Improve Planner to Support invalid ASK - Issue 159#406
rogerbarreto wants to merge 4 commits into
microsoft:mainfrom
rogerbarreto:features/support-invalid-planner-ask

Conversation

@rogerbarreto

Copy link
Copy Markdown
Member

Motivation and Context

Resolve Related Issue: Improve Planner prompt to support invalid ASK

This change mitigate the potential of generated plans with non existing Skills / Functions not provided.

If you ask for a Plan with insufficient Skills to fulfill, it will fail with a reason why. context.ErrorDescription

Description

This change makes an additional query to the LLM providing only the available skills and the Goal without mixing it with the plan rules.

This provides clarity when asking for plans that cannot be created and avoid the potential of LLM wrong assumptions, hallucinations using the few shots on the planning creation prompt.

This changes adds also a post verification when the plan is created to ensure the functions returned by the plan are indeed present in the SkillCollection.

Contribution Checklist

@rogerbarreto rogerbarreto linked an issue Apr 11, 2023 that may be closed by this pull request
@rogerbarreto rogerbarreto requested a review from shawncal April 11, 2023 15:59
@rogerbarreto rogerbarreto added enhancement PR: ready for review All feedback addressed, ready for reviews .NET Issue or Pull requests regarding .NET code planner Anything related to planner or plans labels Apr 11, 2023
@rogerbarreto rogerbarreto changed the title Adding Planning Creation checks + UnitTests + Integration Tests Improve Planner to Support invalid ASK - Issue 159 Apr 11, 2023
@rogerbarreto rogerbarreto self-assigned this Apr 12, 2023
// TODO - consider adding the relevancy score for functions added to manual

var plan = await this._functionFlowFunction.InvokeAsync(context);
if (await this.VerifyCanCreatePlanForGoalAsync(goal, context))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should hit the model before creating a plan, just to ask if it can. Extra time, expense. This should be merged into the Planner prompt itself: "Create a plan. If you can't generate a plan, respond with..."

@rogerbarreto rogerbarreto Apr 13, 2023

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shawncal I wasn't able to achieve this with the current plan prompt (adding variations without compromising the result) in GPT-3.

It was always assuming the few shots as potential solutions and using that or the available functions as a valid plan even if it wouldn't resolve the plan.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are some other ways we can do this, let's connect.

@lemillermicrosoft lemillermicrosoft added PR: feedback to address Waiting for PR owner to address comments/questions and removed PR: ready for review All feedback addressed, ready for reviews labels Apr 20, 2023
@MovGP0

MovGP0 commented Apr 21, 2023

Copy link
Copy Markdown

See also #523 which wants to remove the planner altogether

@lemillermicrosoft

Copy link
Copy Markdown
Member

See also #523 which wants to remove the planner altogether

PlannerSkill - not Planner though :) But yeah, we will still want to do something to address this issue. Did not do in that PR to reduce scope of changes.

@lemillermicrosoft lemillermicrosoft marked this pull request as draft April 21, 2023 18:52
@shawncal

Copy link
Copy Markdown
Contributor

@rogerbarreto I think we can close this draft. Can you confirm?

@rogerbarreto rogerbarreto deleted the features/support-invalid-planner-ask branch December 5, 2023 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Issue or Pull requests regarding .NET code planner Anything related to planner or plans PR: feedback to address Waiting for PR owner to address comments/questions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Planner prompt to support invalid ASK

4 participants