I’m working on an assistant that is supposed interactively answer a few questions with the user to fill a complex form; essentially, the model gets 12 steps to ask the user about, one after the other, with every step getting more specific, for example:
Industry: Suggest up to 5 industries in the user might be engaged in.
This reliably results in good suggestions, for example:
Could you tell me which industries you are currently engaged in? Some common industries might be:
- Oil and Gas
- Manufacturing
- Water Treatment
- Power plants
- Food and Beverage
. We parse these responses, and extract the items to display buttons. This works… mostly, until it doesn’t.
Instead, I would love to define a function – say, showButtons
– that takes a list of keywords, and renders those buttons along the response.
But I cannot get the model to do this, and have a nagging suspicion this isn’t really how function calling is supposed to be used - After all, the user doesn’t directly instruct it to call the showButtons function.
Does anybody have a suggestion for me?
Edit: I think I expressed myself badly. What I’m after is that the model invokes a function with the list of suggestions; so for the industries it recommended above, instead of returning a list, I’d like it to call a function with those industries instead, like this:
showButtons({keywords: [ "Oil and Gas", "Manufacturing", "Water Treatment", "Power Plants", "Food and Beverage" ]})
…such that I can display those buttons below the model’s message, and enrich the context for the next run with data related to that keyword.