wu981526092 commited on
Commit
d3559e7
·
1 Parent(s): e0a5339

🎬 Add temporal replay support for algorithm_sample_1 with 3 progressive window KGs

Browse files
backend/database/samples/knowledge_graphs/kg_algorithm_sample_1_window_0.json ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "filename": "kg_algorithm_sample_1_window_0.json",
3
+ "trace_index": 0,
4
+ "graph_data": {
5
+ "system_name": "Location-Based Restaurant Discovery System",
6
+ "system_summary": "Initial stage of the Location-Based Restaurant Discovery System focusing on location identification and geographic analysis. The User Restaurant Query (input_001) is processed by the Location-Based Services Expert (agent_001) who begins Geographic Proximity Analysis (task_001). Computer Terminal (agent_004) provides computational support. This window shows the foundational setup with 3 entities and 3 relationships.",
7
+ "entities": [
8
+ {
9
+ "id": "agent_001",
10
+ "type": "Agent",
11
+ "name": "Location-Based Services Expert",
12
+ "importance": "HIGH",
13
+ "raw_prompt": "Specialized in geographic information systems, spatial analysis, and location-based queries. Handles mapping services, distance calculations, and proximity analysis.",
14
+ "raw_prompt_ref": [
15
+ {
16
+ "line_start": 15,
17
+ "line_end": 25,
18
+ "confidence": 0.95
19
+ }
20
+ ]
21
+ },
22
+ {
23
+ "id": "task_001",
24
+ "type": "Task",
25
+ "name": "Geographic Proximity Analysis",
26
+ "importance": "HIGH",
27
+ "raw_prompt": "Analyze geographic proximity between Harkness Memorial State Park and nearby restaurants. Calculate distances and identify closest establishments.",
28
+ "raw_prompt_ref": [
29
+ {
30
+ "line_start": 5,
31
+ "line_end": 10,
32
+ "confidence": 0.98
33
+ }
34
+ ]
35
+ },
36
+ {
37
+ "id": "input_001",
38
+ "type": "Input",
39
+ "name": "User Restaurant Query",
40
+ "importance": "HIGH",
41
+ "raw_prompt": "User request for closest eatery to Harkness Memorial State Park open at 11pm on Wednesdays",
42
+ "raw_prompt_ref": [
43
+ {
44
+ "line_start": 1,
45
+ "line_end": 3,
46
+ "confidence": 0.99
47
+ }
48
+ ]
49
+ }
50
+ ],
51
+ "relations": [
52
+ {
53
+ "id": "rel_001",
54
+ "source": "input_001",
55
+ "target": "agent_001",
56
+ "type": "CONSUMED_BY",
57
+ "importance": "HIGH",
58
+ "interaction_prompt": "Location-based query consumed by Location-Based Services Expert",
59
+ "interaction_prompt_ref": [
60
+ {
61
+ "line_start": 5,
62
+ "line_end": 8,
63
+ "confidence": 0.95
64
+ }
65
+ ]
66
+ },
67
+ {
68
+ "id": "rel_002",
69
+ "source": "agent_001",
70
+ "target": "task_001",
71
+ "type": "PERFORMS",
72
+ "importance": "HIGH",
73
+ "interaction_prompt": "Location-Based Services Expert performs geographic proximity analysis",
74
+ "interaction_prompt_ref": [
75
+ {
76
+ "line_start": 15,
77
+ "line_end": 25,
78
+ "confidence": 0.92
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ "id": "rel_009",
84
+ "source": "agent_004",
85
+ "target": "task_001",
86
+ "type": "REQUIRED_BY",
87
+ "importance": "MEDIUM",
88
+ "interaction_prompt": "Computational task requires Computer Terminal for execution",
89
+ "interaction_prompt_ref": [
90
+ {
91
+ "line_start": 20,
92
+ "line_end": 25,
93
+ "confidence": 0.8
94
+ }
95
+ ]
96
+ }
97
+ ],
98
+ "failures": [],
99
+ "optimizations": [],
100
+ "metadata": {
101
+ "window_info": {
102
+ "window_index": 0,
103
+ "window_total": 3,
104
+ "window_name": "Initial Query Stage",
105
+ "processing_stage": "初始查询阶段",
106
+ "trace_id": "algorithm_sample_1",
107
+ "processing_run_id": "sample_replay_001",
108
+ "window_start_char": 0,
109
+ "window_end_char": 8675,
110
+ "entity_count": 3,
111
+ "relation_count": 3,
112
+ "failure_count": 0,
113
+ "optimization_count": 0,
114
+ "created_at": "2025-09-01T20:30:56.631864"
115
+ }
116
+ }
117
+ },
118
+ "extraction_info": {
119
+ "method": "enhanced_mock_creation",
120
+ "model": "human_designed",
121
+ "timestamp": "2025-01-27",
122
+ "api_key_used": "[REDACTED]",
123
+ "no_enhancement": false,
124
+ "source": "manual_design_for_demo"
125
+ },
126
+ "window_index": 0,
127
+ "window_total": 3,
128
+ "window_start_char": 0,
129
+ "window_end_char": 8675,
130
+ "processing_run_id": "sample_replay_001",
131
+ "trace_id": "algorithm_sample_1",
132
+ "is_final": false
133
+ }
backend/database/samples/knowledge_graphs/kg_algorithm_sample_1_window_1.json ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "filename": "kg_algorithm_sample_1_window_1.json",
3
+ "trace_index": 0,
4
+ "graph_data": {
5
+ "system_name": "Location-Based Restaurant Discovery System",
6
+ "system_summary": "Data collection stage where the Eateries Expert (agent_002) joins the workflow to perform Restaurant Data Collection (task_002). The system now involves 6 entities working together with 6 relationships established. Computer Terminal support is actively engaged for data processing tasks.",
7
+ "entities": [
8
+ {
9
+ "id": "agent_001",
10
+ "type": "Agent",
11
+ "name": "Location-Based Services Expert",
12
+ "importance": "HIGH",
13
+ "raw_prompt": "Specialized in geographic information systems, spatial analysis, and location-based queries. Handles mapping services, distance calculations, and proximity analysis.",
14
+ "raw_prompt_ref": [
15
+ {
16
+ "line_start": 15,
17
+ "line_end": 25,
18
+ "confidence": 0.95
19
+ }
20
+ ]
21
+ },
22
+ {
23
+ "id": "agent_002",
24
+ "type": "Agent",
25
+ "name": "Eateries Expert",
26
+ "importance": "HIGH",
27
+ "raw_prompt": "Expert in restaurant data, food service information, and dining establishment databases. Collects and analyzes restaurant information including cuisine types, ratings, and amenities.",
28
+ "raw_prompt_ref": [
29
+ {
30
+ "line_start": 35,
31
+ "line_end": 45,
32
+ "confidence": 0.92
33
+ }
34
+ ]
35
+ },
36
+ {
37
+ "id": "agent_004",
38
+ "type": "Tool",
39
+ "name": "Computer Terminal",
40
+ "importance": "MEDIUM",
41
+ "raw_prompt": "Code execution environment and computational terminal for running calculations, scripts, and data processing tasks. Provides computational support to other agents when code execution is required.",
42
+ "raw_prompt_ref": [
43
+ {
44
+ "line_start": 75,
45
+ "line_end": 80,
46
+ "confidence": 0.85
47
+ }
48
+ ]
49
+ },
50
+ {
51
+ "id": "task_001",
52
+ "type": "Task",
53
+ "name": "Geographic Proximity Analysis",
54
+ "importance": "HIGH",
55
+ "raw_prompt": "Analyze geographic proximity between Harkness Memorial State Park and nearby restaurants. Calculate distances and identify closest establishments.",
56
+ "raw_prompt_ref": [
57
+ {
58
+ "line_start": 5,
59
+ "line_end": 10,
60
+ "confidence": 0.98
61
+ }
62
+ ]
63
+ },
64
+ {
65
+ "id": "task_002",
66
+ "type": "Task",
67
+ "name": "Restaurant Data Collection",
68
+ "importance": "HIGH",
69
+ "raw_prompt": "Collect comprehensive restaurant data including operating hours, contact information, cuisine types, and availability information for Wednesday evenings.",
70
+ "raw_prompt_ref": [
71
+ {
72
+ "line_start": 25,
73
+ "line_end": 35,
74
+ "confidence": 0.94
75
+ }
76
+ ]
77
+ },
78
+ {
79
+ "id": "input_001",
80
+ "type": "Input",
81
+ "name": "User Restaurant Query",
82
+ "importance": "HIGH",
83
+ "raw_prompt": "User request for closest eatery to Harkness Memorial State Park open at 11pm on Wednesdays",
84
+ "raw_prompt_ref": [
85
+ {
86
+ "line_start": 1,
87
+ "line_end": 3,
88
+ "confidence": 0.99
89
+ }
90
+ ]
91
+ }
92
+ ],
93
+ "relations": [
94
+ {
95
+ "id": "rel_001",
96
+ "source": "input_001",
97
+ "target": "agent_001",
98
+ "type": "CONSUMED_BY",
99
+ "importance": "HIGH",
100
+ "interaction_prompt": "Location-based query consumed by Location-Based Services Expert",
101
+ "interaction_prompt_ref": [
102
+ {
103
+ "line_start": 5,
104
+ "line_end": 8,
105
+ "confidence": 0.95
106
+ }
107
+ ]
108
+ },
109
+ {
110
+ "id": "rel_002",
111
+ "source": "agent_001",
112
+ "target": "task_001",
113
+ "type": "PERFORMS",
114
+ "importance": "HIGH",
115
+ "interaction_prompt": "Location-Based Services Expert performs geographic proximity analysis",
116
+ "interaction_prompt_ref": [
117
+ {
118
+ "line_start": 15,
119
+ "line_end": 25,
120
+ "confidence": 0.92
121
+ }
122
+ ]
123
+ },
124
+ {
125
+ "id": "rel_003",
126
+ "source": "agent_002",
127
+ "target": "task_002",
128
+ "type": "PERFORMS",
129
+ "importance": "HIGH",
130
+ "interaction_prompt": "Eateries Expert performs restaurant data collection",
131
+ "interaction_prompt_ref": [
132
+ {
133
+ "line_start": 35,
134
+ "line_end": 45,
135
+ "confidence": 0.89
136
+ }
137
+ ]
138
+ },
139
+ {
140
+ "id": "rel_005",
141
+ "source": "task_001",
142
+ "target": "task_002",
143
+ "type": "NEXT",
144
+ "importance": "HIGH",
145
+ "interaction_prompt": "Geographic analysis leads to restaurant data collection",
146
+ "interaction_prompt_ref": [
147
+ {
148
+ "line_start": 25,
149
+ "line_end": 30,
150
+ "confidence": 0.88
151
+ }
152
+ ]
153
+ },
154
+ {
155
+ "id": "rel_009",
156
+ "source": "agent_004",
157
+ "target": "task_001",
158
+ "type": "REQUIRED_BY",
159
+ "importance": "MEDIUM",
160
+ "interaction_prompt": "Computational task requires Computer Terminal for execution",
161
+ "interaction_prompt_ref": [
162
+ {
163
+ "line_start": 20,
164
+ "line_end": 25,
165
+ "confidence": 0.8
166
+ }
167
+ ]
168
+ },
169
+ {
170
+ "id": "rel_uses_computer",
171
+ "source": "agent_001",
172
+ "target": "agent_004",
173
+ "type": "USES",
174
+ "importance": "MEDIUM",
175
+ "interaction_prompt": "Agent uses Computer Terminal for computational tasks",
176
+ "interaction_prompt_ref": [
177
+ {
178
+ "line_start": 50,
179
+ "line_end": 55,
180
+ "confidence": 0.8
181
+ }
182
+ ]
183
+ }
184
+ ],
185
+ "failures": [
186
+ {
187
+ "id": "failure_001",
188
+ "description": "Data Verification Expert failed to properly validate restaurant operating hours due to incorrect Python code implementation, leading to inaccurate 11pm availability data",
189
+ "raw_text": "",
190
+ "raw_text_ref": [
191
+ {
192
+ "line_start": 60,
193
+ "line_end": 65,
194
+ "confidence": 0.9
195
+ }
196
+ ],
197
+ "affected_id": "agent_003",
198
+ "risk_type": "EXECUTION_ERROR"
199
+ }
200
+ ],
201
+ "optimizations": [
202
+ {
203
+ "id": "opt_001",
204
+ "description": "Enhance location-based services with caching mechanisms and fallback data sources to improve reliability and reduce API dependency",
205
+ "raw_text": "Implement robust location service tools with redundancy",
206
+ "raw_text_ref": [
207
+ {
208
+ "line_start": 15,
209
+ "line_end": 25,
210
+ "confidence": 0.88
211
+ }
212
+ ],
213
+ "affected_ids": [
214
+ "agent_001"
215
+ ],
216
+ "recommendation_type": "TOOL_ENHANCEMENT"
217
+ }
218
+ ],
219
+ "metadata": {
220
+ "window_info": {
221
+ "window_index": 1,
222
+ "window_total": 3,
223
+ "window_name": "Data Collection Stage",
224
+ "processing_stage": "数据收集阶段",
225
+ "trace_id": "algorithm_sample_1",
226
+ "processing_run_id": "sample_replay_001",
227
+ "window_start_char": 7808,
228
+ "window_end_char": 16483,
229
+ "entity_count": 6,
230
+ "relation_count": 6,
231
+ "failure_count": 1,
232
+ "optimization_count": 1,
233
+ "created_at": "2025-09-01T20:30:56.632296"
234
+ }
235
+ }
236
+ },
237
+ "extraction_info": {
238
+ "method": "enhanced_mock_creation",
239
+ "model": "human_designed",
240
+ "timestamp": "2025-01-27",
241
+ "api_key_used": "[REDACTED]",
242
+ "no_enhancement": false,
243
+ "source": "manual_design_for_demo"
244
+ },
245
+ "window_index": 1,
246
+ "window_total": 3,
247
+ "window_start_char": 7808,
248
+ "window_end_char": 16483,
249
+ "processing_run_id": "sample_replay_001",
250
+ "trace_id": "algorithm_sample_1",
251
+ "is_final": false
252
+ }
backend/database/samples/knowledge_graphs/kg_algorithm_sample_1_window_2.json ADDED
@@ -0,0 +1,417 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "filename": "kg_algorithm_sample_1_window_2.json",
3
+ "trace_index": 0,
4
+ "graph_data": {
5
+ "system_name": "Location-Based Restaurant Discovery System",
6
+ "system_summary": "This sophisticated system helps users find nearby restaurants based on complex criteria including location proximity, operating hours, and day-specific availability. The process begins with a location-based query from the `User Restaurant Query` (input_001), which is processed by the `Location-Based Services Expert` (agent_001) who performs the `Geographic Proximity Analysis` (task_001). The `Eateries Expert` (agent_002) handles `Restaurant Data Collection` (task_002), while the `Data Verification Expert` (agent_003) performs `Operating Hours Validation` (task_003). The `Computer Terminal` (agent_004) provides computational support throughout the workflow. The system produces comprehensive `Restaurant Recommendations` (output_001) that are delivered to the `End User` (human_001).",
7
+ "entities": [
8
+ {
9
+ "id": "agent_001",
10
+ "type": "Agent",
11
+ "name": "Location-Based Services Expert",
12
+ "importance": "HIGH",
13
+ "raw_prompt": "Specialized in geographic information systems, spatial analysis, and location-based queries. Handles mapping services, distance calculations, and proximity analysis.",
14
+ "raw_prompt_ref": [
15
+ {
16
+ "line_start": 15,
17
+ "line_end": 25,
18
+ "confidence": 0.95
19
+ }
20
+ ]
21
+ },
22
+ {
23
+ "id": "agent_002",
24
+ "type": "Agent",
25
+ "name": "Eateries Expert",
26
+ "importance": "HIGH",
27
+ "raw_prompt": "Expert in restaurant data, food service information, and dining establishment databases. Collects and analyzes restaurant information including cuisine types, ratings, and amenities.",
28
+ "raw_prompt_ref": [
29
+ {
30
+ "line_start": 35,
31
+ "line_end": 45,
32
+ "confidence": 0.92
33
+ }
34
+ ]
35
+ },
36
+ {
37
+ "id": "agent_003",
38
+ "type": "Agent",
39
+ "name": "Data Verification Expert",
40
+ "importance": "HIGH",
41
+ "raw_prompt": "Responsible for validating data accuracy, cross-referencing information sources, and ensuring data quality. Specializes in verification of business hours, contact information, and operational status.",
42
+ "raw_prompt_ref": [
43
+ {
44
+ "line_start": 55,
45
+ "line_end": 65,
46
+ "confidence": 0.88
47
+ }
48
+ ]
49
+ },
50
+ {
51
+ "id": "agent_004",
52
+ "type": "Tool",
53
+ "name": "Computer Terminal",
54
+ "importance": "MEDIUM",
55
+ "raw_prompt": "Code execution environment and computational terminal for running calculations, scripts, and data processing tasks. Provides computational support to other agents when code execution is required.",
56
+ "raw_prompt_ref": [
57
+ {
58
+ "line_start": 75,
59
+ "line_end": 80,
60
+ "confidence": 0.85
61
+ }
62
+ ]
63
+ },
64
+ {
65
+ "id": "task_001",
66
+ "type": "Task",
67
+ "name": "Geographic Proximity Analysis",
68
+ "importance": "HIGH",
69
+ "raw_prompt": "Analyze geographic proximity between Harkness Memorial State Park and nearby restaurants. Calculate distances and identify closest establishments.",
70
+ "raw_prompt_ref": [
71
+ {
72
+ "line_start": 5,
73
+ "line_end": 10,
74
+ "confidence": 0.98
75
+ }
76
+ ]
77
+ },
78
+ {
79
+ "id": "task_002",
80
+ "type": "Task",
81
+ "name": "Restaurant Data Collection",
82
+ "importance": "HIGH",
83
+ "raw_prompt": "Collect comprehensive restaurant data including operating hours, contact information, cuisine types, and availability information for Wednesday evenings.",
84
+ "raw_prompt_ref": [
85
+ {
86
+ "line_start": 25,
87
+ "line_end": 35,
88
+ "confidence": 0.94
89
+ }
90
+ ]
91
+ },
92
+ {
93
+ "id": "task_003",
94
+ "type": "Task",
95
+ "name": "Operating Hours Validation",
96
+ "importance": "HIGH",
97
+ "raw_prompt": "Verify restaurant operating hours for Wednesday nights, specifically checking 11pm availability and cross-referencing multiple data sources.",
98
+ "raw_prompt_ref": [
99
+ {
100
+ "line_start": 45,
101
+ "line_end": 55,
102
+ "confidence": 0.91
103
+ }
104
+ ]
105
+ },
106
+ {
107
+ "id": "input_001",
108
+ "type": "Input",
109
+ "name": "User Restaurant Query",
110
+ "importance": "HIGH",
111
+ "raw_prompt": "User request for closest eatery to Harkness Memorial State Park open at 11pm on Wednesdays",
112
+ "raw_prompt_ref": [
113
+ {
114
+ "line_start": 1,
115
+ "line_end": 3,
116
+ "confidence": 0.99
117
+ }
118
+ ]
119
+ },
120
+ {
121
+ "id": "output_001",
122
+ "type": "Output",
123
+ "name": "Restaurant Recommendations",
124
+ "importance": "HIGH",
125
+ "raw_prompt": "Comprehensive restaurant recommendations with verified operating hours and proximity information",
126
+ "raw_prompt_ref": [
127
+ {
128
+ "line_start": 90,
129
+ "line_end": 95,
130
+ "confidence": 0.93
131
+ }
132
+ ]
133
+ },
134
+ {
135
+ "id": "human_001",
136
+ "type": "Human",
137
+ "name": "End User",
138
+ "importance": "HIGH",
139
+ "raw_prompt": "User seeking restaurant recommendations near a specific location with time constraints",
140
+ "raw_prompt_ref": [
141
+ {
142
+ "line_start": 1,
143
+ "line_end": 1,
144
+ "confidence": 0.95
145
+ }
146
+ ]
147
+ }
148
+ ],
149
+ "relations": [
150
+ {
151
+ "id": "rel_001",
152
+ "source": "input_001",
153
+ "target": "agent_001",
154
+ "type": "CONSUMED_BY",
155
+ "importance": "HIGH",
156
+ "interaction_prompt": "Location-based query consumed by Location-Based Services Expert",
157
+ "interaction_prompt_ref": [
158
+ {
159
+ "line_start": 5,
160
+ "line_end": 8,
161
+ "confidence": 0.95
162
+ }
163
+ ]
164
+ },
165
+ {
166
+ "id": "rel_002",
167
+ "source": "agent_001",
168
+ "target": "task_001",
169
+ "type": "PERFORMS",
170
+ "importance": "HIGH",
171
+ "interaction_prompt": "Location-Based Services Expert performs geographic proximity analysis",
172
+ "interaction_prompt_ref": [
173
+ {
174
+ "line_start": 15,
175
+ "line_end": 25,
176
+ "confidence": 0.92
177
+ }
178
+ ]
179
+ },
180
+ {
181
+ "id": "rel_003",
182
+ "source": "agent_002",
183
+ "target": "task_002",
184
+ "type": "PERFORMS",
185
+ "importance": "HIGH",
186
+ "interaction_prompt": "Eateries Expert performs restaurant data collection",
187
+ "interaction_prompt_ref": [
188
+ {
189
+ "line_start": 35,
190
+ "line_end": 45,
191
+ "confidence": 0.89
192
+ }
193
+ ]
194
+ },
195
+ {
196
+ "id": "rel_004",
197
+ "source": "agent_003",
198
+ "target": "task_003",
199
+ "type": "PERFORMS",
200
+ "importance": "HIGH",
201
+ "interaction_prompt": "Data Verification Expert performs operating hours validation",
202
+ "interaction_prompt_ref": [
203
+ {
204
+ "line_start": 55,
205
+ "line_end": 65,
206
+ "confidence": 0.87
207
+ }
208
+ ]
209
+ },
210
+ {
211
+ "id": "rel_005",
212
+ "source": "task_001",
213
+ "target": "task_002",
214
+ "type": "NEXT",
215
+ "importance": "HIGH",
216
+ "interaction_prompt": "Geographic analysis leads to restaurant data collection",
217
+ "interaction_prompt_ref": [
218
+ {
219
+ "line_start": 25,
220
+ "line_end": 30,
221
+ "confidence": 0.88
222
+ }
223
+ ]
224
+ },
225
+ {
226
+ "id": "rel_006",
227
+ "source": "task_002",
228
+ "target": "task_003",
229
+ "type": "NEXT",
230
+ "importance": "HIGH",
231
+ "interaction_prompt": "Restaurant data collection followed by operating hours validation",
232
+ "interaction_prompt_ref": [
233
+ {
234
+ "line_start": 45,
235
+ "line_end": 50,
236
+ "confidence": 0.85
237
+ }
238
+ ]
239
+ },
240
+ {
241
+ "id": "rel_007",
242
+ "source": "task_003",
243
+ "target": "output_001",
244
+ "type": "PRODUCES",
245
+ "importance": "HIGH",
246
+ "interaction_prompt": "Validation task produces final restaurant recommendations",
247
+ "interaction_prompt_ref": [
248
+ {
249
+ "line_start": 90,
250
+ "line_end": 95,
251
+ "confidence": 0.92
252
+ }
253
+ ]
254
+ },
255
+ {
256
+ "id": "rel_008",
257
+ "source": "output_001",
258
+ "target": "human_001",
259
+ "type": "DELIVERS_TO",
260
+ "importance": "HIGH",
261
+ "interaction_prompt": "Restaurant recommendations delivered to end user",
262
+ "interaction_prompt_ref": [
263
+ {
264
+ "line_start": 95,
265
+ "line_end": 100,
266
+ "confidence": 0.93
267
+ }
268
+ ]
269
+ },
270
+ {
271
+ "id": "rel_009",
272
+ "source": "agent_004",
273
+ "target": "task_001",
274
+ "type": "REQUIRED_BY",
275
+ "importance": "MEDIUM",
276
+ "interaction_prompt": "Computational task requires Computer Terminal for execution",
277
+ "interaction_prompt_ref": [
278
+ {
279
+ "line_start": 20,
280
+ "line_end": 25,
281
+ "confidence": 0.8
282
+ }
283
+ ]
284
+ },
285
+ {
286
+ "id": "rel_uses_computer",
287
+ "source": "agent_001",
288
+ "target": "agent_004",
289
+ "type": "USES",
290
+ "importance": "MEDIUM",
291
+ "interaction_prompt": "Agent uses Computer Terminal for computational tasks",
292
+ "interaction_prompt_ref": [
293
+ {
294
+ "line_start": 50,
295
+ "line_end": 55,
296
+ "confidence": 0.8
297
+ }
298
+ ]
299
+ }
300
+ ],
301
+ "failures": [
302
+ {
303
+ "id": "failure_001",
304
+ "description": "Data Verification Expert failed to properly validate restaurant operating hours due to incorrect Python code implementation, leading to inaccurate 11pm availability data",
305
+ "raw_text": "",
306
+ "raw_text_ref": [
307
+ {
308
+ "line_start": 60,
309
+ "line_end": 65,
310
+ "confidence": 0.9
311
+ }
312
+ ],
313
+ "affected_id": "agent_003",
314
+ "risk_type": "EXECUTION_ERROR"
315
+ },
316
+ {
317
+ "id": "failure_002",
318
+ "description": "Location-Based Services Expert encountered API limitations when accessing real-time restaurant data, resulting in incomplete proximity analysis",
319
+ "raw_text": "",
320
+ "raw_text_ref": [
321
+ {
322
+ "line_start": 18,
323
+ "line_end": 22,
324
+ "confidence": 0.85
325
+ }
326
+ ],
327
+ "affected_id": "agent_001",
328
+ "risk_type": "RETRIEVAL_ERROR"
329
+ }
330
+ ],
331
+ "optimizations": [
332
+ {
333
+ "id": "opt_001",
334
+ "description": "Enhance location-based services with caching mechanisms and fallback data sources to improve reliability and reduce API dependency",
335
+ "raw_text": "Implement robust location service tools with redundancy",
336
+ "raw_text_ref": [
337
+ {
338
+ "line_start": 15,
339
+ "line_end": 25,
340
+ "confidence": 0.88
341
+ }
342
+ ],
343
+ "affected_ids": [
344
+ "agent_001"
345
+ ],
346
+ "recommendation_type": "TOOL_ENHANCEMENT"
347
+ },
348
+ {
349
+ "id": "opt_002",
350
+ "description": "Combine restaurant data collection and operating hours validation into a single integrated task to reduce coordination overhead and improve data consistency",
351
+ "raw_text": "Merge data collection and validation workflows",
352
+ "raw_text_ref": [
353
+ {
354
+ "line_start": 35,
355
+ "line_end": 65,
356
+ "confidence": 0.82
357
+ }
358
+ ],
359
+ "affected_ids": [
360
+ "agent_002",
361
+ "agent_003",
362
+ "task_002",
363
+ "task_003"
364
+ ],
365
+ "recommendation_type": "WORKFLOW_SIMPLIFICATION"
366
+ },
367
+ {
368
+ "id": "opt_003",
369
+ "description": "Refine Data Verification Expert prompts to include specific error handling and validation procedures for time-sensitive restaurant data",
370
+ "raw_text": "Improve validation prompts with error handling",
371
+ "raw_text_ref": [
372
+ {
373
+ "line_start": 55,
374
+ "line_end": 65,
375
+ "confidence": 0.85
376
+ }
377
+ ],
378
+ "affected_ids": [
379
+ "agent_003"
380
+ ],
381
+ "recommendation_type": "PROMPT_REFINEMENT"
382
+ }
383
+ ],
384
+ "metadata": {
385
+ "window_info": {
386
+ "window_index": 2,
387
+ "window_total": 3,
388
+ "window_name": "Complete Processing Stage",
389
+ "processing_stage": "完整处理阶段",
390
+ "trace_id": "algorithm_sample_1",
391
+ "processing_run_id": "sample_replay_001",
392
+ "window_start_char": 15616,
393
+ "window_end_char": 26025,
394
+ "entity_count": 10,
395
+ "relation_count": 10,
396
+ "failure_count": 2,
397
+ "optimization_count": 3,
398
+ "created_at": "2025-09-01T20:30:56.632700"
399
+ }
400
+ }
401
+ },
402
+ "extraction_info": {
403
+ "method": "enhanced_mock_creation",
404
+ "model": "human_designed",
405
+ "timestamp": "2025-01-27",
406
+ "api_key_used": "[REDACTED]",
407
+ "no_enhancement": false,
408
+ "source": "manual_design_for_demo"
409
+ },
410
+ "window_index": 2,
411
+ "window_total": 3,
412
+ "window_start_char": 15616,
413
+ "window_end_char": 26025,
414
+ "processing_run_id": "sample_replay_001",
415
+ "trace_id": "algorithm_sample_1",
416
+ "is_final": false
417
+ }
backend/database/samples/samples_config.json CHANGED
@@ -77,8 +77,31 @@
77
  "multi_source_validation",
