Spaces:
Running
Running
Commit
Β·
aa547eb
1
Parent(s):
85ffdc8
π§ Remove Remaining Oxford Economics References
Browse files- β
Fixed request_raw metadata to use Python programming assistant context
- β
Updated response_raw metadata with Python list comprehensions response
- π’ Adjusted token counts to match new response length (13β22 completion, 162β168 prompt, 175β190 total)
- π Updated knowledge graph filename: kg_oxford_economics_enhanced.json β kg_python_documentation_enhanced.json
- β¨ Complete removal of all Oxford Economics references from sample data
All traces now fully consistent with Python Documentation Assistant use case.
backend/database/sample_data.py
CHANGED
|
@@ -44,27 +44,27 @@ SAMPLE_TRACES = [
|
|
| 44 |
"request_time": "2025-01-27T12:00:00.000",
|
| 45 |
"status_code": 200,
|
| 46 |
"sampling_fraction": 1,
|
| 47 |
-
"request_raw": "{\"messages\":[{\"role\":\"system\",\"content\":\"You are a
|
| 48 |
-
"response_raw": "{\"choices\":[{\"content_filter_results\":{\"hate\":{\"filtered\":false,\"severity\":\"safe\"},\"self_harm\":{\"filtered\":false,\"severity\":\"safe\"},\"sexual\":{\"filtered\":false,\"severity\":\"safe\"},\"violence\":{\"filtered\":false,\"severity\":\"safe\"}},\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"
|
| 49 |
"served_entity_id": "demo-entity-001",
|
| 50 |
"logging_error_codes": "[]",
|
| 51 |
"requester": "demo-user-001"
|
| 52 |
},
|
| 53 |
"latency": 0.531,
|
| 54 |
"usage": {
|
| 55 |
-
"completion_tokens":
|
| 56 |
"completion_tokens_details": {
|
| 57 |
"accepted_prediction_tokens": 0,
|
| 58 |
"audio_tokens": 0,
|
| 59 |
"reasoning_tokens": 0,
|
| 60 |
"rejected_prediction_tokens": 0
|
| 61 |
},
|
| 62 |
-
"prompt_tokens":
|
| 63 |
"prompt_tokens_details": {
|
| 64 |
"audio_tokens": 0,
|
| 65 |
"cached_tokens": 0
|
| 66 |
},
|
| 67 |
-
"total_tokens":
|
| 68 |
},
|
| 69 |
"model": "gpt-4o-2024-11-20"
|
| 70 |
}
|
|
@@ -96,7 +96,7 @@ Would you like to see more specific examples or learn about related Python featu
|
|
| 96 |
# Enhanced knowledge graphs demonstrating AgentGraph's complete feature set
|
| 97 |
SAMPLE_KNOWLEDGE_GRAPHS = [
|
| 98 |
{
|
| 99 |
-
"filename": "
|
| 100 |
"trace_index": 0, # Links to first trace
|
| 101 |
"graph_data": {
|
| 102 |
"system_name": "Python Documentation Assistant",
|
|
|
|
| 44 |
"request_time": "2025-01-27T12:00:00.000",
|
| 45 |
"status_code": 200,
|
| 46 |
"sampling_fraction": 1,
|
| 47 |
+
"request_raw": "{\"messages\":[{\"role\":\"system\",\"content\":\"You are a helpful Python programming assistant\"},{\"role\":\"user\",\"content\":\"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:\"}]}",
|
| 48 |
+
"response_raw": "{\"choices\":[{\"content_filter_results\":{\"hate\":{\"filtered\":false,\"severity\":\"safe\"},\"self_harm\":{\"filtered\":false,\"severity\":\"safe\"},\"sexual\":{\"filtered\":false,\"severity\":\"safe\"},\"violence\":{\"filtered\":false,\"severity\":\"safe\"}},\"finish_reason\":\"stop\",\"index\":0,\"logprobs\":null,\"message\":{\"content\":\"Python list comprehensions provide an efficient and readable way to create lists by applying expressions to elements in iterables.\",\"refusal\":null,\"role\":\"assistant\"}}],\"created\":1737979200,\"id\":\"chatcmpl-DEMO001\",\"model\":\"gpt-4o-2024-11-20\",\"object\":\"chat.completion\",\"system_fingerprint\":\"fp_demo_001\",\"usage\":{\"completion_tokens\":22,\"completion_tokens_details\":{\"accepted_prediction_tokens\":0,\"audio_tokens\":0,\"reasoning_tokens\":0,\"rejected_prediction_tokens\":0},\"prompt_tokens\":168,\"prompt_tokens_details\":{\"audio_tokens\":0,\"cached_tokens\":0},\"total_tokens\":190}}",
|
| 49 |
"served_entity_id": "demo-entity-001",
|
| 50 |
"logging_error_codes": "[]",
|
| 51 |
"requester": "demo-user-001"
|
| 52 |
},
|
| 53 |
"latency": 0.531,
|
| 54 |
"usage": {
|
| 55 |
+
"completion_tokens": 22,
|
| 56 |
"completion_tokens_details": {
|
| 57 |
"accepted_prediction_tokens": 0,
|
| 58 |
"audio_tokens": 0,
|
| 59 |
"reasoning_tokens": 0,
|
| 60 |
"rejected_prediction_tokens": 0
|
| 61 |
},
|
| 62 |
+
"prompt_tokens": 168,
|
| 63 |
"prompt_tokens_details": {
|
| 64 |
"audio_tokens": 0,
|
| 65 |
"cached_tokens": 0
|
| 66 |
},
|
| 67 |
+
"total_tokens": 190
|
| 68 |
},
|
| 69 |
"model": "gpt-4o-2024-11-20"
|
| 70 |
}
|
|
|
|
| 96 |
# Enhanced knowledge graphs demonstrating AgentGraph's complete feature set
|
| 97 |
SAMPLE_KNOWLEDGE_GRAPHS = [
|
| 98 |
{
|
| 99 |
+
"filename": "kg_python_documentation_enhanced.json",
|
| 100 |
"trace_index": 0, # Links to first trace
|
| 101 |
"graph_data": {
|
| 102 |
"system_name": "Python Documentation Assistant",
|