A - Assignment, T - Task, TR - Task Result, R - Result, AR - Assignment Result

AR:

A: 
You are given by a JSON interpretation of the recipe, for example:
{"meals":[{"idMeal":"52772","strMeal":"Teriyaki Chicken Casserole","strDrinkAlternate":null,"strCategory":"Chicken","strArea":"Japanese","strInstructions":"Preheat oven to 350\u00b0 F. Spray a 9x13-inch baking pan with non-stick spray.\r\nCombine soy sauce, \u00bd cup water, brown sugar, ginger and garlic in a small saucepan and cover. Bring to a boil over medium heat. Remove lid and cook for one minute once boiling.\r\nMeanwhile, stir together the corn starch and 2 tablespoons of water in a separate dish until smooth. Once sauce is boiling, add mixture to the saucepan and stir to combine. Cook until the sauce starts to thicken then remove from heat.\r\nPlace the chicken breasts in the prepared pan. Pour one cup of the sauce over top of chicken. Place chicken in oven and bake 35 minutes or until cooked through. Remove from oven and shred chicken in the dish using two forks.\r\n*Meanwhile, steam or cook the vegetables according to package directions.\r\nAdd the cooked vegetables and rice to the casserole dish with the chicken. Add most of the remaining sauce, reserving a bit to drizzle over the top when serving. Gently toss everything together in the casserole dish until combined. Return to oven and cook 15 minutes. Remove from oven and let stand 5 minutes before serving. Drizzle each serving with remaining sauce. Enjoy!","strMealThumb":"https:\/\/www.themealdb.com\/images\/media\/meals\/wvpsxx1468256321.jpg","strTags":"Meat,Casserole","strYoutube":"https:\/\/www.youtube.com\/watch?v=4aZr5hZXP_s","strIngredient1":"soy sauce","strIngredient2":"water","strIngredient3":"brown sugar","strIngredient4":"ground ginger","strIngredient5":"minced garlic","strIngredient6":"cornstarch","strIngredient7":"chicken breasts","strIngredient8":"stir-fry vegetables","strIngredient9":"brown rice","strIngredient10":"","strIngredient11":"","strIngredient12":"","strIngredient13":"","strIngredient14":"","strIngredient15":"","strIngredient16":null,"strIngredient17":null,"strIngredient18":null,"strIngredient19":null,"strIngredient20":null,"strMeasure1":"3\/4 cup","strMeasure2":"1\/2 cup","strMeasure3":"1\/4 cup","strMeasure4":"1\/2 teaspoon","strMeasure5":"1\/2 teaspoon","strMeasure6":"4 Tablespoons","strMeasure7":"2","strMeasure8":"1 (12 oz.)","strMeasure9":"3 cups","strMeasure10":"","strMeasure11":"","strMeasure12":"","strMeasure13":"","strMeasure14":"","strMeasure15":"","strMeasure16":null,"strMeasure17":null,"strMeasure18":null,"strMeasure19":null,"strMeasure20":null,"strSource":null,"strImageSource":null,"strCreativeCommonsConfirmed":null,"dateModified":null}]}
Your assignment is broken to several task that will analyse, structure and enhance recipe by health analysis for allergens and possible intolerancies.
Structure of the result recipe needs to be this:
{
	_id: string | undefined;
	name: string;
	instructions: string[];
	thumbnail: string;
	video: string;
	ingredients: {
		image: string;
		name: string,
		measure: string,
	}[];
	engineSource: FoodDataSources;
	tags: string[];
	allergens: {
		name: string;
		type: ‘Allergy’ | ‘Intolerance’;
		ingredient: {
			name: string;
			index: number; // Index of object in Recipe Ingredients
		}
		short_description: string;
		lowercase: string;
		AI_processed: boolean; // Set true if this is added by LLM Model
	}[];
}

T1: 
Structure input recipe into intermediate recipe result following the expected recipe structure

