Function calling is not working as intended

Hi there

So I have a function calling action that help me generate a list of things using my data, however even though I specifically mentioned the data I want the bot to use in the function calling, some time (8/10) time they will not follow the instruction & add their own data, how can I make the function calling more accurate?

Best
Max

Hi and welcome to the developer forum!

Can you please include code snippets of your function calls an any setup code that relies on, and also examples of prompts and completions that do not perform as expected.

Yep, let me share that, thank you for reminding me.

So here is my code:

{
    "model": "gpt-3.5-turbo",
    "messages": [
        {
            "role": "user",
            "content": "<prompt>"
        }
    ],
    "functions": [
        {
            "name": "exercise_list",
            "description": "List of exercises.",
            "parameters": {
                "type": "object",
                "properties": {
                    "exercise_list": {
                        "type": "array",
                        "description": "List of exercise for chest.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string",
                                    "description": "Exercise Name"
                                },
                                "num_of_sets": {
                                    "type": "integer",
                                    "description": "Number of sets recommandation."
                                },
                                "number_of_reps": {
                                    "type": "integer",
                                    "description": "Number of reps recommandation."
                                }
                            }
                        }
                    }
                },
                "required": [
                    "exercise_list"
                ]
            }
        }
    ]
}" 

and here is my prompt

Did you try to lower the temperature? The default temperature is 1, which is really high for following the instructions. Try ~0.2.