Parameters that would be composed by the human.
Parameters that would be composed by the LLM.
Even though no property exists in the LLM side, the llm property would
have at least empty object type.
OptionalvalidateValidate function of the separated arguments.
If LLM part of separated parameters has some properties, this validate
function will be filled for the llm type validation.
You know what? LLM (Large Language Model) like OpenAI takes a lot of mistakes when composing arguments in function calling. Even though
numberlike simple type is defined in the parameters schema, LLM often fills it just by astringtyped value.
In that case, you have to give a validation feedback to the LLM by using this
validatefunction. Thevalidatefunction will return detailed information about every type errors about the arguments.
And in my experience, OpenAI's
gpt-4o-minimodel tends to construct an invalid function calling arguments at the first trial about 50% of the time. However, if correct it through thisvalidatefunction, the success rate soars to 99% at the second trial, and I've never failed at the third trial.
Arguments to validate
Validate result
Collection of separated parameters.