TR1.1:
{
    "_id":"",
    "name":"Teriyaki Chicken Casserole",
    "instructions":[
       "Preheat oven to 350° F.",
       "Spray a 9x13-inch baking pan with non-stick spray.",
       "Combine soy sauce, ½ cup water, brown sugar, ginger and garlic in a small saucepan and cover. Bring to a boil over medium heat. Remove lid and cook for one minute once boiling.",
       "Stir together the corn starch and 2 tablespoons of water in a separate dish until smooth. Once sauce is boiling, add mixture to the saucepan and stir to combine. Cook until the sauce starts to thicken then remove from heat.",
       "Place the chicken breasts in the prepared pan. Pour one cup of the sauce over top of chicken. Place chicken in oven and bake 35 minutes or until cooked through. Remove from oven and shred chicken in the dish using two forks.",
       "*Meanwhile, steam or cook the vegetables according to package directions.",
       "Add the cooked vegetables and rice to the casserole dish with the chicken. Add most of the remaining sauce, reserving a bit to drizzle over the top when serving.",
       "Gently toss everything together in the casserole dish until combined. Return to oven and cook 15 minutes. Remove from oven and let stand 5 minutes before serving. Drizzle each serving with remaining sauce."
    ],
    "thumbnail":"https://www.themealdb.com\/images\/media\/meals\/wvpsxx1468256321.jpg",
    "video":"https://www.youtube.com\/watch?v=4aZr5hZXP_s",
    "ingredients":[
       {
          "image":"",
          "name":"soy sauce",
          "measure":"3⁄4 cup"
       },
       {
          "image":"",
          "name":"water",
          "measure":"1/2 cup"
       },
       {
          "image":"",
          "name":"brown sugar",
          "measure":"1/4 cup"
       },
       {
          "image":"",
          "name":"ground ginger",
          "measure":"1/2 teaspoon"
       },
       {
          "image":"",
          "name":"minced garlic",
          "measure":"1/2 teaspoon"
       },
       {
          "image":"",
          "name":"cornstarch",
          "measure":"4 Tablespoons"
       },
       {
          "image":"",
          "name":"chicken breasts",
          "measure":"2"
       },
       {
          "image":"",
          "name":"stir-fry vegetables",
          "measure":"1 (12 oz.)"
       },
       {
          "image":"",
          "name":"brown rice",
          "measure":"3 cups"
       }
    ],
    "engineSource":"FoodDataCentral",
    "tags":[], // Will be generated in analysis Task
    "allergens":[] // Will be generated in analysis Task
}

T2: Take structured recipe from previous task and enhance this recipe by it's analysis.

TR2.1: First round of analysis showed that this recipe is usually served for Lunch or Dinner, it contains Chicken meat and is rather easy to cook (under 30 minues). Therefore, your recipe is upgraded with relevant tags:
{
    "_id":"",
    "name":"Teriyaki Chicken Casserole",
    "instructions":[
       "Preheat oven to 350° F.",
       "Spray a 9x13-inch baking pan with non-stick spray.",
       "Combine soy sauce, ½ cup water, brown sugar, ginger and garlic in a small saucepan and cover. Bring to a boil over medium heat. Remove lid and cook for one minute once boiling.",
       "Stir together the corn starch and 2 tablespoons of water in a separate dish until smooth. Once sauce is boiling, add mixture to the saucepan and stir to combine. Cook until the sauce starts to thicken then remove from heat.",
       "Place the chicken breasts in the prepared pan. Pour one cup of the sauce over top of chicken. Place chicken in oven and bake 35 minutes or until cooked through. Remove from oven and shred chicken in the dish using two forks.",
       "*Meanwhile, steam or cook the vegetables according to package directions.",
       "Add the cooked vegetables and rice to the casserole dish with the chicken. Add most of the remaining sauce, reserving a bit to drizzle over the top when serving.",
       "Gently toss everything together in the casserole dish until combined. Return to oven and cook 15 minutes. Remove from oven and let stand 5 minutes before serving. Drizzle each serving with remaining sauce."
    ],
    "thumbnail":"https://www.themealdb.com\/images\/media\/meals\/wvpsxx1468256321.jpg",
    "video":"https://www.youtube.com\/watch?v=4aZr5hZXP_s",
    "ingredients":[
       {
          "image":"",
          "name":"soy sauce",
          "measure":"3⁄4 cup"
       },
       {
          "image":"",
          "name":"water",
          "measure":"1/2 cup"
       },
       {
          "image":"",
          "name":"brown sugar",
          "measure":"1/4 cup"
       },
       {
          "image":"",
          "name":"ground ginger",
          "measure":"1/2 teaspoon"
       },
       {
          "image":"",
          "name":"minced garlic",
          "measure":"1/2 teaspoon"
       },
       {
          "image":"",
          "name":"cornstarch",
          "measure":"4 Tablespoons"
       },
       {
          "image":"",
          "name":"chicken breasts",
          "measure":"2"
       },
       {
          "image":"",
          "name":"stir-fry vegetables",
          "measure":"1 (12 oz.)"
       },
       {
          "image":"",
          "name":"brown rice",
          "measure":"3 cups"
       }
    ],
    "engineSource":"FoodDataCentral",
    "tags":["Lunch", "Dinner", "Easy"], // Will be generated in analysis Task
    "allergens":[] // Will be generated in analysis Task
}

