wu981526092 commited on
Commit
85ffdc8
Β·
1 Parent(s): beb0a01

πŸ”„ Replace Oxford Economics with Python Documentation Use Case

Browse files

- ✨ Updated sample data to use Python programming documentation as example use case
- 🐍 Changed from economic inquiries to programming concept questions
- πŸ“š Replaced 'Oxford Economics' with 'Python Documentation Assistant' throughout
- πŸ”§ Maintained all entity IDs, schemas, and architectural structure
- 🚫 Removed aif_inference references to avoid customer data association
- πŸ“– Updated to documentation_search trace type for better clarity

Key changes:
- Query: 'what does oxford economics present?' β†’ 'what are python list comprehensions used for?'
- Response: Economic services β†’ Programming concept explanations
- Tool: Oxford Economics Knowledge Search β†’ Python Documentation Search
- Domain: economics_consulting β†’ programming_documentation
- More universally understandable use case for developers
- Maintains RAG architecture and all functionality examples

backend/database/README_sample_data.md CHANGED
@@ -16,17 +16,17 @@ The enhanced sample data system automatically inserts curated examples showcasin
16
 
17
  The system includes 2 carefully selected examples showcasing AgentGraph's advanced capabilities:
18
 
19
- 1. **Oxford Economics AI Assistant** (Enhanced)
20
 
21
- - Type: `aif_inference`
22
- - Example: RAG-powered assistant processing economic inquiry with knowledge search and failure detection
23
  - 6 entities, 5 relations, 1 failure, 2 optimizations
24
  - Features: Content references, quality scoring, system summary
25
 
26
  2. **Simple Q&A Demonstration** (Basic)
27
 
28
  - Type: `conversation`
29
- - Example: Basic Oxford Economics service inquiry
30
  - 4 entities, 4 relations, 0 failures, 1 optimization
31
  - Features: Streamlined structure, clear interaction flow
32
 
 
16
 
17
  The system includes 2 carefully selected examples showcasing AgentGraph's advanced capabilities:
18
 
19
+ 1. **Python Documentation Assistant** (Enhanced)
20
 
21
+ - Type: `documentation_search`
22
+ - Example: RAG-powered assistant processing programming inquiry with knowledge search and failure detection
23
  - 6 entities, 5 relations, 1 failure, 2 optimizations
24
  - Features: Content references, quality scoring, system summary
25
 
26
  2. **Simple Q&A Demonstration** (Basic)
27
 
28
  - Type: `conversation`
29
+ - Example: Basic Python programming concept inquiry
30
  - 4 entities, 4 relations, 0 failures, 1 optimization
31
  - Features: Streamlined structure, clear interaction flow
32
 
backend/database/sample_data.py CHANGED
@@ -13,14 +13,14 @@ logger = logging.getLogger(__name__)
13
  # Enhanced sample traces showcasing AgentGraph's full capabilities
