{
  "schema_version": 2,
  "diagram_type": "workflow",
  "meta": {
    "title": "Hai pha của meta-cognition",
    "quality_profile": "showcase",
    "legend": {
      "mode": "hidden"
    },
    "views": [
      {
        "id": "mc1",
        "label": "MC1",
        "focus": [
          "s1out",
          "mc1",
          "useS1"
        ],
        "note": "Thiếu tài nguyên, hoặc S1 đủ tự tin so với reward kỳ vọng: dùng ngay lời giải S1."
      },
      {
        "id": "mc2",
        "label": "MC2",
        "focus": [
          "gain",
          "callS2",
          "useS1"
        ],
        "note": "Gọi S2 chỉ khi reward tăng thêm so với S1 lớn hơn chi phí chạy S2."
      }
    ]
  },
  "lanes": [
    {
      "id": "mc1",
      "label": "MC1: nhanh, xấp xỉ"
    },
    {
      "id": "mc2",
      "label": "MC2: kỹ, tốn hơn"
    },
    {
      "id": "out",
      "label": "Kết quả"
    }
  ],
  "phases": [
    {
      "id": "p1",
      "label": "MC1: lọc nhanh",
      "fromCol": 0,
      "toCol": 1
    },
    {
      "id": "p2",
      "label": "MC2: so lợi ích, chi phí",
      "fromCol": 2,
      "toCol": 3,
      "variant": "emphasis"
    }
  ],
  "mainPath": [
    "s1out",
    "mc1",
    "gain",
    "callS2"
  ],
  "nodes": [
    {
      "id": "s1out",
      "lane": "mc1",
      "col": 0,
      "type": "frontend",
      "label": "Lời giải S1",
      "sublabel": "+ độ tự tin",
      "width": 150
    },
    {
      "id": "mc1",
      "lane": "mc1",
      "col": 1,
      "type": "security",
      "label": "Thiếu tài nguyên, hoặc S1 đủ tin?",
      "sublabel": "so với reward kỳ vọng",
      "width": 290
    },
    {
      "id": "gain",
      "lane": "mc2",
      "col": 2,
      "type": "backend",
      "label": "Lợi thêm > chi phí S2?",
      "sublabel": "dùng model of self",
      "width": 220
    },
    {
      "id": "useS1",
      "lane": "out",
      "col": 1,
      "type": "frontend",
      "label": "Dùng S1",
      "sublabel": "trường hợp thường gặp",
      "width": 190
    },
    {
      "id": "callS2",
      "lane": "out",
      "col": 3,
      "type": "cloud",
      "label": "Gọi S2",
      "sublabel": "suy luận",
      "width": 150
    }
  ],
  "edges": [
    {
      "id": "e1",
      "from": "s1out",
      "to": "mc1",
      "variant": "emphasis"
    },
    {
      "id": "e2",
      "from": "mc1",
      "to": "gain",
      "label": "không",
      "variant": "emphasis"
    },
    {
      "id": "e3",
      "from": "gain",
      "to": "callS2",
      "label": "có",
      "variant": "emphasis"
    },
    {
      "id": "e4",
      "from": "mc1",
      "to": "useS1",
      "label": "có",
      "role": "branch"
    },
    {
      "id": "e5",
      "from": "gain",
      "to": "useS1",
      "label": "không",
      "role": "branch"
    }
  ]
}
