Replies: 1 comment
-
tagging @SergeyMenshykh for visibility |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using Semantic Kernel's ToolCallBehavior.AutoInvokeKernelFunctions to orchestrate a set of functions in my application. One of these functions is designed to perform operations on documents, such as changing their formats or processing their content.
Occasionally, the orchestrator plans multiple consecutive calls to this function, each targeting a single document, instead of consolidating them into a single call for all documents. For example, if the user requests an operation on two documents, the orchestrator sometimes schedules two separate calls to the function, even though it is capable of handling both in one.
I've experimented with modifying the prompts for both the orchestrator and the function's descriptions (including parameter definitions), but I haven't been able to consistently achieve the desired behavior where the requests are combined into a single invocation.
Question:
Is there a clean and non-hacky way to control this behavior and ensure that, when multiple consecutive calls to the same function are planned, they are consolidated into one? One idea I considered was using IAutoFunctionInvocationFilter to intercept and manage the calls, but I'm not sure if that's the most appropriate solution.
Any advice or recommendations would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions