How do planners work?
Behind the scenes, the planner uses an LLM prompt to generate a plan. As an example, you can see the prompt that is used by HandlebarsPlanner
by navigating to its prompt file in the Semantic Kernel repository, located at https://github.com/microsoft/semantic-kernel/blob/7c3a01c1b6a810677d871a36a9211cca0ed7fc4d/dotnet/src/Planners/Planners.Handlebars/Handlebars/CreatePlanPrompt.handlebars.
The last few lines of the prompt are the most important to understand how the planner works:
## Start Now take a deep breath and accomplish the task: 1. Keep the template short and sweet. Be as efficient as possible. 2. Do not make up helpers or functions that were not provided to you, and be especially careful to NOT assume or use any helpers or operations that were not explicitly defined already. 3. If you can't fully accomplish the goal with the available helpers, just print "{{insufficientFunctionsErrorMessage}}". 4. Always start by identifying any important...