Assistant not recognizing a required parameter of type "object"

I have the following JSON for a tool.

      "type": "function",
      "function": {
         "name": "save_recipe",
         "description": "Saves a recipe for later recall.",
         "parameters": {
            "type": "object",
            "properties": {
               "name": {"type": "string", "description": "The name of the recipe. e.g. Mean Green Machine" },
               "author": {"type": "string", "description": "The creator of the recipe. e.g. Joseph Gold" },
               "sku": {"type": "string", "description": "The sku of the recipe. e.g. GJN001" },
               "ingredients": {
                  "type": "object",
                  "additionalProperties": {"type":"string"},
                  "minProperties": 1,
                  "description": "The ingredients that are used in the recipe. Each key:val pair in this dictionary uses the ingredient name as the key and the amount as the value. e.g. Carrot: 360g"
               "yield": {"type": "string", "description": "The amount that the user wants to make. e.g. 8oz" },
               "instructions": {"type": "string", "description": "Optional instructions on how to make the recipe. Can be many sentences. e.g. Put all ingredients in a bowl and mix well." },
               "notes": {"type": "string", "description": "Optional special notes the user leaves for the recipe. If none, use an empty string. e.g. Green Joe" }
            "required": [
               "name", "author", "ingredients", "yield"

The expected JSON that the Assistant generates should look something like:

    "name": "Bad Apple",
    "author": "GoldenJoe",
    "sku": "GJN01",
    "ingredients": {
        "Apple, Gala": "200g",
        "Foo": "130g",
        "Bar": "25g"
    "yield": "8oz"

The Assistant never asks for ingredients, however. Even if prompted directly, it hallucinates and suggests entering them as instructions or notes:

You: What about the ingredients? 

Assistant: My apologies for any confusion. The ingredients are indeed a crucial part of the recipe. However, in the context of the save_recipe function that we're using, the ingredients are not listed as a separate parameter because they are typically included within the instructions or notes. When you provide the instructions for making the recipe, you should include the list of ingredients and their respective quantities as part of those instructions.

So, to clarify, the ingredients should be included in the instructions section when you provide that information.

Please provide the ingredients within the instructions, or if you have a separate ingredients list, I can help integrate that into the instructions for you.

Am I misunderstanding the JSON schema for what I’m trying to accomplish?

Hi @GoldenJoe , I see several potential issues with your JSON Schema whose significance depends on what you’re trying to accomplish.

If you explain in more detail what you’re trying to accomplish, I will try to help you structure your JSON schema.

Thanks @Jacob. I’m evaluating the Assistants API for potential use in a project. For my testing, I’m doing simple recipe storage/recall operations.

For this test, I am trying to store a recipe. The flow is:

User: Store a recipe.

Assistant: To save a recipe, I'll need some details from you:

- **Name of the recipe** (required)
- **Author of the recipe** (required)
- SKU of the recipe (optional)
- **Ingredients** used in the recipe (required, at least one ingredient and its amount)
- **Yield** (the amount the recipe makes, required)
- Instructions on how to make the recipe (optional)
- Special notes for the recipe (optional) 

User: Name: Bad Apple, Author: GoldenJoe, SKU: GJN01, Yield: 8oz

Assistant: Great! Now, please provide the ingredients used in this recipe, including the name of each ingredient and its amount. 

Example format: 
- Ingredient 1: Name, Amount
- Ingredient 2: Name, Amount

user: Apple 200g, Orange 130g, Kiwi 50g 

The goal is to have the Assistant prompt the user for the required input. If the user leaves something out, the Assistant must re-prompt the user. For example, if the user forgets to list ingredients, the Assistant will ask for the ingredients as laid out above. What happens instead is that the Assistant will assume values for the ingredients property and call the function with a set of made-up ingredients.

Without any special instructions, it sometimes works, though rarely. I suspect that the Assistant is re-engineering the user’s prompt to something like: “here are the values, please make your best guess for anything I forgot”. Adding extra restrictions to the Assistant instructions such as:

Always prompt the User to input the required parameters for any function that needs them before proceeding. NEVER make up values for required parameters. Don’t make assumptions about what values to plug into any function. Ask for clarification if a User request is ambiguous.

… seems to fix the issue, but this feels like a hack to me. Is there a better way to enforce user entry of required fields?