The desired response is how functions operate.
- you ask something the AI thinks it can use a function to answer
- the AI calls the function
chart_hits_per_artist(genre, search_years)
- you give another AI call back your raw retrieved data in a functions role
- the AI writes a response augmented by the knowledge
It is possible to have the AI both say “In order to answer this question, I’ll search by alternative genre to find how many hits Nirvana had.” and also write the function, but it takes specific deliberate prompting language to get it to produce that preliminary text.