TR2.2: Second round of analysis showed that this recipe contains several allergens as ingredients, for example:
Wheat: Wheat Allergy, Celiac Disease, Non-Celiac Gluten Sensitivity
Soy: Soy Allergy

Therefore updated recipe is:
{
    "_id":"",
    "name":"Teriyaki Chicken Casserole",
    "instructions":[
       "Preheat oven to 350° F.",
       "Spray a 9x13-inch baking pan with non-stick spray.",
       "Combine soy sauce, ½ cup water, brown sugar, ginger and garlic in a small saucepan and cover. Bring to a boil over medium heat. Remove lid and cook for one minute once boiling.",
       "Stir together the corn starch and 2 tablespoons of water in a separate dish until smooth. Once sauce is boiling, add mixture to the saucepan and stir to combine. Cook until the sauce starts to thicken then remove from heat.",
       "Place the chicken breasts in the prepared pan. Pour one cup of the sauce over top of chicken. Place chicken in oven and bake 35 minutes or until cooked through. Remove from oven and shred chicken in the dish using two forks.",
       "*Meanwhile, steam or cook the vegetables according to package directions.",
       "Add the cooked vegetables and rice to the casserole dish with the chicken. Add most of the remaining sauce, reserving a bit to drizzle over the top when serving.",
       "Gently toss everything together in the casserole dish until combined. Return to oven and cook 15 minutes. Remove from oven and let stand 5 minutes before serving. Drizzle each serving with remaining sauce."
    ],
    "thumbnail":"https://www.themealdb.com\/images\/media\/meals\/wvpsxx1468256321.jpg",
    "video":"https://www.youtube.com\/watch?v=4aZr5hZXP_s",
    "ingredients":[
       {
          "image":"",
          "name":"soy sauce",
          "measure":"3⁄4 cup"
       },
       {
          "image":"",
          "name":"water",
          "measure":"1/2 cup"
       },
       {
          "image":"",
          "name":"brown sugar",
          "measure":"1/4 cup"
       },
       {
          "image":"",
          "name":"ground ginger",
          "measure":"1/2 teaspoon"
       },
       {
          "image":"",
          "name":"minced garlic",
          "measure":"1/2 teaspoon"
       },
       {
          "image":"",
          "name":"cornstarch",
          "measure":"4 Tablespoons"
       },
       {
          "image":"",
          "name":"chicken breasts",
          "measure":"2"
       },
       {
          "image":"",
          "name":"stir-fry vegetables",
          "measure":"1 (12 oz.)"
       },
       {
          "image":"",
          "name":"brown rice",
          "measure":"3 cups"
       }
    ],
    "engineSource":"FoodDataCentral",
    "tags":[], // Will be generated in analysis Task
    "allergens":[{
        "name": "Wheat Allergy",
        "type": "Allergy",
        "ingredient": {
          "name": "soy sauce",
          "index": 0
        },
        "short_description": "Soy sauce is usually made with wheat, soybeans, salt and water.",
        "lowercase": "wheat Allergy",
        "AI_processed": false
      },
      {
        "name": "Celiac Disease",
        "type": "Intolerance",
        "ingredient": {
          "name": "soy sauce",
          "index": 0
        },
        "short_description": "CSoy sauce is usually made with wheat which contains gluten that is main allergen of Celiac Disease.",
        "lowercase": "celiac disease",
        "AI_processed": false
      },
      {
        "name": "Celiac Disease",
        "type": "Intolerance",
        "ingredient": {
          "name": "soy sauce",
          "index": 0
        },
        "short_description": "Contains soy, a common source of intolerance.",
        "lowercase": "soy",
        "AI_processed": false
      }]
}

