Thank you for your detailed answer. Unfortunately, you are mostly talking about the incompleteness of my prompt, which still doesn’t clearly cover my question: what are descriptions of function parameters?
Let me rephrase my initial question. Do we need to specify the description of function parameters? If not, then that’s fine. If yes, then what should we include there and for what purpose?
In other words, to understand and fix issues with the prompt, I first need to understand which parts of the model’s functionality are responsible for what. If all my efforts to make my function descriptive don’t work because the function description is not the right place for that, then I would like to know.
The function you show doesn’t have a clear purpose of what the function actually is used for by itself, and what the AI model will get back from it as a return value.
I can’t post the whole prompt—it is quite long and includes additional instructions, other functions, and additional accounting context. Thus, “Add a new line to the customer invoice” is descriptive enough to prompt the model to call my function whenever the user needs it, without any problem (did many tests).
A function is for taking action on behalf of a user, or getting more information in order to fulfill a user’s request. Uses outside of that don’t come with much training on when to scan user input and trigger, so you’ve got to “program” every step of an interview to be performed, describe exactly the job of the AI.
That is understandable, and based on the “Example use cases” in the OpenAI Function Calling documentation, functions and parameters are mostly about user input. Scanning and understanding function parameters, from my point of view, should be an “inborn skill” of the function-calling functionality.
The function doesn’t say where the price comes from. It it doesn’t say when it should be used.
I thought that the function description is about what the function does, and parameters are about what the function needs. The beauty of having AI is that it decides when to call my function, and it does so very well. I can’t describe all cases when my function needs to be called. Can you please share with me an article or another source of information where it states that each function parameter has to be mentioned and described in the function description? Because this is important. Nevertheless, before posting this question, I tried to put this in the function description to no avail.
I’m probably missing something. We have a JSON schema, not just plain text, where we define parameters, types, default values, and which parameters are mandatory. I understand that this is eventually just text for the model and so on, but I hoped that tools are interpreted differently in the way a function implementer expects.
It doesn’t have any prohibitions against use until certain conditions are met. It looks like a place to write the response.
Specific conditions are not required in my case.
As a chatbot user, I could say “add 10 hamburgers, ID 44, to invoice ID 123, at price $0.02”, and the AI would probably think invoking the function would be a great idea, despite your being an appliance repair company.
This is totally normal. My company can sell services, materials, and products of different kinds.
So if you don’t have controlled inputs and users you can hold accountable (or call into the office to chew out), you need to make your application robust, besides just functional. A holistic approach to not expecting magic, but guiding the magic.
Sure! I have been building real-world business applications for over 25 years and have managed to learn some stuff about it.