14
  SAMPLE_TRACES = [
15
  {
16
- "filename": "oxford_economics_inquiry.json",
17
- "title": "Oxford Economics AI Assistant Demo",
18
- "description": "Enhanced example showing RAG-powered AI assistant processing economic inquiry with knowledge search, failure detection and optimization suggestions",
19
- "trace_type": "aif_inference",
20
  "trace_source": "sample_data",
21
- "tags": ["economics", "rag_assistant", "knowledge_search", "failure_detection", "optimization"],
22
  "content": """{
23
- "id": "aif_trace_demo_001",
24
  "timestamp": "2025-01-27T00:00:00",
25
  "metadata": {
26
  "source": "AgentGraph_Demo",
@@ -29,15 +29,15 @@ SAMPLE_TRACES = [
29
  },
30
  "data": {
31
  "total_observations": 1,
32
- "summary": "Oxford Economics inquiry with RAG-powered assistant response"
33
  },
34
  "observations": [
35
  {
36
  "id": "demo_obs_001",
37
  "type": "inference",
38
  "timestamp": "2025-01-27T00:00:00",
39
- "input": "You are a knowledgeable assistant on Oxford Economics designed to answer questions accurately based on the provided context. Use the information retrieved from the knowledge base below to respond concisely and correctly.\\n\\n### Retrieved Documents:\\n['Oxford Economics contact: Mateusz Urban - murban@oxfordeconomics.com', 'Oxford Economics research and analysis services', 'Economic forecasting and consultancy expertise']\\n\\n### Question:\\nwhat does oxford economics present?\\n\\n### Answer:",
40
- "output": "Oxford Economics provides economic analysis, forecasting, and consultancy services.",
41
  "metadata": {
42
  "request_date": "2025-01-27T00:00:00",
43
  "databricks_request_id": "demo-request-001",
@@ -73,23 +73,23 @@ SAMPLE_TRACES = [
73
  },
74
  {
75
  "filename": "simple_qa_demonstration.txt",
76
- "title": "Simple Q&A: Basic Interaction",
77
- "description": "Streamlined example showing basic agent-human interaction with clear knowledge graph structure",
78
  "trace_type": "conversation",
79
  "trace_source": "sample_data",
80
  "tags": ["simple", "qa", "basic", "demonstration"],
81
- "content": """User: Hello, can you help me understand what services Oxford Economics provides?
82
 
83
- Assistant: Certainly! Oxford Economics is a leading economic consultancy that provides:
84
 
85
- 1. **Economic Analysis & Forecasting**: Comprehensive economic research and predictive modeling
86
- 2. **Consultancy Services**: Strategic advice for businesses, governments, and institutions
87
- 3. **Industry Analysis**: Sector-specific insights and market intelligence
88
- 4. **Policy Impact Assessment**: Evaluation of economic policies and their implications
89
 
90
- They specialize in data-driven insights that help organizations make informed decisions about their economic environment and strategic planning.
91
 
92
- Is there a specific aspect of their services you'd like to know more about?"""
93
  }
94
  ]
95
 
@@ -99,15 +99,15 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
99
  "filename": "kg_oxford_economics_enhanced.json",
100
  "trace_index": 0, # Links to first trace