R: Result of assignment 1 after all tasks is following:
{
    "_id":"",
    "name":"Teriyaki Chicken Casserole",
    "instructions":[
       "Preheat oven to 350° F.",
       "Spray a 9x13-inch baking pan with non-stick spray.",
       "Combine soy sauce, ½ cup water, brown sugar, ginger and garlic in a small saucepan and cover. Bring to a boil over medium heat. Remove lid and cook for one minute once boiling.",
       "Stir together the corn starch and 2 tablespoons of water in a separate dish until smooth. Once sauce is boiling, add mixture to the saucepan and stir to combine. Cook until the sauce starts to thicken then remove from heat.",
       "Place the chicken breasts in the prepared pan. Pour one cup of the sauce over top of chicken. Place chicken in oven and bake 35 minutes or until cooked through. Remove from oven and shred chicken in the dish using two forks.",
       "*Meanwhile, steam or cook the vegetables according to package directions.",
       "Add the cooked vegetables and rice to the casserole dish with the chicken. Add most of the remaining sauce, reserving a bit to drizzle over the top when serving.",
       "Gently toss everything together in the casserole dish until combined. Return to oven and cook 15 minutes. Remove from oven and let stand 5 minutes before serving. Drizzle each serving with remaining sauce."
    ],
    "thumbnail":"https://www.themealdb.com\/images\/media\/meals\/wvpsxx1468256321.jpg",
    "video":"https://www.youtube.com\/watch?v=4aZr5hZXP_s",
    "ingredients":[
       {
          "image":"",
          "name":"soy sauce",
          "measure":"3⁄4 cup"
       },
       {
          "image":"",
          "name":"water",
          "measure":"1/2 cup"
       },
       {
          "image":"",
          "name":"brown sugar",
          "measure":"1/4 cup"
       },
       {
          "image":"",
          "name":"ground ginger",
          "measure":"1/2 teaspoon"
       },
       {
          "image":"",
          "name":"minced garlic",
          "measure":"1/2 teaspoon"
       },
       {
          "image":"",
          "name":"cornstarch",
          "measure":"4 Tablespoons"
       },
       {
          "image":"",
          "name":"chicken breasts",
          "measure":"2"
       },
       {
          "image":"",
          "name":"stir-fry vegetables",
          "measure":"1 (12 oz.)"
       },
       {
          "image":"",
          "name":"brown rice",
          "measure":"3 cups"
       }
    ],
    "engineSource":"FoodDataCentral",
    "tags":[], // Will be generated in analysis Task
    "allergens":[{
        "name": "Wheat Allergy",
        "type": "Allergy",
        "ingredient": {
          "name": "soy sauce",
          "index": 0
        },
        "short_description": "Soy sauce is usually made with wheat, soybeans, salt and water.",
        "lowercase": "wheat Allergy",
        "AI_processed": false
      },
      {
        "name": "Celiac Disease",
        "type": "Intolerance",
        "ingredient": {
          "name": "soy sauce",
          "index": 0
        },
        "short_description": "CSoy sauce is usually made with wheat which contains gluten that is main allergen of Celiac Disease.",
        "lowercase": "celiac disease",
        "AI_processed": false
      },
      {
        "name": "Celiac Disease",
        "type": "Intolerance",
        "ingredient": {
          "name": "soy sauce",
          "index": 0
        },
        "short_description": "Contains soy, a common source of intolerance.",
        "lowercase": "soy",
        "AI_processed": false
      }]
}

