Here i have found that if you give a oneshot or multi shot example with the current tools it forces the model to use the data in the prompt ? even if it is false ! … So A fake tool instead of a real tool ! as the example is only to show the model the WORKFLOW ! not how to call a tool !
In model which have not been trained for tool use in that instance : you will need to specify how the tool use is expected ( i personally use docstrings ) …
( adding the docstrigs for the agents tools to the prompt somewhere ) and in others i use the standard openAI prompt messaging pyantic template or i even use Inspector ! and other iu use Hand crafted Extraction methods !
as eAch methodolgy in the function calling or structured response and workflow has its advantage and disadvantages !
In some models i extract all functions from the response to files ! as well as execute the fragments : and provide the outputs to the fial response :
as the final response can also be formeted by the api removing that from the model ! enabling for faster execution ! hence a good process should offload some work to the tool ! and use the tool to return the data rather that using the model to do all the processing of information ( in some cases ) …
Personaly i think of the model as a Personality on top of a library of DATA !
so Assitance fro this agent is in the form of tools !
We discover that we cannot actually give the model a whole list of tools ! its a problem !
but we can keep a rough list of tools ! or a graph of tools ! or a folder of tools ! … in which the model can search the list for potential tools , then load the docstrings for the tools ! and use them and dispose of the tools after use !
even to generate a tool or chain instead 1 saving the tool to the folder and adding it to the available tools list dictionary ! most imortant tools are NAMED as thier useage ! the model can even Guess its usage ! hence picking potential rools ! then getting thier args !
SO it would kow to create missing tools ! … Ie roles demand tools from tool creation agents ! So if a role needs a tool the role can request it !
currently i am working on the interactive tool box ! with its own agent ! ( like rogue squadren ) the solder carrys a ai in his gun and one in his back pack ! so if he needs some thing the backpack will know before him !
LOL !
but this is the way forwards ! a toolbox with its own agent serving tools to the agents or creating themm as required and managing the tool box !