101
  "graph_data": {
102
- "system_name": "Oxford Economics AI Assistant",
103
- "system_summary": "This intelligent assistant processes user inquiries about Oxford Economics through a streamlined workflow. When users submit questions, the knowledgeable agent analyzes them using RAG-powered knowledge search and delivers accurate, contextual responses about economic analysis and forecasting services.",
104
  "entities": [
105
  {
106
  "id": "agent_001",
107
  "type": "Agent",
108
- "name": "Oxford Economics Knowledge Agent",
109
  "importance": "HIGH",
110
- "raw_prompt": "You are a knowledgeable assistant on Oxford Economics designed to answer questions accurately based on retrieved knowledge base context. Use the search results to provide precise responses.",
111
  "raw_prompt_ref": [
112
  {
113
  "line_start": 31,
@@ -118,9 +118,9 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
118
  {
119
  "id": "task_001",
120
  "type": "Task",
121
- "name": "Economic Inquiry Processing",
122
  "importance": "HIGH",
123
- "raw_prompt": "Process user inquiry about Oxford Economics and generate an accurate, contextual response based on available information and company expertise.",
124
  "raw_prompt_ref": [
125
  {
126
  "line_start": 26,
@@ -131,9 +131,9 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
131
  {
132
  "id": "input_001",
133
  "type": "Input",
134
- "name": "User Economic Query",
135
  "importance": "HIGH",
136
- "raw_prompt": "what does oxford economics present?",
137
  "raw_prompt_ref": [
138
  {
139
  "line_start": 19,
@@ -144,9 +144,9 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
144
  {
145
  "id": "output_001",
146
  "type": "Output",
147
- "name": "Economic Services Overview",
148
  "importance": "HIGH",
149
- "raw_prompt": "Oxford Economics provides economic analysis, forecasting, and consultancy services.",
150
  "raw_prompt_ref": [
151
  {
152
  "line_start": 20,
@@ -157,9 +157,9 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
157
  {
158
  "id": "human_001",
159
  "type": "Human",
160
- "name": "Business User",
161
  "importance": "MEDIUM",
162
- "raw_prompt": "Professional seeking economic insights and analysis",
163
  "raw_prompt_ref": [
164
  {
165
  "line_start": 31,
@@ -170,9 +170,9 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
170
  {
171
  "id": "tool_001",
172
  "type": "Tool",
173
- "name": "Oxford Economics Knowledge Search",
174
  "importance": "HIGH",
175
- "raw_prompt": "Retrieval-Augmented Generation (RAG) system that searches Oxford Economics knowledge base for relevant documents, contact information, and service details to provide contextual information.",
176
  "raw_prompt_ref": [
177
  {
178
  "line_start": 49,
@@ -188,7 +188,7 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
188
  "target": "agent_001",
189
  "type": "CONSUMED_BY",
190
  "importance": "HIGH",
191
- "interaction_prompt": "User query received and processed by the economic knowledge agent",
192
  "interaction_prompt_ref": [
193
  {
194
  "line_start": 19,
@@ -202,7 +202,7 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
202
  "target": "task_001",
203
  "type": "PERFORMS",
204
  "importance": "HIGH",
205
- "interaction_prompt": "Agent executes economic inquiry processing task",
206
  "interaction_prompt_ref": [
207
  {
208
  "line_start": 26,
@@ -216,7 +216,7 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
216
  "target": "output_001",
217
  "type": "PRODUCES",
218
  "importance": "HIGH",
219
- "interaction_prompt": "Processing task generates comprehensive economic services response",
220
  "interaction_prompt_ref": [
221
  {
222
  "line_start": 20,
@@ -230,7 +230,7 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
230
  "target": "human_001",
231
  "type": "DELIVERS_TO",
232
  "importance": "HIGH",
233
- "interaction_prompt": "Economic analysis delivered to requesting business user",
234
  "interaction_prompt_ref": [
235
  {
236
  "line_start": 20,
@@ -244,7 +244,7 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
244
  "target": "tool_001",
245
  "type": "USES",
246
  "importance": "HIGH",
247
- "interaction_prompt": "Agent queries knowledge search system to retrieve relevant Oxford Economics documents and contextual information",
248
  "interaction_prompt_ref": [
249
  {
250
  "line_start": 49,
@@ -257,8 +257,8 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
257
  {
258
  "id": "failure_001",
259
  "risk_type": "HALLUCINATION",
260
- "description": "Minor spelling inconsistency in user query may affect search precision.",
261
- "raw_text": "what does oxford economics present?",
262
  "raw_text_ref": [
263
  {
264
  "line_start": 19,
@@ -272,7 +272,7 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
272
  {
273
  "id": "opt_001",
274
  "recommendation_type": "PROMPT_REFINEMENT",
275
- "description": "Enhance the agent prompt to include spell-checking and query normalization capabilities for improved accuracy and user experience.",
276
  "affected_ids": ["agent_001"],
277
  "raw_text_ref": [
278
  {
@@ -284,7 +284,7 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
284
  {
285
  "id": "opt_002",
286
  "recommendation_type": "TOOL_ENHANCEMENT",
287
- "description": "Expand knowledge search capabilities to include real-time market data, recent publications, and dynamic economic indicators alongside static company information.",
288
  "affected_ids": ["tool_001"],
289
  "raw_text_ref": [
290
  {
@@ -303,9 +303,9 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
303
  "failure_count": 1,
304
  "optimization_count": 2,
305
  "processing_method": "production_enhanced",
306
- "content_source": "aif_inference_trace",
307
  "language": "en",
308
- "domain": "economics_consulting"
309
  }
310
  }
311
  },
@@ -313,15 +313,15 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
313
  "filename": "kg_simple_qa_demo.json",
314
  "trace_index": 1, # Links to second trace
315
  "graph_data": {
316
- "system_name": "Oxford Economics Q&A Assistant",
317
- "system_summary": "A streamlined question-answering system designed to provide clear information about Oxford Economics services. The system processes user questions and delivers comprehensive responses about economic analysis and consulting capabilities.",
318
  "entities": [
319
  {
320
  "id": "user_001",
321
  "type": "Human",
322
  "name": "User",
323
  "importance": "HIGH",
324
- "raw_prompt": "Hello, can you help me understand what services Oxford Economics provides?",
325
  "raw_prompt_ref": [
326
  {
327
  "line_start": 1,
@@ -334,7 +334,7 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
334
  "type": "Agent",
335
  "name": "Q&A Assistant",
336
  "importance": "HIGH",
337
- "raw_prompt": "RAG-powered assistant specialized in searching knowledge base and providing accurate information about Oxford Economics services and capabilities.",
338
  "raw_prompt_ref": [
339
  {
340
  "line_start": 3,
@@ -347,7 +347,7 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
347
  "type": "Task",
348
  "name": "Service Information Request",
349
  "importance": "HIGH",
350
- "raw_prompt": "Process user inquiry about Oxford Economics services and provide comprehensive response.",
351
  "raw_prompt_ref": [
352
  {
353
  "line_start": 1,
@@ -360,7 +360,7 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
360
  "type": "Output",
361
  "name": "Service Overview Response",
362
  "importance": "HIGH",
363
- "raw_prompt": "Certainly! Oxford Economics is a leading economic consultancy that provides: 1. Economic Analysis & Forecasting 2. Consultancy Services 3. Industry Analysis 4. Policy Impact Assessment",
364
  "raw_prompt_ref": [
365
  {
366
  "line_start": 3,
@@ -376,7 +376,7 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
376
  "target": "assistant_001",
377
  "type": "CONSUMED_BY",
378
  "importance": "HIGH",
379
- "interaction_prompt": "User asks about Oxford Economics services",
380
  "interaction_prompt_ref": [
381
  {
382
  "line_start": 1,
@@ -390,7 +390,7 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
390
  "target": "inquiry_task",
391
  "type": "PERFORMS",
392
  "importance": "HIGH",
393
- "interaction_prompt": "Assistant processes the service information request",
394
  "interaction_prompt_ref": [
395
  {
396
  "line_start": 3,
@@ -404,7 +404,7 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
404
  "target": "response_output",
405
  "type": "PRODUCES",
406
  "importance": "HIGH",
407
- "interaction_prompt": "Task generates comprehensive service overview",
408
  "interaction_prompt_ref": [
409
  {
410
  "line_start": 3,
@@ -418,7 +418,7 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
418
  "target": "user_001",
419
  "type": "DELIVERS_TO",
420
  "importance": "HIGH",
421
- "interaction_prompt": "Comprehensive service information delivered to user",
422
  "interaction_prompt_ref": [
423
  {
424
  "line_start": 3,
@@ -432,7 +432,7 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
432
  {
433
  "id": "opt_simple_001",
434
  "recommendation_type": "PROMPT_REFINEMENT",
435
- "description": "Consider adding interactive follow-up capabilities to allow users to ask for more specific information about any of the mentioned service areas.",
436
  "affected_ids": ["assistant_001"],
437
  "raw_text_ref": [
438
  {
@@ -453,7 +453,7 @@ SAMPLE_KNOWLEDGE_GRAPHS = [
453
  "processing_method": "simplified_demonstration",
454
  "content_source": "conversation_trace",
455
  "language": "en",
456
- "domain": "economics_consulting"
457
  }
458
  }
459
  }
@@ -560,5 +560,5 @@ def get_sample_data_info():
560
  "trace_types": list(set(t["trace_type"] for t in SAMPLE_TRACES)),
561
  "complexity_levels": ["enhanced", "simple"],
562
  "features": ["rag_search", "failure_detection", "optimization_recommendations", "content_references", "quality_scoring"],
563
- "description": "Enhanced AgentGraph examples showcasing Oxford Economics RAG-powered assistant with knowledge search, failure detection, optimization suggestions, and advanced knowledge graph features"
564
  }
 
13
  # Enhanced sample traces showcasing AgentGraph's full capabilities
14
  SAMPLE_TRACES = [
15
  {
16
+ "filename": "python_documentation_inquiry.json",
17
+ "title": "Python Documentation Assistant Demo",
18
+ "description": "Enhanced example showing RAG-powered AI assistant processing programming inquiry with knowledge search, failure detection and optimization suggestions",
19
+ "trace_type": "documentation_search",
20
  "trace_source": "sample_data",
21
+ "tags": ["programming", "rag_assistant", "documentation", "failure_detection", "optimization"],
22
  "content": """{
23
+ "id": "doc_trace_demo_001",
24
  "timestamp": "2025-01-27T00:00:00",
25
  "metadata": {
26
  "source": "AgentGraph_Demo",
 
29
  },
30
  "data": {
31
  "total_observations": 1,
32
+ "summary": "Python documentation inquiry with RAG-powered assistant response"
33
  },
34
  "observations": [
35
  {
36
  "id": "demo_obs_001",
37
  "type": "inference",
38
  "timestamp": "2025-01-27T00:00:00",
39
+ "input": "You are a helpful Python programming assistant designed to answer questions accurately based on the provided documentation. Use the information retrieved from the knowledge base below to respond concisely and correctly.\\n\\n### Retrieved Documents:\\n['Python list comprehensions - efficient way to create lists', 'Python built-in functions - len(), range(), enumerate()', 'Python data structures - lists, dictionaries, sets, tuples']\\n\\n### Question:\\nwhat are python list comprehensions used for?\\n\\n### Answer:",
40
+ "output": "Python list comprehensions provide an efficient and readable way to create lists by applying expressions to elements in iterables.",
41
  "metadata": {
42
  "request_date": "2025-01-27T00:00:00",
43
  "databricks_request_id": "demo-request-001",
 
73
  },
74
  {
75
  "filename": "simple_qa_demonstration.txt",
76
+ "title": "Simple Q&A: Basic Programming Help",
77
+ "description": "Streamlined example showing basic programming assistant interaction with clear knowledge graph structure",
78
  "trace_type": "conversation",
79
  "trace_source": "sample_data",
80
  "tags": ["simple", "qa", "basic", "demonstration"],
81
+ "content": """User: Hello, can you help me understand what Python list comprehensions are used for?
82
 
83
+ Assistant: Certainly! Python list comprehensions are a powerful and concise way to create lists. Here are their main uses:
84
 
85
+ 1. **Creating Lists from Iterables**: Transform elements from existing sequences
86
+ 2. **Filtering Data**: Include only elements that meet certain conditions
87
+ 3. **Mathematical Operations**: Apply calculations to each element efficiently
88
+ 4. **Nested Iterations**: Handle complex data transformations in readable syntax
89
 
90
+ For example: `[x**2 for x in range(10) if x % 2 == 0]` creates a list of squares of even numbers.
91
 
92
+ Would you like to see more specific examples or learn about related Python features?"""
93
  }
94
  ]
95
 
 
99
  "filename": "kg_oxford_economics_enhanced.json",
100
  "trace_index": 0, # Links to first trace
101
  "graph_data": {
102
+ "system_name": "Python Documentation Assistant",
103
+ "system_summary": "This intelligent assistant processes user inquiries about Python programming through a streamlined workflow. When users submit questions, the knowledgeable agent analyzes them using RAG-powered knowledge search and delivers accurate, contextual responses about Python concepts, syntax, and best practices.",
104
  "entities": [
105
  {
106
  "id": "agent_001",
107
  "type": "Agent",
108
+ "name": "Python Documentation Agent",
109
  "importance": "HIGH",
110
+ "raw_prompt": "You are a helpful Python programming assistant designed to answer questions accurately based on retrieved documentation context. Use the search results to provide precise responses.",
111
  "raw_prompt_ref": [
112
  {
113
  "line_start": 31,
 
118
  {
119
  "id": "task_001",
120
  "type": "Task",
121
+ "name": "Programming Question Processing",
122
  "importance": "HIGH",
123
+ "raw_prompt": "Process user inquiry about Python programming and generate an accurate, contextual response based on available documentation and programming best practices.",
124
  "raw_prompt_ref": [
125
  {
126
  "line_start": 26,
 
131
  {
132
  "id": "input_001",
133
  "type": "Input",
134
+ "name": "User Programming Query",
135
  "importance": "HIGH",
136
+ "raw_prompt": "what are python list comprehensions used for?",
137
  "raw_prompt_ref": [
138
  {
139
  "line_start": 19,
 
144
  {
145
  "id": "output_001",
146
  "type": "Output",
147
+ "name": "Programming Concept Explanation",
148
  "importance": "HIGH",
149
+ "raw_prompt": "Python list comprehensions provide an efficient and readable way to create lists by applying expressions to elements in iterables.",
150
  "raw_prompt_ref": [
151
  {
152
  "line_start": 20,
 
157
  {
158
  "id": "human_001",
159
  "type": "Human",
160
+ "name": "Python Developer",
161
  "importance": "MEDIUM",
162
+ "raw_prompt": "Developer seeking Python programming guidance and documentation",
163
  "raw_prompt_ref": [
164
  {
165
  "line_start": 31,
 
170
  {
171
  "id": "tool_001",
172
  "type": "Tool",
173
+ "name": "Python Documentation Search",
174
  "importance": "HIGH",
175
+ "raw_prompt": "Retrieval-Augmented Generation (RAG) system that searches Python documentation knowledge base for relevant concepts, syntax examples, and best practices to provide contextual information.",
176
  "raw_prompt_ref": [
177
  {
178
  "line_start": 49,
 
188
  "target": "agent_001",
189
  "type": "CONSUMED_BY",
190
  "importance": "HIGH",
191
+ "interaction_prompt": "User query received and processed by the Python documentation agent",
192
  "interaction_prompt_ref": [
193
  {
194
  "line_start": 19,
 
202
  "target": "task_001",
203
  "type": "PERFORMS",
204
  "importance": "HIGH",
205
+ "interaction_prompt": "Agent executes programming question processing task",
206
  "interaction_prompt_ref": [
207
  {
208
  "line_start": 26,
 
216
  "target": "output_001",
217
  "type": "PRODUCES",
218
  "importance": "HIGH",
219
+ "interaction_prompt": "Processing task generates comprehensive programming concept explanation",
220
  "interaction_prompt_ref": [
221
  {
222
  "line_start": 20,
 
230
  "target": "human_001",
231
  "type": "DELIVERS_TO",
232
  "importance": "HIGH",
233
+ "interaction_prompt": "Programming explanation delivered to requesting developer",
234
  "interaction_prompt_ref": [
235
  {
236
  "line_start": 20,
 
244
  "target": "tool_001",
245
  "type": "USES",
246
  "importance": "HIGH",
247
+ "interaction_prompt": "Agent queries knowledge search system to retrieve relevant Python documentation and contextual information",
248
  "interaction_prompt_ref": [
249
  {
250
  "line_start": 49,
 
257
  {
258
  "id": "failure_001",
259
  "risk_type": "HALLUCINATION",
260
+ "description": "Query lacks specificity - could ask about specific Python features rather than general usage.",
261
+ "raw_text": "what are python list comprehensions used for?",
262
  "raw_text_ref": [
263
  {
264
  "line_start": 19,
 
272
  {
273
  "id": "opt_001",
274
  "recommendation_type": "PROMPT_REFINEMENT",
275
+ "description": "Enhance the agent prompt to encourage more specific programming questions and provide structured code examples in responses.",
276
  "affected_ids": ["agent_001"],
277
  "raw_text_ref": [
278
  {
 
284
  {
285
  "id": "opt_002",
286
  "recommendation_type": "TOOL_ENHANCEMENT",
287
+ "description": "Expand knowledge search capabilities to include code examples, interactive tutorials, and version-specific documentation alongside basic syntax references.",
288
  "affected_ids": ["tool_001"],
289
  "raw_text_ref": [
290
  {
 
303
  "failure_count": 1,
304
  "optimization_count": 2,
305
  "processing_method": "production_enhanced",
306
+ "content_source": "documentation_trace",
307
  "language": "en",
308
+ "domain": "programming_documentation"
309
  }
310
  }
311
  },
 
313
  "filename": "kg_simple_qa_demo.json",
314
  "trace_index": 1, # Links to second trace
315
  "graph_data": {
316
+ "system_name": "Python Q&A Assistant",
317
+ "system_summary": "A streamlined question-answering system designed to provide clear information about Python programming concepts. The system processes user questions and delivers comprehensive responses about Python syntax and best practices.",
318
  "entities": [
319
  {
320
  "id": "user_001",
321
  "type": "Human",
322
  "name": "User",
323
  "importance": "HIGH",
324
+ "raw_prompt": "Hello, can you help me understand what Python list comprehensions are used for?",
325
  "raw_prompt_ref": [
326
  {
327
  "line_start": 1,
 
334
  "type": "Agent",
335
  "name": "Q&A Assistant",
336
  "importance": "HIGH",
337
+ "raw_prompt": "RAG-powered assistant specialized in searching knowledge base and providing accurate information about Python programming concepts and capabilities.",
338
  "raw_prompt_ref": [
339
  {
340
  "line_start": 3,
 
347
  "type": "Task",
348
  "name": "Service Information Request",
349
  "importance": "HIGH",
350
+ "raw_prompt": "Process user inquiry about Python programming concepts and provide comprehensive response.",
351
  "raw_prompt_ref": [
352
  {
353
  "line_start": 1,
 
360
  "type": "Output",
361
  "name": "Service Overview Response",
362
  "importance": "HIGH",
363
+ "raw_prompt": "Certainly! Python list comprehensions are a powerful feature that provides: 1. Concise List Creation 2. Efficient Data Filtering 3. Readable Transformations 4. Performance Optimization",
364
  "raw_prompt_ref": [
365
  {
366
  "line_start": 3,
 
376
  "target": "assistant_001",
377
  "type": "CONSUMED_BY",
378
  "importance": "HIGH",
379
+ "interaction_prompt": "User asks about Python programming concepts",
380
  "interaction_prompt_ref": [
381
  {
382
  "line_start": 1,
 
390
  "target": "inquiry_task",
391
  "type": "PERFORMS",
392
  "importance": "HIGH",
393
+ "interaction_prompt": "Assistant processes the programming concept request",
394
  "interaction_prompt_ref": [
395
  {
396
  "line_start": 3,
 
404
  "target": "response_output",
405
  "type": "PRODUCES",
406
  "importance": "HIGH",
407
+ "interaction_prompt": "Task generates comprehensive programming concept overview",
408
  "interaction_prompt_ref": [
409
  {
410
  "line_start": 3,
 
418
  "target": "user_001",
419
  "type": "DELIVERS_TO",
420
  "importance": "HIGH",
421
+ "interaction_prompt": "Comprehensive programming information delivered to user",
422
  "interaction_prompt_ref": [
423
  {
424
  "line_start": 3,
 
432
  {
433
  "id": "opt_simple_001",
434
  "recommendation_type": "PROMPT_REFINEMENT",
435
+ "description": "Consider adding interactive code examples and hands-on tutorials to allow users to practice the programming concepts being discussed.",
436
  "affected_ids": ["assistant_001"],
437
  "raw_text_ref": [
438
  {
 
453
  "processing_method": "simplified_demonstration",
454
  "content_source": "conversation_trace",
455
  "language": "en",
456
+ "domain": "programming_documentation"
457
  }
458
  }
459
  }
 
560
  "trace_types": list(set(t["trace_type"] for t in SAMPLE_TRACES)),
561
  "complexity_levels": ["enhanced", "simple"],
562
  "features": ["rag_search", "failure_detection", "optimization_recommendations", "content_references", "quality_scoring"],
563
+ "description": "Enhanced AgentGraph examples showcasing Python Documentation RAG-powered assistant with knowledge search, failure detection, optimization suggestions, and advanced knowledge graph features"
564
  }