Spaces:
Runtime error
Runtime error
feat: synchronize text-to-sql-bot codebase with Hugging Face Space repository, including Docker build configurations
6086e71 | { | |
| "user_query": "show me top 5 employees", | |
| "conversation_history": [], | |
| "tenant_id": "default", | |
| "user_role": "analyst", | |
| "trace_id": "debug", | |
| "intent": "sql", | |
| "route_intent": "data_query", | |
| "entities": [ | |
| "employees" | |
| ], | |
| "complexity": "simple", | |
| "retrieval_top_k": 3, | |
| "relevant_schema": "TABLE employees (employee_id INT PK, department_id INT, manager_id INT, full_name VARCHAR, role VARCHAR, location VARCHAR, hire_date DATE, base_salary DECIMAL, quota_arr DECIMAL, active TINYINT)\n FK: employees.department_id β departments.department_id", | |
| "relevant_tables": [ | |
| "employees" | |
| ], | |
| "retrieval_source": "rag_top_k:3", | |
| "generated_sql": "SELECT full_name, base_salary, role FROM employees ORDER BY base_salary DESC LIMIT 5;", | |
| "sql_explanation": "Query employees table, sort by base_salary DESC, limit to 5.", | |
| "friendly_message": "The top 5 employees have base salaries ranging from 193,520.00 to 198,704.00, with an average base salary of 196,112.00. The total base salary for these employees is 980,560.00. All of the top 5 employees hold the role of Account Executive.", | |
| "is_valid": true, | |
| "validation_errors": [], | |
| "sanitized_sql": "SELECT full_name, base_salary, role FROM employees ORDER BY base_salary DESC LIMIT 5;", | |
| "retry_count": 0, | |
| "guardrail_warnings": [], | |
| "guardrail_confidence": 1.0, | |
| "query_results": [ | |
| { | |
| "full_name": "Employee 016", | |
| "base_salary": "198704.00", | |
| "role": "Account Executive" | |
| }, | |
| { | |
| "full_name": "Employee 032", | |
| "base_salary": "197408.00", | |
| "role": "Account Executive" | |
| }, | |
| { | |
| "full_name": "Employee 048", | |
| "base_salary": "196112.00", | |
| "role": "Account Executive" | |
| }, | |
| { | |
| "full_name": "Employee 064", | |
| "base_salary": "194816.00", | |
| "role": "Account Executive" | |
| }, | |
| { | |
| "full_name": "Employee 080", | |
| "base_salary": "193520.00", | |
| "role": "Account Executive" | |
| } | |
| ], | |
| "execution_time_ms": 368.55, | |
| "row_count": 5, | |
| "column_names": [ | |
| "full_name", | |
| "base_salary", | |
| "role" | |
| ], | |
| "chart_config": { | |
| "type": "doughnut", | |
| "data": { | |
| "labels": [ | |
| "Employee 016", | |
| "Employee 032", | |
| "Employee 048", | |
| "Employee 064", | |
| "Employee 080" | |
| ], | |
| "datasets": [ | |
| { | |
| "label": "Base Salary", | |
| "data": [ | |
| 198704.0, | |
| 197408.0, | |
| 196112.0, | |
| 194816.0, | |
| 193520.0 | |
| ], | |
| "backgroundColor": [ | |
| "#38bdf8", | |
| "#a855f7", | |
| "#ec4899", | |
| "#22c55e", | |
| "#eab308" | |
| ], | |
| "borderColor": "#1e293b", | |
| "borderWidth": 2 | |
| } | |
| ] | |
| }, | |
| "options": { | |
| "responsive": true, | |
| "maintainAspectRatio": false, | |
| "plugins": { | |
| "legend": { | |
| "position": "bottom", | |
| "labels": { | |
| "color": "#94A3B8" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "chart_type": "doughnut", | |
| "insights": [ | |
| "π **5** records returned", | |
| "**Base Salary**: avg 196,112.00 | min 193,520.00 | max 198,704.00", | |
| "π Upward trend detected in **Base Salary**", | |
| "π·οΈ Most common **full name**: 'Employee 016' (20%)" | |
| ], | |
| "follow_up_questions": [ | |
| "Show the bottom performers instead", | |
| "Visualize this as a chart", | |
| "Export these results" | |
| ] | |
| } |