{
  "title": "Custom Complex Fields",
  "video_id": "agO-1e6iCJ4",
  "published": "2023-11-02T08:05:52+0000",
  "complexity": "Complex",
  "old_url": "https://workflows-of-ai.com/workflow/custom-complex-fields",
  "description": "Use AI Interpolator and the Custom Field module to split a Beef Wellington recipe into amount, unit, ingredient and instructions.",
  "subtitle": "Turn a recipe stored as one text blob into structured ingredient rows with amount, unit, ingredient and extra instructions.",
  "summary": "The Custom Field module stores multi-value complex fields in one table without extra entities. Marcus adds an ingredients field with amount, unit, ingredient and extra instructions subfields, then uses the AI Interpolator custom field rule with GPT-4 and a one-shot example per subfield. Saving the Beef Wellington recipe fills in one row per ingredient.",
  "categories": [
    "Drupal AI"
  ],
  "intro_html": "<p>In this workflow, the initial step is the introduction of a substantial text blob, which contains the recipe of Gordon Ramsay's renowned Beef Wellington. This text, while informative, might lack the structured format desired for easy comprehension and reference.</p><p>To address this, the Custom Field module is employed. Within this module, a complex field is crafted, tailored to capture specific elements of a recipe. The design of this complex field encompasses separate segments for the unit (e.g., grams, tablespoons), amount (e.g., 2, 100), ingredient (e.g., beef, mushrooms), and any additional instructions or notes that are pertinent to the ingredient or the cooking step.</p><p>Once the complex field structure is set up, the large text blob containing the recipe is presented to the AI Interpolator OpenAI module. Leveraging its ability to understand and parse unstructured text, the module meticulously sifts through the Beef Wellington recipe. It identifies and extracts the various components, placing each in its respective segment within the complex field: unit, amount, ingredient, and extra instructions.</p><p>The final output is a neatly structured representation of Gordon Ramsay's Beef Wellington recipe, making it significantly more user-friendly and accessible. Every ingredient and its corresponding details are organized systematically, simplifying the cooking process for those referencing the recipe.</p>",
  "intro_added": false,
  "chapters": [
    "0:00 What the Custom Field module does",
    "1:32 A recipe stored as one blob",
    "2:32 Modules you need",
    "3:15 Building the ingredients field",
    "5:38 The custom field rule prompt",
    "6:46 One-shot examples per subfield",
    "8:17 Running it on Beef Wellington",
    "9:29 Checking the extracted ingredients"
  ],
  "corrections": [
    [
      "druple",
      "Drupal"
    ],
    [
      "drupal's",
      "Drupal's"
    ],
    [
      "trole",
      "Drupal"
    ],
    [
      "Ram SB Wellington",
      "Ramsay's Beef Wellington"
    ],
    [
      "Geo field",
      "Geofield"
    ],
    [
      "AI interpolator",
      "AI Interpolator"
    ],
    [
      "open AI",
      "OpenAI"
    ],
    [
      "Json",
      "JSON"
    ]
  ],
  "ai_note": "The video and the introduction are Marcus's own, first published on workflows-of-ai.com. AI wrote the subtitle, the summary and the video chapters from the transcript, and corrected misheard names in YouTube's automatic captions."
}