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

The Planner does not handle / recognize that an output is a list and should pass the values using an index #3031

Closed
ramarnat opened this issue Sep 30, 2023 · 2 comments
Assignees
Labels
planner Anything related to planner or plans

Comments

@ramarnat
Copy link

I am working with Copilot with a custom plugin for RAG. The plugin has two functions:

  1. ListDocuments, that returns a set of metadata objects about documents that have embeddings.
  2. DoSearch, perform a search on a document by passing the doc id and doc type.

The prompt is something like this

iterate thru the documents available on <custom plugin name>, and ask the question "what is foo?" for each document returned

The plan gets the two steps right - list documents and the search doc, but always presents the plan as setting the input value to $RESULT.document_id not $RESUL[0].document_id. It also doesnt seem to know how to iterate thru each document. If the list documents is run prior to the asking for the iterative search, then sometimes it will try to create multiple steps for the number of documents it knows was returned in the list (but inconsistently).

I also noticed that if you ask that the plan be fixed by using the indexed values, it occasionally will get it right but then forget something else, like the original question, or that the output field is id instead of document_id

How can the handling of this sort of multi-step process be made better? Would it make sense to override the planning prompt that SK uses? How do you represent iterations in that case?

@lemillermicrosoft
Copy link
Member

Look for MiscSkill.ElementAt for an example of a function that can help with what you describe. I'd also suggest updating the description of your functions to describe the shape of the output in lieu of those constructs in the kernel (coming soon* I think).

@alliscode alliscode added planner Anything related to planner or plans and removed triage labels Oct 5, 2023
@matthewbolanos
Copy link
Member

Closing this issue. @ramarnat, let us know if @lemillermicrosoft, solution does not work for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
planner Anything related to planner or plans
Projects
None yet
Development

No branches or pull requests

6 participants