From the documentation it’s not clear to me how a function schema modifies the prompt being sent into the completions API (and I’m not aware of a way to see the entire prompt being submitted, pls lmk if there is one).
One thing I wonder, for example, is if the “description” field for a function argument would render some of the information in my top-level prompt superflous.
Before using function calling, I would specify “few-shot” examples with json keys i’d like to extract, and show an example structure and then request json_mode output.
Something like:
“If the user asks for a specialist, respond like this”
{'user':user, 'specialist_type':specialist_type,request_time....}
And I would provide a couple examples of each type. The prompt would be fairly long and cover several different request types and examples.
With function calling and a provided schema, I assume I don’t need to do that anymore, since the schema defines the fields and structure I need. This would presumably make most of the prior prompt superflous.
Similarly with the descriptions field, I would assume this can take the place of much of what the prior prompt would be responsible for if additional detail was needed beyond just the function argument names. For example, maybe I don’t need to say “look for fields of ‘x’, ‘y’, and ‘z’ types and extract them” in the prompt, since the fields will be clear from the schema, and the description can provide additional context if needed.
All of this is speculation though, because I do not know how the function, it’s arguments, or the description field get injected into / combined with the actual prompt.
Previously, I could see precisely what the prompt was (excluding of course any OpenAI System Level prompts that aren’t disclosed). But using function calling with description fields, I can’t know how the prompt changes, so I can’t be sure how to tweak description fields / the prompt to make sure I’m not being redundant.
Any advice on how to approach this? Or in general how I can know what the prompt looks like when providing a function schema, with and without descriptions?