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

Update sequential planner syntax and documentation #1678

Conversation

lemillermicrosoft
Copy link
Member

@lemillermicrosoft lemillermicrosoft commented Jun 22, 2023

This pull request adds an END comment to the sequential planner XML format, to mark the end of the plan after the closing tag. This makes the format more consistent and easier to parse. It also simplifies the instructions for creating a plan, by removing some redundant or outdated information and clarifying some points. The examples and available functions are removed accordingly.

Description

Details:

  • Add an END comment to the sequential planner XML format, to mark the end of the plan after the closing tag. This is done by changing the StopSequence constant in SequentialPlanner.cs and updating the skprompt.txt file.
  • Simplify the instructions for creating a plan, by removing some redundant or outdated information and clarifying some points. Specifically, the following changes are made:
    • Remove the requirement to check that a function is present in the most recent available functions list, as this is implied by the fact that the list is updated for each goal.
    • Remove the statement that a function has a single input and output, as some functions may have additional parameters as defined in the available functions list.
    • Remove the statement that input does not need to be specified if it consumes the output of the previous function, as this is not always the case and may cause confusion.
    • Change the syntax for saving an output to a context variable or a result, by using "=" instead of ":" and removing the "/" at the end of the function tag.
    • Clarify that the END comment should be appended after the final closing tag, not inside it.
  • Update the examples and available functions in skprompt.txt to reflect the changes in the format and the instructions.

Contribution Checklist

@github-actions github-actions bot added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel labels Jun 22, 2023
The stop sequence for the sequential planner was missing the "END" part,
which could cause problems when parsing the XML plan. This commit fixes
the stop sequence to include the "END" comment.

It also simplifies the instructions for creating a plan, removing some
redundant or outdated information. It adds an example of how to call a
function with multiple inputs, and how to use XML comments in the input
values.
@lemillermicrosoft lemillermicrosoft marked this pull request as ready for review June 22, 2023 21:46
@lemillermicrosoft lemillermicrosoft requested a review from a team as a code owner June 22, 2023 21:46
The plan parser was incorrectly adding text and comment nodes as steps
in the plan, which could cause errors or unexpected behavior. This
commit fixes the parser to skip over these nodes and only add function
nodes as steps. It also adds some TODO comments for possible future
enhancements to use text or comments as reasoning or desired functions
for a plan.
@lemillermicrosoft lemillermicrosoft added the PR: ready for review All feedback addressed, ready for reviews label Jun 22, 2023
@lemillermicrosoft
Copy link
Member Author

A follow up to #1615 that adds to the improvements.

The sequential plan parser was incorrectly adding non-function tags
as steps in the plan, resulting in extra and invalid steps. This
commit fixes the parser to skip any tags that are not <function>
and only add the function steps to the plan. This also updates the
unit tests to reflect the expected behavior and output of the parser.
@lemillermicrosoft lemillermicrosoft removed the PR: ready for review All feedback addressed, ready for reviews label Jun 22, 2023
@lemillermicrosoft lemillermicrosoft marked this pull request as draft June 23, 2023 03:52
@lemillermicrosoft
Copy link
Member Author

Tabling this for the moment. Really want to rid the examples in the prompt and focus on defining how to properly call a function. Struggling to consistently follow rules though to 1) not try and index a variable like it's an object $SYPNOPSIS[2] and 2) XML escape the parameters it generates.

@lemillermicrosoft
Copy link
Member Author

Condensed changes into #1727 1727

@evchaki evchaki added this to the Sprint 34 milestone Jun 30, 2023
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
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants