You are building an agentic solution using Microsoft Semantic Kernel. The agent must autonomously decide when to call an external API to fetch real-time data. You want to minimize token usage and avoid unnecessary API calls. Which planner configuration should you use?
Trap 1: Use a SequentialPlanner with a stepwise strategy and explicit…
Stepwise strategy ensures API is called only when needed.
Trap 2: Use a ManualInvoke kernel with a sequential planner
Manual invoke prevents autonomous operation.
Trap 3: Use a ParallelPlanner with a function-calling model
Parallel planner increases token usage.
- A
Use a SequentialPlanner with a stepwise strategy and explicit function parameter constraints
Why it fails: Stepwise strategy ensures API is called only when needed.
- B
Use a ManualInvoke kernel with a sequential planner
Why it fails: Manual invoke prevents autonomous operation.
- C
Use a ParallelPlanner with a function-calling model
Why it fails: Parallel planner increases token usage.
- D
Use an AutoInvoke kernel with a greedy action planner
The greedy action planner selects only the single next best action at each step, invoking functions automatically via AutoInvoke. This avoids generating full multi-step plans upfront, directly minimising token consumption and preventing unnecessary API calls, satisfying the stem's efficiency constraint.