File size: 5,730 Bytes
a44a2a2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
{
  "schema_version": "2",
  "name": "d3 vs decision models",
  "references": [
    {
      "id": "ref_state",
      "role": "reference",
      "label": "State",
      "asset_type": "text",
      "inputs": [
        { "id": "in", "label": "State", "type": "text" }
      ],
      "outputs": [
        { "id": "out", "label": "State", "type": "text" }
      ],
      "data": {
        "out": "The order arrived damaged yesterday. The customer has a receipt and asks for a replacement today."
      },
      "x": 40,
      "y": 60,
      "width": 300,
      "height": 160
    },
    {
      "id": "ref_questions",
      "role": "reference",
      "label": "Questions (JSON)",
      "asset_type": "text",
      "inputs": [
        { "id": "in", "label": "Questions", "type": "text" }
      ],
      "outputs": [
        { "id": "out", "label": "Questions", "type": "text" }
      ],
      "data": {
        "out": "{\"route\": {\"type\": \"choice\", \"instructions\": \"Which team should handle this request?\", \"criteria\": {\"returns\": \"Refunds, replacements and damaged deliveries\", \"billing\": \"Payments, invoices and charges\", \"technical\": \"Product setup and faults\"}}, \"receipt\": {\"type\": \"noul\", \"instructions\": \"Does the customer have a receipt?\"}, \"urgency\": {\"type\": \"score\", \"instructions\": \"How urgent is this request?\", \"criteria\": [\"Routine\", \"Soon\", \"Today\"]}}"
      },
      "x": 40,
      "y": 280,
      "width": 300,
      "height": 300
    }
  ],
  "operators": [
    {
      "id": "op_d3",
      "role": "operator",
      "kind": "fn",
      "fn": "decide_d3",
      "label": "d3 (27B, remote API)",
      "inputs": [
        { "id": "in_state", "label": "state", "type": "text", "required": true },
        { "id": "in_questions", "label": "questions", "type": "text", "required": true }
      ],
      "outputs": [
        { "id": "out_0", "label": "probabilities", "type": "text", "output_index": 0 },
        { "id": "out_1", "label": "status", "type": "text", "output_index": 1 }
      ],
      "data": {},
      "x": 420,
      "y": 40,
      "width": 270,
      "height": 150
    },
    {
      "id": "op_d3_edge",
      "role": "operator",
      "kind": "fn",
      "fn": "decide_d3_edge",
      "label": "d3-edge (0.6B, local)",
      "inputs": [
        { "id": "in_state", "label": "state", "type": "text", "required": true },
        { "id": "in_questions", "label": "questions", "type": "text", "required": true }
      ],
      "outputs": [
        { "id": "out_0", "label": "probabilities", "type": "text", "output_index": 0 },
        { "id": "out_1", "label": "status", "type": "text", "output_index": 1 }
      ],
      "data": {},
      "x": 420,
      "y": 240,
      "width": 270,
      "height": 150
    },
    {
      "id": "op_gliner",
      "role": "operator",
      "kind": "fn",
      "fn": "decide_gliner",
      "label": "GLiNER2.5-Decide (340M, local)",
      "inputs": [
        { "id": "in_state", "label": "state", "type": "text", "required": true },
        { "id": "in_questions", "label": "questions", "type": "text", "required": true }
      ],
      "outputs": [
        { "id": "out_0", "label": "probabilities", "type": "text", "output_index": 0 },
        { "id": "out_1", "label": "status", "type": "text", "output_index": 1 }
      ],
      "data": {},
      "x": 420,
      "y": 440,
      "width": 270,
      "height": 150
    }
  ],
  "subjects": [
    {
      "id": "sub_d3",
      "role": "subject",
      "label": "d3 (27B)",
      "asset_type": "text",
      "inputs": [
        { "id": "in", "label": "Probabilities", "type": "text" }
      ],
      "outputs": [],
      "data": {},
      "x": 760,
      "y": 40,
      "width": 320,
      "height": 260
    },
    {
      "id": "sub_d3_edge",
      "role": "subject",
      "label": "d3-edge (0.6B)",
      "asset_type": "text",
      "inputs": [
        { "id": "in", "label": "Probabilities", "type": "text" }
      ],
      "outputs": [],
      "data": {},
      "x": 760,
      "y": 350,
      "width": 320,
      "height": 260
    },
    {
      "id": "sub_gliner",
      "role": "subject",
      "label": "GLiNER2.5-Decide (340M)",
      "asset_type": "text",
      "inputs": [
        { "id": "in", "label": "Probabilities", "type": "text" }
      ],
      "outputs": [],
      "data": {},
      "x": 760,
      "y": 660,
      "width": 320,
      "height": 260
    }
  ],
  "edges": [
    { "id": "e1", "from_node_id": "ref_state", "from_port_id": "out", "to_node_id": "op_d3", "to_port_id": "in_state", "type": "text" },
    { "id": "e2", "from_node_id": "ref_questions", "from_port_id": "out", "to_node_id": "op_d3", "to_port_id": "in_questions", "type": "text" },
    { "id": "e3", "from_node_id": "ref_state", "from_port_id": "out", "to_node_id": "op_d3_edge", "to_port_id": "in_state", "type": "text" },
    { "id": "e4", "from_node_id": "ref_questions", "from_port_id": "out", "to_node_id": "op_d3_edge", "to_port_id": "in_questions", "type": "text" },
    { "id": "e5", "from_node_id": "ref_state", "from_port_id": "out", "to_node_id": "op_gliner", "to_port_id": "in_state", "type": "text" },
    { "id": "e6", "from_node_id": "ref_questions", "from_port_id": "out", "to_node_id": "op_gliner", "to_port_id": "in_questions", "type": "text" },
    { "id": "e7", "from_node_id": "op_d3", "from_port_id": "out_0", "to_node_id": "sub_d3", "to_port_id": "in", "type": "text" },
    { "id": "e8", "from_node_id": "op_d3_edge", "from_port_id": "out_0", "to_node_id": "sub_d3_edge", "to_port_id": "in", "type": "text" },
    { "id": "e9", "from_node_id": "op_gliner", "from_port_id": "out_0", "to_node_id": "sub_gliner", "to_port_id": "in", "type": "text" }
  ]
}