A2:
You are given by a JSON interpretation of the recipe, for example:
{"meals":[{"idMeal":"53046","strMeal":"Portuguese custard tarts","strDrinkAlternate":null,"strCategory":"Dessert","strArea":"Portuguese","strInstructions":"STEP 1\r\nRoll the pastry\r\nMix the flour and icing sugar, and use this to dust the work surface. Roll the pastry out to make a 45 x 30cm rectangle. Roll up lengthways to create a long sausage shape.\r\n\r\nSTEP 2\r\nCutting pastry into rounds\r\nCut the pastry into 24 wheels, about 1-2cm thick.\r\n\r\nSTEP 3\r\nRoll out each pastry portion\r\nRoll each wheel lightly with the rolling pin to fit 2 x 12-hole non-stick fairy cake tins.\r\n\r\nSTEP 4\r\nPress pastry into the tin\r\nPress the pastry circles into the tins and mould into the tins to make thin cases. Chill until needed.\r\n\r\nSTEP 5\r\nMake the infused syrup\r\nHeat the oven to 220C\/fan 200C\/gas 7. Make a sugar syrup by bringing the sugar, 200ml water, lemon zest and cinnamon stick to the boil. Reduce until syrupy, allow to cool, then remove the cinnamon and lemon. Whisk the eggs, egg yolks and cornflour until smooth in another large pan.\r\n\r\nSTEP 6\r\nMaking custard\r\nHeat the milk and vanilla pod seeds in a separate pan until just below the boil. Gradually pour the hot milk over the eggs and cornflour, then cook on a low heat, continually whisking.\r\n\r\nSTEP 7\r\nAdd syrup to custard\r\nAdd the cooled sugar syrup to the custard and whisk until thickened slightly.\r\n\r\nSTEP 8\r\nPour custard into the tins\r\nPour the custard through a sieve. Pour into the pastry cases and bake for 15 minutes until the pastry is golden and the custard has darkened.\r\n\r\nSTEP 9\r\ncool and dust with icing sugar\r\nCool completely in the tins then sift over icing sugar and ground cinnamon to serve.\r\n\r\n\r\n\r\n ","strMealThumb":"https:\/\/www.themealdb.com\/images\/media\/meals\/vmz7gl1614350221.jpg","strTags":null,"strYoutube":"https:\/\/www.youtube.com\/watch?v=lWLCxui1Mw8","strIngredient1":"Plain Flour","strIngredient2":"Icing Sugar","strIngredient3":"Puff Pastry","strIngredient4":"Caster Sugar","strIngredient5":"Lemon Zest","strIngredient6":"Cinnamon","strIngredient7":"Eggs","strIngredient8":"Egg Yolks","strIngredient9":"Corn Flour","strIngredient10":"Whole Milk","strIngredient11":"Vanilla","strIngredient12":"Cinnamon","strIngredient13":"","strIngredient14":"","strIngredient15":"","strIngredient16":"","strIngredient17":"","strIngredient18":"","strIngredient19":"","strIngredient20":"","strMeasure1":"2 tbs","strMeasure2":"2 tbs","strMeasure3":"375g","strMeasure4":"250g","strMeasure5":"2 strips","strMeasure6":"1 Stick","strMeasure7":"2","strMeasure8":"4","strMeasure9":"50g","strMeasure10":"500ml","strMeasure11":"Pod of","strMeasure12":"To serve","strMeasure13":" ","strMeasure14":" ","strMeasure15":" ","strMeasure16":" ","strMeasure17":" ","strMeasure18":" ","strMeasure19":" ","strMeasure20":" ","strSource":"https:\/\/www.olivemagazine.com\/recipes\/baking-and-desserts\/portuguese-custard-tarts\/","strImageSource":null,"strCreativeCommonsConfirmed":null,"dateModified":null}]}
Your assignment is broken to several task that will analyse, structure and enhance recipe by health analysis for allergens and possible intolerancies.

AR: