{
  "schema_version": 2,
  "diagram_type": "workflow",
  "meta": {
    "title": "Phân loại bằng xác suất một token (giả định về Jev)",
    "quality_profile": "showcase",
    "legend": {
      "mode": "hidden"
    },
    "views": [
      {
        "id": "one-step",
        "label": "Một bước",
        "focus": [
          "prompt",
          "step",
          "read",
          "norm",
          "answer"
        ],
        "note": "Giả định của tác giả về Jev: sinh đúng một bước, chỉ đọc xác suất các token nhãn, chuẩn hoá rồi trả về."
      }
    ]
  },
  "lanes": [
    {
      "id": "in",
      "label": "Đầu vào"
    },
    {
      "id": "llm",
      "label": "LLM"
    },
    {
      "id": "out",
      "label": "Kết quả"
    }
  ],
  "phases": [
    {
      "id": "p1",
      "label": "Hỏi",
      "fromCol": 0,
      "toCol": 0
    },
    {
      "id": "p2",
      "label": "Một bước sinh",
      "fromCol": 1,
      "toCol": 2,
      "variant": "emphasis"
    },
    {
      "id": "p3",
      "label": "Trả về",
      "fromCol": 3,
      "toCol": 3,
      "variant": "dashed"
    }
  ],
  "mainPath": [
    "prompt",
    "step",
    "read",
    "norm",
    "answer"
  ],
  "nodes": [
    {
      "id": "prompt",
      "lane": "in",
      "col": 0,
      "type": "frontend",
      "label": "State + câu hỏi",
      "sublabel": "nhãn A, B, C, D (mỗi nhãn 1 token)",
      "width": 180
    },
    {
      "id": "step",
      "lane": "llm",
      "col": 1,
      "type": "backend",
      "label": "Sinh 1 bước",
      "sublabel": "xác suất mọi token",
      "width": 160
    },
    {
      "id": "read",
      "lane": "llm",
      "col": 2,
      "type": "backend",
      "label": "Lấy token nhãn",
      "sublabel": "bỏ phần còn lại",
      "width": 160
    },
    {
      "id": "norm",
      "lane": "out",
      "col": 2,
      "type": "database",
      "label": "Chuẩn hoá",
      "sublabel": "tổng bằng 1",
      "width": 140
    },
    {
      "id": "answer",
      "lane": "out",
      "col": 3,
      "type": "frontend",
      "label": "Đáp án + xác suất",
      "sublabel": "chọn cao nhất",
      "width": 180
    }
  ],
  "edges": [
    {
      "id": "e1",
      "from": "prompt",
      "to": "step",
      "variant": "emphasis"
    },
    {
      "id": "e2",
      "from": "step",
      "to": "read",
      "variant": "emphasis"
    },
    {
      "id": "e3",
      "from": "read",
      "to": "norm",
      "variant": "emphasis"
    },
    {
      "id": "e4",
      "from": "norm",
      "to": "answer",
      "variant": "emphasis"
    }
  ]
}