78
  "real_world_constraints",
79
  "execution_error_analysis",
80
- "tool_enhancement_recommendations"
81
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  },
83
  {
84
  "id": "algorithm_sample_3",
@@ -172,9 +195,9 @@
172
  }
173
  ],
174
  "metadata": {
175
- "version": "2.0.0",
176
  "created": "2025-01-27",
177
  "updated": "2025-01-27",
178
  "description": "Comprehensive AgentGraph sample data showcasing diverse multi-agent interactions across multiple domains including location services, probability theory, academic research, and ecological data analysis"
179
  }
180
- }
 
77
  "multi_source_validation",
78
  "real_world_constraints",
79
  "execution_error_analysis",
80
+ "tool_enhancement_recommendations",
81
+ "temporal_replay",
82
+ "progressive_knowledge_evolution",
83
+ "window_based_visualization"
84
+ ],
85
+ "supports_replay": true,
86
+ "window_info": {
87
+ "window_count": 3,
88
+ "processing_run_id": "sample_replay_001",
89
+ "window_files": [
90
+ "knowledge_graphs/kg_algorithm_sample_1_window_0.json",
91
+ "knowledge_graphs/kg_algorithm_sample_1_window_1.json",
92
+ "knowledge_graphs/kg_algorithm_sample_1_window_2.json"
93
+ ],
94
+ "progression_stages": [
95
+ "Location Analysis & Initial Query",
96
+ "Data Collection & Verification",
97
+ "Result Processing & Delivery"
98
+ ],
99
+ "stage_descriptions": [
100
+ "用户查询处理和位置识别,位置专家开始地理分析",
101
+ "餐厅专家加入进行数据收集,计算工具提供支持,开始出现验证问题",
102
+ "数据验证专家完成最终验证,完整的结果处理和交付流程"
103
+ ]
104
+ }
105
  },
106
  {
107
  "id": "algorithm_sample_3",
 
195
  }
196
  ],
197
  "metadata": {
198
+ "version": "2.1.0",
199
  "created": "2025-01-27",
200
  "updated": "2025-01-27",
201
  "description": "Comprehensive AgentGraph sample data showcasing diverse multi-agent interactions across multiple domains including location services, probability theory, academic research, and ecological data analysis"
202
  }
203
+ }