How tools work in optimization runs
LaunchDarkly includes attached tools as part of the config, which you can pass into your agent calls. Your instructions andtool_use_behavior parameters, where applicable, largely determine whether or not a tool gets called as part of its execution.
The optimization process does not remove or add tools to your agents. If you think your LLM might need access to different tools, or to optimize against calling different tools, include all tool definitions. The instructions will be optimized toward the use of one or the other depending on how well they suit the optimization goals.
Tools available to your agents are also provided to the evaluation. Acceptance statement criteria receive the same list of tools that the invocation does in case the evaluator thinks it needs to check on underlying data to confirm validity.
Tool definitions
Tool definitions in LaunchDarkly are decorated functions. To learn more, read Tools. Here’s an example from OpenAI:model.parameters.
Here’s how:
name as set in the LaunchDarkly UI.
One way to map tools to the definitions is to use a dict containing a mapping of the LaunchDarkly tool keys to the defined handler functions. Here’s an example:
handle_agent_call and handle_judge_call. Here’s how: