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.
Optional
validateValidate 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
number
like simple type is defined in the parameters schema, LLM often fills it just by astring
typed value.In that case, you have to give a validation feedback to the LLM by using this
validate
function. Thevalidate
function will return detailed information about every type errors about the arguments.And in my experience, OpenAI's
gpt-4o-mini
model tends to construct an invalid function calling arguments at the first trial about 50% of the time. However, if correct it through thisvalidate
function, 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.