{
  "schema_version": 1,
  "diagram_type": "sequence",
  "meta": {
    "title": "Tool call hôm nay và <prediction> (đề xuất)",
    "quality_profile": "showcase",
    "viewBox": [
      930,
      500
    ],
    "views": [
      {
        "id": "tool-call",
        "label": "Tool call: phải handoff",
        "focus": [
          "llm",
          "harness",
          "tool"
        ],
        "note": "Model sinh tên tool và tham số rồi dừng; harness gọi hàm và đưa kết quả vào lượt mới."
      },
      {
        "id": "prediction",
        "label": "<prediction>: không rời GPU",
        "focus": [
          "llm",
          "expert"
        ],
        "note": "Đề xuất của tác giả: đọc logit true/false ngay tại vị trí probability, ghi số vào chuỗi rồi sinh tiếp, không handoff cho harness."
      }
    ],
    "column_fit": "spread",
    "legend": {
      "mode": "hidden"
    }
  },
  "participants": [
    {
      "id": "tool",
      "type": "external",
      "label": "Tool",
      "sublabel": "hàm bên ngoài"
    },
    {
      "id": "harness",
      "type": "backend",
      "label": "Harness",
      "sublabel": "agent runtime"
    },
    {
      "id": "llm",
      "type": "backend",
      "label": "LLM",
      "sublabel": "đang decode"
    },
    {
      "id": "expert",
      "type": "security",
      "label": "Đọc logit",
      "sublabel": "tại probability: (đề xuất)"
    }
  ],
  "segments": [
    {
      "from": 154,
      "to": 294,
      "label": "Tool call hôm nay"
    },
    {
      "from": 314,
      "to": 382,
      "label": "<prediction> đề xuất"
    }
  ],
  "messages": [
    {
      "from": "llm",
      "to": "harness",
      "y": 176,
      "label": "to=function. + args, dừng",
      "variant": "emphasis"
    },
    {
      "from": "harness",
      "to": "tool",
      "y": 212,
      "label": "gọi hàm",
      "variant": "default"
    },
    {
      "from": "tool",
      "to": "harness",
      "y": 248,
      "label": "kết quả",
      "variant": "return"
    },
    {
      "from": "harness",
      "to": "llm",
      "y": 284,
      "label": "lượt mới + kết quả",
      "variant": "return"
    },
    {
      "from": "llm",
      "to": "expert",
      "y": 336,
      "label": "claim, probability:",
      "variant": "emphasis"
    },
    {
      "from": "expert",
      "to": "llm",
      "y": 372,
      "label": "logit true/false → 0.04",
      "variant": "return"
    }
  ],
  "activations": [
    {
      "participant": "harness",
      "from": 170,
      "to": 292,
      "type": "backend"
    },
    {
      "participant": "tool",
      "from": 206,
      "to": 256,
      "type": "external"
    },
    {
      "participant": "expert",
      "from": 330,
      "to": 380,
      "type": "security"
    }
  ],
  "cards": [
    {
      "dot": "cyan",
      "title": "Token là micro-classifier",
      "items": [
        "Token đầu sau assistant: trả lời chữ hay gọi tool",
        "Token im_end: đã xong chưa"
      ]
    },
    {
      "dot": "rose",
      "title": "Chỉ là đề xuất",
      "items": [
        "<prediction>, cách đọc logit và expert MoE đều là suy đoán",
        "Không phải tính năng có thật của OpenAI"
      ]
    }
  ]
}
