Is it possible to disable parallel_tool_calls in function level?

I would like to have some the functions to be called parallel while some others to only be executed single time.

Is it possible? Thanks.

The multi_tool_use.parallel function wrapper, as placed in the AI’s tools section, is designed to execute multiple tools simultaneously, provided they can operate in parallel. This capability is particularly useful when you want to leverage the efficiency of running concurrent operations without waiting for each to complete sequentially.

However, it’s important to note that this wrapper cannot be disabled on a per-function level, meaning all specified tools within it will be executed in parallel when called.

How the Wrapper Tool Works

The multi_tool_use.parallel function takes a list of tools to be executed in parallel. Each tool is specified with its recipient_name (the name of the tool, which could be just the name of the tool or in the format namespace.function_name for plugin and function tools) and parameters (the parameters to pass to the tool, which must be valid according to the tool’s own specifications).

Techniques to Prevent Certain Functions from Being Used within This Tool

To ensure that particular functions are not used or sent within this tool, you can employ several strategies focused on AI’s understanding of the description fields, name fields, and other methods in constructing functions. Here are some effective techniques:

  1. Clear Naming Conventions: Use naming conventions that clearly indicate the function’s purpose and its suitability for parallel execution. For example, prefixing function names with Parallel_ or Solo_ can help indicate whether a function is designed for parallel use or not.

  2. Explicit Descriptions: In the function’s description, explicitly state whether the function is intended for parallel use. Phrases like “This function is not designed for parallel execution” or “Intended for solo use only” can guide the AI in understanding the function’s intended use case.

  3. Parameter Design: Design the function’s parameters in such a way that they inherently discourage or prevent parallel use. For example, including a parameter that requires a unique resource that cannot be shared or accessed concurrently might limit the function’s ability to be run in parallel.

  4. Documentation and Comments: Within the system prompt, including any limitations on parallel execution. This can focus on a correct workflow of function usage for particular scenarios.

  5. AI Training and Examples: Provide examples of correct and incorrect use cases of the function. This can help train the AI to recognize the appropriate contexts for each function. Simply fine-tuning on single functions itself will break the multi-tool use tendency.

  6. Feedback Loops: Implement feedback mechanisms that allow you to monitor how functions are being used, and also reject the AI’s attempts in particular cases so it re-sends correctly. If by logging, you notice a function being used inappropriately in parallel contexts, you can adjust its description, parameters, or documentation to clarify its intended use

By employing these techniques, you can guide the AI in understanding which functions are suitable for parallel execution and which should be avoided, when using the multi_tool_use.parallel function wrapper not totally disabled. This approach relies on clear communication through naming, descriptions, and documentation to ensure functions are used as intended.