TabQueryBench commited on
Commit
a355028
·
verified ·
1 Parent(s): d438cdf

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_attempt_1.metadata.json +43 -0
  2. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_attempt_2.metadata.json +43 -0
  3. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_prompt_attempt_1.txt +627 -0
  4. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_prompt_attempt_2.txt +627 -0
  5. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_response_attempt_1.raw.txt +4 -0
  6. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_response_attempt_1.txt +4 -0
  7. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_response_attempt_2.raw.txt +4 -0
  8. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_response_attempt_2.txt +4 -0
  9. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_stderr_attempt_1.txt +0 -0
  10. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_stderr_attempt_2.txt +0 -0
  11. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_attempt_1.metadata.json +43 -0
  12. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_attempt_2.metadata.json +43 -0
  13. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_prompt_attempt_1.txt +624 -0
  14. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_prompt_attempt_2.txt +624 -0
  15. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_response_attempt_1.raw.txt +4 -0
  16. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_response_attempt_1.txt +4 -0
  17. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_response_attempt_2.raw.txt +4 -0
  18. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_response_attempt_2.txt +4 -0
  19. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_stderr_attempt_1.txt +0 -0
  20. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_stderr_attempt_2.txt +0 -0
  21. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_attempt_1.metadata.json +43 -0
  22. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_attempt_2.metadata.json +43 -0
  23. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_prompt_attempt_1.txt +626 -0
  24. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_prompt_attempt_2.txt +626 -0
  25. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_response_attempt_1.raw.txt +4 -0
  26. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_response_attempt_1.txt +4 -0
  27. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_response_attempt_2.raw.txt +4 -0
  28. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_response_attempt_2.txt +4 -0
  29. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_stderr_attempt_1.txt +0 -0
  30. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_stderr_attempt_2.txt +0 -0
  31. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_attempt_1.metadata.json +43 -0
  32. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_attempt_2.metadata.json +43 -0
  33. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_prompt_attempt_1.txt +624 -0
  34. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_prompt_attempt_2.txt +624 -0
  35. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_response_attempt_1.raw.txt +4 -0
  36. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_response_attempt_1.txt +4 -0
  37. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_response_attempt_2.raw.txt +4 -0
  38. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_response_attempt_2.txt +4 -0
  39. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_stderr_attempt_1.txt +0 -0
  40. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_stderr_attempt_2.txt +0 -0
  41. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_attempt_1.metadata.json +43 -0
  42. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_attempt_2.metadata.json +43 -0
  43. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_prompt_attempt_1.txt +624 -0
  44. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_prompt_attempt_2.txt +624 -0
  45. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_response_attempt_1.raw.txt +4 -0
  46. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_response_attempt_1.txt +4 -0
  47. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_response_attempt_2.raw.txt +4 -0
  48. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_response_attempt_2.txt +4 -0
  49. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_stderr_attempt_1.txt +0 -0
  50. Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_stderr_attempt_2.txt +0 -0
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_attempt_1.metadata.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attempt": 1,
3
+ "phase": "sql_generation",
4
+ "command": "codex exec --skip-git-repo-check --disable plugins --sandbox read-only --cd \"/data/jialinzhang/SQLagent\" -m gpt-5.4 --json -",
5
+ "started_at": "2026-05-19T16:24:21.117102+00:00",
6
+ "ended_at": "2026-05-19T16:24:24.747889+00:00",
7
+ "elapsed_ms": 3630.74,
8
+ "returncode": 1,
9
+ "prompt_metrics": {
10
+ "chars": 21823,
11
+ "bytes_utf8": 21823,
12
+ "lines": 627,
13
+ "estimated_tokens": null
14
+ },
15
+ "stdout_metrics": {
16
+ "chars": 281,
17
+ "bytes_utf8": 281,
18
+ "lines": 4,
19
+ "estimated_tokens": null
20
+ },
21
+ "stderr_metrics": {
22
+ "chars": 0,
23
+ "bytes_utf8": 0,
24
+ "lines": 0,
25
+ "estimated_tokens": null
26
+ },
27
+ "parsed_output": {
28
+ "format": "jsonl_events",
29
+ "text_metrics": {
30
+ "chars": 280,
31
+ "bytes_utf8": 280,
32
+ "lines": 4,
33
+ "estimated_tokens": null
34
+ },
35
+ "usage": {}
36
+ },
37
+ "status": "failed",
38
+ "error": "AI CLI command failed with exit code 1: ",
39
+ "prompt_path": "cli/sql_prompt_attempt_1.txt",
40
+ "response_path": "cli/sql_response_attempt_1.txt",
41
+ "raw_response_path": "cli/sql_response_attempt_1.raw.txt",
42
+ "stderr_path": "cli/sql_stderr_attempt_1.txt"
43
+ }
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_attempt_2.metadata.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attempt": 2,
3
+ "phase": "sql_generation",
4
+ "command": "codex exec --skip-git-repo-check --disable plugins --sandbox read-only --cd \"/data/jialinzhang/SQLagent\" -m gpt-5.4 --json -",
5
+ "started_at": "2026-05-19T16:24:25.750808+00:00",
6
+ "ended_at": "2026-05-19T16:24:28.974826+00:00",
7
+ "elapsed_ms": 3223.95,
8
+ "returncode": 1,
9
+ "prompt_metrics": {
10
+ "chars": 21823,
11
+ "bytes_utf8": 21823,
12
+ "lines": 627,
13
+ "estimated_tokens": null
14
+ },
15
+ "stdout_metrics": {
16
+ "chars": 281,
17
+ "bytes_utf8": 281,
18
+ "lines": 4,
19
+ "estimated_tokens": null
20
+ },
21
+ "stderr_metrics": {
22
+ "chars": 0,
23
+ "bytes_utf8": 0,
24
+ "lines": 0,
25
+ "estimated_tokens": null
26
+ },
27
+ "parsed_output": {
28
+ "format": "jsonl_events",
29
+ "text_metrics": {
30
+ "chars": 280,
31
+ "bytes_utf8": 280,
32
+ "lines": 4,
33
+ "estimated_tokens": null
34
+ },
35
+ "usage": {}
36
+ },
37
+ "status": "failed",
38
+ "error": "AI CLI command failed with exit code 1: ",
39
+ "prompt_path": "cli/sql_prompt_attempt_2.txt",
40
+ "response_path": "cli/sql_response_attempt_2.txt",
41
+ "raw_response_path": "cli/sql_response_attempt_2.raw.txt",
42
+ "stderr_path": "cli/sql_stderr_attempt_2.txt"
43
+ }
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_prompt_attempt_1.txt ADDED
@@ -0,0 +1,627 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are generating one SQLite SELECT query for a single-table SQL QA task.
2
+ Return strict JSON only, with this schema: {"sql": "...", "notes": "..."}.
3
+ Rules:
4
+ - Use only the provided table and columns.
5
+ - Do not write INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, PRAGMA, ATTACH, DETACH, or VACUUM.
6
+ - Prefer the planned template and bound roles when provided.
7
+ - Add a leading SQL comment exactly like: -- template_id: <planned_template_id>.
8
+ - Generate SQLite-compatible SQL. SQLite does not support PERCENTILE_CONT or STDDEV.
9
+ - Quote identifiers with double quotes.
10
+ - Return no markdown and no extra prose.
11
+
12
+ Dataset context:
13
+ Dataset context for SQL QA:
14
+ - dataset_id: m2
15
+ - dataset_name: Carinsuranceclaimprediction Classification
16
+ - table_name: m2
17
+ - table_layout: single-table dataset (do not assume joins).
18
+ - row_semantics: One row is one tabular observation with 43 feature columns and target `is_day_night_rear_view_mirror`.
19
+ - task_type: classification
20
+ - target_column: is_day_night_rear_view_mirror
21
+ - main_row_count: 58592
22
+ - important_fields:
23
+ - policy_id: role=feature, type=identifier_string. tags=['identifier', 'probe_exclude', 'high_cardinality_candidate'] desc=Identifier-like field for policy id.
24
+ - policy_tenure: role=feature, type=numeric. tags=['condition_candidate', 'measure', 'high_cardinality_candidate'] desc=Numeric field for policy tenure.
25
+ - age_of_car: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of car.
26
+ - age_of_policyholder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of policyholder.
27
+ - area_cluster: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for area cluster.
28
+ - population_density: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for population density.
29
+ - make: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for make.
30
+ - segment: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for segment.
31
+ - model: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for model.
32
+ - fuel_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for fuel type.
33
+ - max_torque: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max torque.
34
+ - max_power: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max power.
35
+ - engine_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for engine type.
36
+ - airbags: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for airbags.
37
+ - is_esc: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is esc.
38
+ - is_adjustable_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is adjustable steering.
39
+ - is_tpms: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is tpms.
40
+ - is_parking_sensors: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking sensors.
41
+ - is_parking_camera: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking camera.
42
+ - rear_brakes_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for rear brakes type.
43
+ - displacement: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for displacement.
44
+ - cylinder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for cylinder.
45
+ - transmission_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for transmission type.
46
+ - gear_box: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gear box.
47
+ - steering_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for steering type.
48
+ - turning_radius: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for turning radius.
49
+ - length: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for length.
50
+ - width: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for width.
51
+ - height: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for height.
52
+ - gross_weight: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gross weight.
53
+ - is_front_fog_lights: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is front fog lights.
54
+ - is_rear_window_wiper: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window wiper.
55
+ - is_rear_window_washer: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window washer.
56
+ - is_rear_window_defogger: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window defogger.
57
+ - is_brake_assist: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is brake assist.
58
+ - is_power_door_locks: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power door locks.
59
+ - is_central_locking: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is central locking.
60
+ - is_power_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power steering.
61
+ - is_driver_seat_height_adjustable: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is driver seat height adjustable.
62
+ - is_day_night_rear_view_mirror: role=target, type=binary_target. tags=['subgroup_candidate', 'condition_candidate', 'target_candidate'] desc=Target field for is day night rear view mirror.
63
+ - is_ecw: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is ecw.
64
+ - is_speed_alert: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is speed alert.
65
+ - ncap_rating: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for ncap rating.
66
+ - is_claim: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is claim.
67
+ - useful_field_combinations: [['age_of_car', 'age_of_policyholder', 'is_day_night_rear_view_mirror'], ['age_of_car', 'policy_tenure', 'is_day_night_rear_view_mirror'], ['policy_tenure', 'age_of_car', 'is_day_night_rear_view_mirror']]
68
+ - fields_requiring_caution: ['is_day_night_rear_view_mirror', 'policy_tenure']
69
+ - source_url: https://www.kaggle.com/datasets/ifteshanajnin/carinsuranceclaimprediction-classification
70
+
71
+ SQLite schema snapshot:
72
+ {
73
+ "table_name": "m2",
74
+ "quoted_table_name": "\"m2\"",
75
+ "row_count": 58592,
76
+ "columns": [
77
+ {
78
+ "name": "policy_id",
79
+ "type": "TEXT",
80
+ "notnull": false,
81
+ "pk": false
82
+ },
83
+ {
84
+ "name": "policy_tenure",
85
+ "type": "TEXT",
86
+ "notnull": false,
87
+ "pk": false
88
+ },
89
+ {
90
+ "name": "age_of_car",
91
+ "type": "TEXT",
92
+ "notnull": false,
93
+ "pk": false
94
+ },
95
+ {
96
+ "name": "age_of_policyholder",
97
+ "type": "TEXT",
98
+ "notnull": false,
99
+ "pk": false
100
+ },
101
+ {
102
+ "name": "area_cluster",
103
+ "type": "TEXT",
104
+ "notnull": false,
105
+ "pk": false
106
+ },
107
+ {
108
+ "name": "population_density",
109
+ "type": "TEXT",
110
+ "notnull": false,
111
+ "pk": false
112
+ },
113
+ {
114
+ "name": "make",
115
+ "type": "TEXT",
116
+ "notnull": false,
117
+ "pk": false
118
+ },
119
+ {
120
+ "name": "segment",
121
+ "type": "TEXT",
122
+ "notnull": false,
123
+ "pk": false
124
+ },
125
+ {
126
+ "name": "model",
127
+ "type": "TEXT",
128
+ "notnull": false,
129
+ "pk": false
130
+ },
131
+ {
132
+ "name": "fuel_type",
133
+ "type": "TEXT",
134
+ "notnull": false,
135
+ "pk": false
136
+ },
137
+ {
138
+ "name": "max_torque",
139
+ "type": "TEXT",
140
+ "notnull": false,
141
+ "pk": false
142
+ },
143
+ {
144
+ "name": "max_power",
145
+ "type": "TEXT",
146
+ "notnull": false,
147
+ "pk": false
148
+ },
149
+ {
150
+ "name": "engine_type",
151
+ "type": "TEXT",
152
+ "notnull": false,
153
+ "pk": false
154
+ },
155
+ {
156
+ "name": "airbags",
157
+ "type": "TEXT",
158
+ "notnull": false,
159
+ "pk": false
160
+ },
161
+ {
162
+ "name": "is_esc",
163
+ "type": "TEXT",
164
+ "notnull": false,
165
+ "pk": false
166
+ },
167
+ {
168
+ "name": "is_adjustable_steering",
169
+ "type": "TEXT",
170
+ "notnull": false,
171
+ "pk": false
172
+ },
173
+ {
174
+ "name": "is_tpms",
175
+ "type": "TEXT",
176
+ "notnull": false,
177
+ "pk": false
178
+ },
179
+ {
180
+ "name": "is_parking_sensors",
181
+ "type": "TEXT",
182
+ "notnull": false,
183
+ "pk": false
184
+ },
185
+ {
186
+ "name": "is_parking_camera",
187
+ "type": "TEXT",
188
+ "notnull": false,
189
+ "pk": false
190
+ },
191
+ {
192
+ "name": "rear_brakes_type",
193
+ "type": "TEXT",
194
+ "notnull": false,
195
+ "pk": false
196
+ },
197
+ {
198
+ "name": "displacement",
199
+ "type": "TEXT",
200
+ "notnull": false,
201
+ "pk": false
202
+ },
203
+ {
204
+ "name": "cylinder",
205
+ "type": "TEXT",
206
+ "notnull": false,
207
+ "pk": false
208
+ },
209
+ {
210
+ "name": "transmission_type",
211
+ "type": "TEXT",
212
+ "notnull": false,
213
+ "pk": false
214
+ },
215
+ {
216
+ "name": "gear_box",
217
+ "type": "TEXT",
218
+ "notnull": false,
219
+ "pk": false
220
+ },
221
+ {
222
+ "name": "steering_type",
223
+ "type": "TEXT",
224
+ "notnull": false,
225
+ "pk": false
226
+ },
227
+ {
228
+ "name": "turning_radius",
229
+ "type": "TEXT",
230
+ "notnull": false,
231
+ "pk": false
232
+ },
233
+ {
234
+ "name": "length",
235
+ "type": "TEXT",
236
+ "notnull": false,
237
+ "pk": false
238
+ },
239
+ {
240
+ "name": "width",
241
+ "type": "TEXT",
242
+ "notnull": false,
243
+ "pk": false
244
+ },
245
+ {
246
+ "name": "height",
247
+ "type": "TEXT",
248
+ "notnull": false,
249
+ "pk": false
250
+ },
251
+ {
252
+ "name": "gross_weight",
253
+ "type": "TEXT",
254
+ "notnull": false,
255
+ "pk": false
256
+ },
257
+ {
258
+ "name": "is_front_fog_lights",
259
+ "type": "TEXT",
260
+ "notnull": false,
261
+ "pk": false
262
+ },
263
+ {
264
+ "name": "is_rear_window_wiper",
265
+ "type": "TEXT",
266
+ "notnull": false,
267
+ "pk": false
268
+ },
269
+ {
270
+ "name": "is_rear_window_washer",
271
+ "type": "TEXT",
272
+ "notnull": false,
273
+ "pk": false
274
+ },
275
+ {
276
+ "name": "is_rear_window_defogger",
277
+ "type": "TEXT",
278
+ "notnull": false,
279
+ "pk": false
280
+ },
281
+ {
282
+ "name": "is_brake_assist",
283
+ "type": "TEXT",
284
+ "notnull": false,
285
+ "pk": false
286
+ },
287
+ {
288
+ "name": "is_power_door_locks",
289
+ "type": "TEXT",
290
+ "notnull": false,
291
+ "pk": false
292
+ },
293
+ {
294
+ "name": "is_central_locking",
295
+ "type": "TEXT",
296
+ "notnull": false,
297
+ "pk": false
298
+ },
299
+ {
300
+ "name": "is_power_steering",
301
+ "type": "TEXT",
302
+ "notnull": false,
303
+ "pk": false
304
+ },
305
+ {
306
+ "name": "is_driver_seat_height_adjustable",
307
+ "type": "TEXT",
308
+ "notnull": false,
309
+ "pk": false
310
+ },
311
+ {
312
+ "name": "is_day_night_rear_view_mirror",
313
+ "type": "TEXT",
314
+ "notnull": false,
315
+ "pk": false
316
+ },
317
+ {
318
+ "name": "is_ecw",
319
+ "type": "TEXT",
320
+ "notnull": false,
321
+ "pk": false
322
+ },
323
+ {
324
+ "name": "is_speed_alert",
325
+ "type": "TEXT",
326
+ "notnull": false,
327
+ "pk": false
328
+ },
329
+ {
330
+ "name": "ncap_rating",
331
+ "type": "TEXT",
332
+ "notnull": false,
333
+ "pk": false
334
+ },
335
+ {
336
+ "name": "is_claim",
337
+ "type": "TEXT",
338
+ "notnull": false,
339
+ "pk": false
340
+ }
341
+ ],
342
+ "sample_rows": [
343
+ {
344
+ "policy_id": "ID00001",
345
+ "policy_tenure": "0.515873589958172",
346
+ "age_of_car": "0.05",
347
+ "age_of_policyholder": "0.644230769230769",
348
+ "area_cluster": "C1",
349
+ "population_density": "4990",
350
+ "make": "1",
351
+ "segment": "A",
352
+ "model": "M1",
353
+ "fuel_type": "CNG",
354
+ "max_torque": "60Nm@3500rpm",
355
+ "max_power": "40.36bhp@6000rpm",
356
+ "engine_type": "F8D Petrol Engine",
357
+ "airbags": "2",
358
+ "is_esc": "No",
359
+ "is_adjustable_steering": "No",
360
+ "is_tpms": "No",
361
+ "is_parking_sensors": "Yes",
362
+ "is_parking_camera": "No",
363
+ "rear_brakes_type": "Drum",
364
+ "displacement": "796",
365
+ "cylinder": "3",
366
+ "transmission_type": "Manual",
367
+ "gear_box": "5",
368
+ "steering_type": "Power",
369
+ "turning_radius": "4.6",
370
+ "length": "3445",
371
+ "width": "1515",
372
+ "height": "1475",
373
+ "gross_weight": "1185",
374
+ "is_front_fog_lights": "No",
375
+ "is_rear_window_wiper": "No",
376
+ "is_rear_window_washer": "No",
377
+ "is_rear_window_defogger": "No",
378
+ "is_brake_assist": "No",
379
+ "is_power_door_locks": "No",
380
+ "is_central_locking": "No",
381
+ "is_power_steering": "Yes",
382
+ "is_driver_seat_height_adjustable": "No",
383
+ "is_day_night_rear_view_mirror": "No",
384
+ "is_ecw": "No",
385
+ "is_speed_alert": "Yes",
386
+ "ncap_rating": "0",
387
+ "is_claim": "0"
388
+ },
389
+ {
390
+ "policy_id": "ID00002",
391
+ "policy_tenure": "0.672618513547733",
392
+ "age_of_car": "0.02",
393
+ "age_of_policyholder": "0.375",
394
+ "area_cluster": "C2",
395
+ "population_density": "27003",
396
+ "make": "1",
397
+ "segment": "A",
398
+ "model": "M1",
399
+ "fuel_type": "CNG",
400
+ "max_torque": "60Nm@3500rpm",
401
+ "max_power": "40.36bhp@6000rpm",
402
+ "engine_type": "F8D Petrol Engine",
403
+ "airbags": "2",
404
+ "is_esc": "No",
405
+ "is_adjustable_steering": "No",
406
+ "is_tpms": "No",
407
+ "is_parking_sensors": "Yes",
408
+ "is_parking_camera": "No",
409
+ "rear_brakes_type": "Drum",
410
+ "displacement": "796",
411
+ "cylinder": "3",
412
+ "transmission_type": "Manual",
413
+ "gear_box": "5",
414
+ "steering_type": "Power",
415
+ "turning_radius": "4.6",
416
+ "length": "3445",
417
+ "width": "1515",
418
+ "height": "1475",
419
+ "gross_weight": "1185",
420
+ "is_front_fog_lights": "No",
421
+ "is_rear_window_wiper": "No",
422
+ "is_rear_window_washer": "No",
423
+ "is_rear_window_defogger": "No",
424
+ "is_brake_assist": "No",
425
+ "is_power_door_locks": "No",
426
+ "is_central_locking": "No",
427
+ "is_power_steering": "Yes",
428
+ "is_driver_seat_height_adjustable": "No",
429
+ "is_day_night_rear_view_mirror": "No",
430
+ "is_ecw": "No",
431
+ "is_speed_alert": "Yes",
432
+ "ncap_rating": "0",
433
+ "is_claim": "0"
434
+ },
435
+ {
436
+ "policy_id": "ID00003",
437
+ "policy_tenure": "0.841110255796233",
438
+ "age_of_car": "0.02",
439
+ "age_of_policyholder": "0.384615384615385",
440
+ "area_cluster": "C3",
441
+ "population_density": "4076",
442
+ "make": "1",
443
+ "segment": "A",
444
+ "model": "M1",
445
+ "fuel_type": "CNG",
446
+ "max_torque": "60Nm@3500rpm",
447
+ "max_power": "40.36bhp@6000rpm",
448
+ "engine_type": "F8D Petrol Engine",
449
+ "airbags": "2",
450
+ "is_esc": "No",
451
+ "is_adjustable_steering": "No",
452
+ "is_tpms": "No",
453
+ "is_parking_sensors": "Yes",
454
+ "is_parking_camera": "No",
455
+ "rear_brakes_type": "Drum",
456
+ "displacement": "796",
457
+ "cylinder": "3",
458
+ "transmission_type": "Manual",
459
+ "gear_box": "5",
460
+ "steering_type": "Power",
461
+ "turning_radius": "4.6",
462
+ "length": "3445",
463
+ "width": "1515",
464
+ "height": "1475",
465
+ "gross_weight": "1185",
466
+ "is_front_fog_lights": "No",
467
+ "is_rear_window_wiper": "No",
468
+ "is_rear_window_washer": "No",
469
+ "is_rear_window_defogger": "No",
470
+ "is_brake_assist": "No",
471
+ "is_power_door_locks": "No",
472
+ "is_central_locking": "No",
473
+ "is_power_steering": "Yes",
474
+ "is_driver_seat_height_adjustable": "No",
475
+ "is_day_night_rear_view_mirror": "No",
476
+ "is_ecw": "No",
477
+ "is_speed_alert": "Yes",
478
+ "ncap_rating": "0",
479
+ "is_claim": "0"
480
+ },
481
+ {
482
+ "policy_id": "ID00004",
483
+ "policy_tenure": "0.900276558749967",
484
+ "age_of_car": "0.11",
485
+ "age_of_policyholder": "0.432692307692308",
486
+ "area_cluster": "C4",
487
+ "population_density": "21622",
488
+ "make": "1",
489
+ "segment": "C1",
490
+ "model": "M2",
491
+ "fuel_type": "Petrol",
492
+ "max_torque": "113Nm@4400rpm",
493
+ "max_power": "88.50bhp@6000rpm",
494
+ "engine_type": "1.2 L K12N Dualjet",
495
+ "airbags": "2",
496
+ "is_esc": "Yes",
497
+ "is_adjustable_steering": "Yes",
498
+ "is_tpms": "No",
499
+ "is_parking_sensors": "Yes",
500
+ "is_parking_camera": "Yes",
501
+ "rear_brakes_type": "Drum",
502
+ "displacement": "1197",
503
+ "cylinder": "4",
504
+ "transmission_type": "Automatic",
505
+ "gear_box": "5",
506
+ "steering_type": "Electric",
507
+ "turning_radius": "4.8",
508
+ "length": "3995",
509
+ "width": "1735",
510
+ "height": "1515",
511
+ "gross_weight": "1335",
512
+ "is_front_fog_lights": "Yes",
513
+ "is_rear_window_wiper": "No",
514
+ "is_rear_window_washer": "No",
515
+ "is_rear_window_defogger": "Yes",
516
+ "is_brake_assist": "Yes",
517
+ "is_power_door_locks": "Yes",
518
+ "is_central_locking": "Yes",
519
+ "is_power_steering": "Yes",
520
+ "is_driver_seat_height_adjustable": "Yes",
521
+ "is_day_night_rear_view_mirror": "Yes",
522
+ "is_ecw": "Yes",
523
+ "is_speed_alert": "Yes",
524
+ "ncap_rating": "2",
525
+ "is_claim": "0"
526
+ },
527
+ {
528
+ "policy_id": "ID00005",
529
+ "policy_tenure": "0.596402813108729",
530
+ "age_of_car": "0.11",
531
+ "age_of_policyholder": "0.634615384615385",
532
+ "area_cluster": "C5",
533
+ "population_density": "34738",
534
+ "make": "2",
535
+ "segment": "A",
536
+ "model": "M3",
537
+ "fuel_type": "Petrol",
538
+ "max_torque": "91Nm@4250rpm",
539
+ "max_power": "67.06bhp@5500rpm",
540
+ "engine_type": "1.0 SCe",
541
+ "airbags": "2",
542
+ "is_esc": "No",
543
+ "is_adjustable_steering": "No",
544
+ "is_tpms": "No",
545
+ "is_parking_sensors": "No",
546
+ "is_parking_camera": "Yes",
547
+ "rear_brakes_type": "Drum",
548
+ "displacement": "999",
549
+ "cylinder": "3",
550
+ "transmission_type": "Automatic",
551
+ "gear_box": "5",
552
+ "steering_type": "Electric",
553
+ "turning_radius": "5",
554
+ "length": "3731",
555
+ "width": "1579",
556
+ "height": "1490",
557
+ "gross_weight": "1155",
558
+ "is_front_fog_lights": "No",
559
+ "is_rear_window_wiper": "No",
560
+ "is_rear_window_washer": "No",
561
+ "is_rear_window_defogger": "No",
562
+ "is_brake_assist": "No",
563
+ "is_power_door_locks": "Yes",
564
+ "is_central_locking": "Yes",
565
+ "is_power_steering": "Yes",
566
+ "is_driver_seat_height_adjustable": "No",
567
+ "is_day_night_rear_view_mirror": "Yes",
568
+ "is_ecw": "Yes",
569
+ "is_speed_alert": "Yes",
570
+ "ncap_rating": "2",
571
+ "is_claim": "0"
572
+ }
573
+ ]
574
+ }
575
+
576
+ Shortlisted templates:
577
+ [
578
+ {
579
+ "template_id": "tpl_m4_group_condition_rate",
580
+ "template_name": "Grouped Condition Rate",
581
+ "primary_family": "conditional_dependency_structure",
582
+ "portability": "yes",
583
+ "sql_skeleton": "SELECT {group_col},\n AVG(CASE WHEN {condition_col} = {condition_value} THEN 1 ELSE 0 END) AS condition_rate\nFROM {table}\nGROUP BY {group_col}\nORDER BY condition_rate DESC;",
584
+ "required_roles": [
585
+ "group_col",
586
+ "condition_col"
587
+ ]
588
+ }
589
+ ]
590
+
591
+ Problem instance:
592
+ {
593
+ "dataset_id": "m2",
594
+ "question": "Use template Grouped Condition Rate to probe direction_consistency with semantic role within_group_proportion. Focus on group_col=is_parking_sensors, condition_col=is_rear_window_wiper.",
595
+ "planned_template_id": "tpl_m4_group_condition_rate",
596
+ "bindings": {
597
+ "group_col": "is_parking_sensors",
598
+ "condition_col": "is_rear_window_wiper",
599
+ "condition_value": "Yes",
600
+ "positive_value": "No",
601
+ "negative_value": "Yes",
602
+ "top_k": 19,
603
+ "top_n": 7,
604
+ "num_tiles": 10,
605
+ "percentile_value": 0.95,
606
+ "z_threshold": 2.0,
607
+ "fraction_threshold": 0.05,
608
+ "baseline_multiplier": 1.75,
609
+ "baseline_fraction": 0.1,
610
+ "min_group_size": 5,
611
+ "min_support": 4,
612
+ "measure_threshold": 5.0,
613
+ "time_grain": "month",
614
+ "lookback_rows": 3,
615
+ "current_period_start": "'2024-01-01'",
616
+ "current_period_end": "'2024-04-01'",
617
+ "previous_period_start": "'2023-10-01'",
618
+ "previous_period_end": "'2024-01-01'",
619
+ "drift_ratio_threshold": 0.8
620
+ },
621
+ "can_vary": [],
622
+ "must_fix": [],
623
+ "runtime_sql_skeleton": "SELECT {group_col},\n AVG(CASE WHEN {condition_col} = {condition_value} THEN 1 ELSE 0 END) AS condition_rate\nFROM {table}\nGROUP BY {group_col}\nORDER BY condition_rate DESC;"
624
+ }
625
+
626
+ Repair context:
627
+ {}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_prompt_attempt_2.txt ADDED
@@ -0,0 +1,627 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are generating one SQLite SELECT query for a single-table SQL QA task.
2
+ Return strict JSON only, with this schema: {"sql": "...", "notes": "..."}.
3
+ Rules:
4
+ - Use only the provided table and columns.
5
+ - Do not write INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, PRAGMA, ATTACH, DETACH, or VACUUM.
6
+ - Prefer the planned template and bound roles when provided.
7
+ - Add a leading SQL comment exactly like: -- template_id: <planned_template_id>.
8
+ - Generate SQLite-compatible SQL. SQLite does not support PERCENTILE_CONT or STDDEV.
9
+ - Quote identifiers with double quotes.
10
+ - Return no markdown and no extra prose.
11
+
12
+ Dataset context:
13
+ Dataset context for SQL QA:
14
+ - dataset_id: m2
15
+ - dataset_name: Carinsuranceclaimprediction Classification
16
+ - table_name: m2
17
+ - table_layout: single-table dataset (do not assume joins).
18
+ - row_semantics: One row is one tabular observation with 43 feature columns and target `is_day_night_rear_view_mirror`.
19
+ - task_type: classification
20
+ - target_column: is_day_night_rear_view_mirror
21
+ - main_row_count: 58592
22
+ - important_fields:
23
+ - policy_id: role=feature, type=identifier_string. tags=['identifier', 'probe_exclude', 'high_cardinality_candidate'] desc=Identifier-like field for policy id.
24
+ - policy_tenure: role=feature, type=numeric. tags=['condition_candidate', 'measure', 'high_cardinality_candidate'] desc=Numeric field for policy tenure.
25
+ - age_of_car: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of car.
26
+ - age_of_policyholder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of policyholder.
27
+ - area_cluster: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for area cluster.
28
+ - population_density: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for population density.
29
+ - make: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for make.
30
+ - segment: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for segment.
31
+ - model: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for model.
32
+ - fuel_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for fuel type.
33
+ - max_torque: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max torque.
34
+ - max_power: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max power.
35
+ - engine_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for engine type.
36
+ - airbags: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for airbags.
37
+ - is_esc: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is esc.
38
+ - is_adjustable_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is adjustable steering.
39
+ - is_tpms: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is tpms.
40
+ - is_parking_sensors: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking sensors.
41
+ - is_parking_camera: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking camera.
42
+ - rear_brakes_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for rear brakes type.
43
+ - displacement: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for displacement.
44
+ - cylinder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for cylinder.
45
+ - transmission_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for transmission type.
46
+ - gear_box: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gear box.
47
+ - steering_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for steering type.
48
+ - turning_radius: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for turning radius.
49
+ - length: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for length.
50
+ - width: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for width.
51
+ - height: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for height.
52
+ - gross_weight: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gross weight.
53
+ - is_front_fog_lights: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is front fog lights.
54
+ - is_rear_window_wiper: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window wiper.
55
+ - is_rear_window_washer: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window washer.
56
+ - is_rear_window_defogger: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window defogger.
57
+ - is_brake_assist: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is brake assist.
58
+ - is_power_door_locks: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power door locks.
59
+ - is_central_locking: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is central locking.
60
+ - is_power_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power steering.
61
+ - is_driver_seat_height_adjustable: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is driver seat height adjustable.
62
+ - is_day_night_rear_view_mirror: role=target, type=binary_target. tags=['subgroup_candidate', 'condition_candidate', 'target_candidate'] desc=Target field for is day night rear view mirror.
63
+ - is_ecw: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is ecw.
64
+ - is_speed_alert: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is speed alert.
65
+ - ncap_rating: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for ncap rating.
66
+ - is_claim: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is claim.
67
+ - useful_field_combinations: [['age_of_car', 'age_of_policyholder', 'is_day_night_rear_view_mirror'], ['age_of_car', 'policy_tenure', 'is_day_night_rear_view_mirror'], ['policy_tenure', 'age_of_car', 'is_day_night_rear_view_mirror']]
68
+ - fields_requiring_caution: ['is_day_night_rear_view_mirror', 'policy_tenure']
69
+ - source_url: https://www.kaggle.com/datasets/ifteshanajnin/carinsuranceclaimprediction-classification
70
+
71
+ SQLite schema snapshot:
72
+ {
73
+ "table_name": "m2",
74
+ "quoted_table_name": "\"m2\"",
75
+ "row_count": 58592,
76
+ "columns": [
77
+ {
78
+ "name": "policy_id",
79
+ "type": "TEXT",
80
+ "notnull": false,
81
+ "pk": false
82
+ },
83
+ {
84
+ "name": "policy_tenure",
85
+ "type": "TEXT",
86
+ "notnull": false,
87
+ "pk": false
88
+ },
89
+ {
90
+ "name": "age_of_car",
91
+ "type": "TEXT",
92
+ "notnull": false,
93
+ "pk": false
94
+ },
95
+ {
96
+ "name": "age_of_policyholder",
97
+ "type": "TEXT",
98
+ "notnull": false,
99
+ "pk": false
100
+ },
101
+ {
102
+ "name": "area_cluster",
103
+ "type": "TEXT",
104
+ "notnull": false,
105
+ "pk": false
106
+ },
107
+ {
108
+ "name": "population_density",
109
+ "type": "TEXT",
110
+ "notnull": false,
111
+ "pk": false
112
+ },
113
+ {
114
+ "name": "make",
115
+ "type": "TEXT",
116
+ "notnull": false,
117
+ "pk": false
118
+ },
119
+ {
120
+ "name": "segment",
121
+ "type": "TEXT",
122
+ "notnull": false,
123
+ "pk": false
124
+ },
125
+ {
126
+ "name": "model",
127
+ "type": "TEXT",
128
+ "notnull": false,
129
+ "pk": false
130
+ },
131
+ {
132
+ "name": "fuel_type",
133
+ "type": "TEXT",
134
+ "notnull": false,
135
+ "pk": false
136
+ },
137
+ {
138
+ "name": "max_torque",
139
+ "type": "TEXT",
140
+ "notnull": false,
141
+ "pk": false
142
+ },
143
+ {
144
+ "name": "max_power",
145
+ "type": "TEXT",
146
+ "notnull": false,
147
+ "pk": false
148
+ },
149
+ {
150
+ "name": "engine_type",
151
+ "type": "TEXT",
152
+ "notnull": false,
153
+ "pk": false
154
+ },
155
+ {
156
+ "name": "airbags",
157
+ "type": "TEXT",
158
+ "notnull": false,
159
+ "pk": false
160
+ },
161
+ {
162
+ "name": "is_esc",
163
+ "type": "TEXT",
164
+ "notnull": false,
165
+ "pk": false
166
+ },
167
+ {
168
+ "name": "is_adjustable_steering",
169
+ "type": "TEXT",
170
+ "notnull": false,
171
+ "pk": false
172
+ },
173
+ {
174
+ "name": "is_tpms",
175
+ "type": "TEXT",
176
+ "notnull": false,
177
+ "pk": false
178
+ },
179
+ {
180
+ "name": "is_parking_sensors",
181
+ "type": "TEXT",
182
+ "notnull": false,
183
+ "pk": false
184
+ },
185
+ {
186
+ "name": "is_parking_camera",
187
+ "type": "TEXT",
188
+ "notnull": false,
189
+ "pk": false
190
+ },
191
+ {
192
+ "name": "rear_brakes_type",
193
+ "type": "TEXT",
194
+ "notnull": false,
195
+ "pk": false
196
+ },
197
+ {
198
+ "name": "displacement",
199
+ "type": "TEXT",
200
+ "notnull": false,
201
+ "pk": false
202
+ },
203
+ {
204
+ "name": "cylinder",
205
+ "type": "TEXT",
206
+ "notnull": false,
207
+ "pk": false
208
+ },
209
+ {
210
+ "name": "transmission_type",
211
+ "type": "TEXT",
212
+ "notnull": false,
213
+ "pk": false
214
+ },
215
+ {
216
+ "name": "gear_box",
217
+ "type": "TEXT",
218
+ "notnull": false,
219
+ "pk": false
220
+ },
221
+ {
222
+ "name": "steering_type",
223
+ "type": "TEXT",
224
+ "notnull": false,
225
+ "pk": false
226
+ },
227
+ {
228
+ "name": "turning_radius",
229
+ "type": "TEXT",
230
+ "notnull": false,
231
+ "pk": false
232
+ },
233
+ {
234
+ "name": "length",
235
+ "type": "TEXT",
236
+ "notnull": false,
237
+ "pk": false
238
+ },
239
+ {
240
+ "name": "width",
241
+ "type": "TEXT",
242
+ "notnull": false,
243
+ "pk": false
244
+ },
245
+ {
246
+ "name": "height",
247
+ "type": "TEXT",
248
+ "notnull": false,
249
+ "pk": false
250
+ },
251
+ {
252
+ "name": "gross_weight",
253
+ "type": "TEXT",
254
+ "notnull": false,
255
+ "pk": false
256
+ },
257
+ {
258
+ "name": "is_front_fog_lights",
259
+ "type": "TEXT",
260
+ "notnull": false,
261
+ "pk": false
262
+ },
263
+ {
264
+ "name": "is_rear_window_wiper",
265
+ "type": "TEXT",
266
+ "notnull": false,
267
+ "pk": false
268
+ },
269
+ {
270
+ "name": "is_rear_window_washer",
271
+ "type": "TEXT",
272
+ "notnull": false,
273
+ "pk": false
274
+ },
275
+ {
276
+ "name": "is_rear_window_defogger",
277
+ "type": "TEXT",
278
+ "notnull": false,
279
+ "pk": false
280
+ },
281
+ {
282
+ "name": "is_brake_assist",
283
+ "type": "TEXT",
284
+ "notnull": false,
285
+ "pk": false
286
+ },
287
+ {
288
+ "name": "is_power_door_locks",
289
+ "type": "TEXT",
290
+ "notnull": false,
291
+ "pk": false
292
+ },
293
+ {
294
+ "name": "is_central_locking",
295
+ "type": "TEXT",
296
+ "notnull": false,
297
+ "pk": false
298
+ },
299
+ {
300
+ "name": "is_power_steering",
301
+ "type": "TEXT",
302
+ "notnull": false,
303
+ "pk": false
304
+ },
305
+ {
306
+ "name": "is_driver_seat_height_adjustable",
307
+ "type": "TEXT",
308
+ "notnull": false,
309
+ "pk": false
310
+ },
311
+ {
312
+ "name": "is_day_night_rear_view_mirror",
313
+ "type": "TEXT",
314
+ "notnull": false,
315
+ "pk": false
316
+ },
317
+ {
318
+ "name": "is_ecw",
319
+ "type": "TEXT",
320
+ "notnull": false,
321
+ "pk": false
322
+ },
323
+ {
324
+ "name": "is_speed_alert",
325
+ "type": "TEXT",
326
+ "notnull": false,
327
+ "pk": false
328
+ },
329
+ {
330
+ "name": "ncap_rating",
331
+ "type": "TEXT",
332
+ "notnull": false,
333
+ "pk": false
334
+ },
335
+ {
336
+ "name": "is_claim",
337
+ "type": "TEXT",
338
+ "notnull": false,
339
+ "pk": false
340
+ }
341
+ ],
342
+ "sample_rows": [
343
+ {
344
+ "policy_id": "ID00001",
345
+ "policy_tenure": "0.515873589958172",
346
+ "age_of_car": "0.05",
347
+ "age_of_policyholder": "0.644230769230769",
348
+ "area_cluster": "C1",
349
+ "population_density": "4990",
350
+ "make": "1",
351
+ "segment": "A",
352
+ "model": "M1",
353
+ "fuel_type": "CNG",
354
+ "max_torque": "60Nm@3500rpm",
355
+ "max_power": "40.36bhp@6000rpm",
356
+ "engine_type": "F8D Petrol Engine",
357
+ "airbags": "2",
358
+ "is_esc": "No",
359
+ "is_adjustable_steering": "No",
360
+ "is_tpms": "No",
361
+ "is_parking_sensors": "Yes",
362
+ "is_parking_camera": "No",
363
+ "rear_brakes_type": "Drum",
364
+ "displacement": "796",
365
+ "cylinder": "3",
366
+ "transmission_type": "Manual",
367
+ "gear_box": "5",
368
+ "steering_type": "Power",
369
+ "turning_radius": "4.6",
370
+ "length": "3445",
371
+ "width": "1515",
372
+ "height": "1475",
373
+ "gross_weight": "1185",
374
+ "is_front_fog_lights": "No",
375
+ "is_rear_window_wiper": "No",
376
+ "is_rear_window_washer": "No",
377
+ "is_rear_window_defogger": "No",
378
+ "is_brake_assist": "No",
379
+ "is_power_door_locks": "No",
380
+ "is_central_locking": "No",
381
+ "is_power_steering": "Yes",
382
+ "is_driver_seat_height_adjustable": "No",
383
+ "is_day_night_rear_view_mirror": "No",
384
+ "is_ecw": "No",
385
+ "is_speed_alert": "Yes",
386
+ "ncap_rating": "0",
387
+ "is_claim": "0"
388
+ },
389
+ {
390
+ "policy_id": "ID00002",
391
+ "policy_tenure": "0.672618513547733",
392
+ "age_of_car": "0.02",
393
+ "age_of_policyholder": "0.375",
394
+ "area_cluster": "C2",
395
+ "population_density": "27003",
396
+ "make": "1",
397
+ "segment": "A",
398
+ "model": "M1",
399
+ "fuel_type": "CNG",
400
+ "max_torque": "60Nm@3500rpm",
401
+ "max_power": "40.36bhp@6000rpm",
402
+ "engine_type": "F8D Petrol Engine",
403
+ "airbags": "2",
404
+ "is_esc": "No",
405
+ "is_adjustable_steering": "No",
406
+ "is_tpms": "No",
407
+ "is_parking_sensors": "Yes",
408
+ "is_parking_camera": "No",
409
+ "rear_brakes_type": "Drum",
410
+ "displacement": "796",
411
+ "cylinder": "3",
412
+ "transmission_type": "Manual",
413
+ "gear_box": "5",
414
+ "steering_type": "Power",
415
+ "turning_radius": "4.6",
416
+ "length": "3445",
417
+ "width": "1515",
418
+ "height": "1475",
419
+ "gross_weight": "1185",
420
+ "is_front_fog_lights": "No",
421
+ "is_rear_window_wiper": "No",
422
+ "is_rear_window_washer": "No",
423
+ "is_rear_window_defogger": "No",
424
+ "is_brake_assist": "No",
425
+ "is_power_door_locks": "No",
426
+ "is_central_locking": "No",
427
+ "is_power_steering": "Yes",
428
+ "is_driver_seat_height_adjustable": "No",
429
+ "is_day_night_rear_view_mirror": "No",
430
+ "is_ecw": "No",
431
+ "is_speed_alert": "Yes",
432
+ "ncap_rating": "0",
433
+ "is_claim": "0"
434
+ },
435
+ {
436
+ "policy_id": "ID00003",
437
+ "policy_tenure": "0.841110255796233",
438
+ "age_of_car": "0.02",
439
+ "age_of_policyholder": "0.384615384615385",
440
+ "area_cluster": "C3",
441
+ "population_density": "4076",
442
+ "make": "1",
443
+ "segment": "A",
444
+ "model": "M1",
445
+ "fuel_type": "CNG",
446
+ "max_torque": "60Nm@3500rpm",
447
+ "max_power": "40.36bhp@6000rpm",
448
+ "engine_type": "F8D Petrol Engine",
449
+ "airbags": "2",
450
+ "is_esc": "No",
451
+ "is_adjustable_steering": "No",
452
+ "is_tpms": "No",
453
+ "is_parking_sensors": "Yes",
454
+ "is_parking_camera": "No",
455
+ "rear_brakes_type": "Drum",
456
+ "displacement": "796",
457
+ "cylinder": "3",
458
+ "transmission_type": "Manual",
459
+ "gear_box": "5",
460
+ "steering_type": "Power",
461
+ "turning_radius": "4.6",
462
+ "length": "3445",
463
+ "width": "1515",
464
+ "height": "1475",
465
+ "gross_weight": "1185",
466
+ "is_front_fog_lights": "No",
467
+ "is_rear_window_wiper": "No",
468
+ "is_rear_window_washer": "No",
469
+ "is_rear_window_defogger": "No",
470
+ "is_brake_assist": "No",
471
+ "is_power_door_locks": "No",
472
+ "is_central_locking": "No",
473
+ "is_power_steering": "Yes",
474
+ "is_driver_seat_height_adjustable": "No",
475
+ "is_day_night_rear_view_mirror": "No",
476
+ "is_ecw": "No",
477
+ "is_speed_alert": "Yes",
478
+ "ncap_rating": "0",
479
+ "is_claim": "0"
480
+ },
481
+ {
482
+ "policy_id": "ID00004",
483
+ "policy_tenure": "0.900276558749967",
484
+ "age_of_car": "0.11",
485
+ "age_of_policyholder": "0.432692307692308",
486
+ "area_cluster": "C4",
487
+ "population_density": "21622",
488
+ "make": "1",
489
+ "segment": "C1",
490
+ "model": "M2",
491
+ "fuel_type": "Petrol",
492
+ "max_torque": "113Nm@4400rpm",
493
+ "max_power": "88.50bhp@6000rpm",
494
+ "engine_type": "1.2 L K12N Dualjet",
495
+ "airbags": "2",
496
+ "is_esc": "Yes",
497
+ "is_adjustable_steering": "Yes",
498
+ "is_tpms": "No",
499
+ "is_parking_sensors": "Yes",
500
+ "is_parking_camera": "Yes",
501
+ "rear_brakes_type": "Drum",
502
+ "displacement": "1197",
503
+ "cylinder": "4",
504
+ "transmission_type": "Automatic",
505
+ "gear_box": "5",
506
+ "steering_type": "Electric",
507
+ "turning_radius": "4.8",
508
+ "length": "3995",
509
+ "width": "1735",
510
+ "height": "1515",
511
+ "gross_weight": "1335",
512
+ "is_front_fog_lights": "Yes",
513
+ "is_rear_window_wiper": "No",
514
+ "is_rear_window_washer": "No",
515
+ "is_rear_window_defogger": "Yes",
516
+ "is_brake_assist": "Yes",
517
+ "is_power_door_locks": "Yes",
518
+ "is_central_locking": "Yes",
519
+ "is_power_steering": "Yes",
520
+ "is_driver_seat_height_adjustable": "Yes",
521
+ "is_day_night_rear_view_mirror": "Yes",
522
+ "is_ecw": "Yes",
523
+ "is_speed_alert": "Yes",
524
+ "ncap_rating": "2",
525
+ "is_claim": "0"
526
+ },
527
+ {
528
+ "policy_id": "ID00005",
529
+ "policy_tenure": "0.596402813108729",
530
+ "age_of_car": "0.11",
531
+ "age_of_policyholder": "0.634615384615385",
532
+ "area_cluster": "C5",
533
+ "population_density": "34738",
534
+ "make": "2",
535
+ "segment": "A",
536
+ "model": "M3",
537
+ "fuel_type": "Petrol",
538
+ "max_torque": "91Nm@4250rpm",
539
+ "max_power": "67.06bhp@5500rpm",
540
+ "engine_type": "1.0 SCe",
541
+ "airbags": "2",
542
+ "is_esc": "No",
543
+ "is_adjustable_steering": "No",
544
+ "is_tpms": "No",
545
+ "is_parking_sensors": "No",
546
+ "is_parking_camera": "Yes",
547
+ "rear_brakes_type": "Drum",
548
+ "displacement": "999",
549
+ "cylinder": "3",
550
+ "transmission_type": "Automatic",
551
+ "gear_box": "5",
552
+ "steering_type": "Electric",
553
+ "turning_radius": "5",
554
+ "length": "3731",
555
+ "width": "1579",
556
+ "height": "1490",
557
+ "gross_weight": "1155",
558
+ "is_front_fog_lights": "No",
559
+ "is_rear_window_wiper": "No",
560
+ "is_rear_window_washer": "No",
561
+ "is_rear_window_defogger": "No",
562
+ "is_brake_assist": "No",
563
+ "is_power_door_locks": "Yes",
564
+ "is_central_locking": "Yes",
565
+ "is_power_steering": "Yes",
566
+ "is_driver_seat_height_adjustable": "No",
567
+ "is_day_night_rear_view_mirror": "Yes",
568
+ "is_ecw": "Yes",
569
+ "is_speed_alert": "Yes",
570
+ "ncap_rating": "2",
571
+ "is_claim": "0"
572
+ }
573
+ ]
574
+ }
575
+
576
+ Shortlisted templates:
577
+ [
578
+ {
579
+ "template_id": "tpl_m4_group_condition_rate",
580
+ "template_name": "Grouped Condition Rate",
581
+ "primary_family": "conditional_dependency_structure",
582
+ "portability": "yes",
583
+ "sql_skeleton": "SELECT {group_col},\n AVG(CASE WHEN {condition_col} = {condition_value} THEN 1 ELSE 0 END) AS condition_rate\nFROM {table}\nGROUP BY {group_col}\nORDER BY condition_rate DESC;",
584
+ "required_roles": [
585
+ "group_col",
586
+ "condition_col"
587
+ ]
588
+ }
589
+ ]
590
+
591
+ Problem instance:
592
+ {
593
+ "dataset_id": "m2",
594
+ "question": "Use template Grouped Condition Rate to probe direction_consistency with semantic role within_group_proportion. Focus on group_col=is_parking_sensors, condition_col=is_rear_window_wiper.",
595
+ "planned_template_id": "tpl_m4_group_condition_rate",
596
+ "bindings": {
597
+ "group_col": "is_parking_sensors",
598
+ "condition_col": "is_rear_window_wiper",
599
+ "condition_value": "Yes",
600
+ "positive_value": "No",
601
+ "negative_value": "Yes",
602
+ "top_k": 19,
603
+ "top_n": 7,
604
+ "num_tiles": 10,
605
+ "percentile_value": 0.95,
606
+ "z_threshold": 2.0,
607
+ "fraction_threshold": 0.05,
608
+ "baseline_multiplier": 1.75,
609
+ "baseline_fraction": 0.1,
610
+ "min_group_size": 5,
611
+ "min_support": 4,
612
+ "measure_threshold": 5.0,
613
+ "time_grain": "month",
614
+ "lookback_rows": 3,
615
+ "current_period_start": "'2024-01-01'",
616
+ "current_period_end": "'2024-04-01'",
617
+ "previous_period_start": "'2023-10-01'",
618
+ "previous_period_end": "'2024-01-01'",
619
+ "drift_ratio_threshold": 0.8
620
+ },
621
+ "can_vary": [],
622
+ "must_fix": [],
623
+ "runtime_sql_skeleton": "SELECT {group_col},\n AVG(CASE WHEN {condition_col} = {condition_value} THEN 1 ELSE 0 END) AS condition_rate\nFROM {table}\nGROUP BY {group_col}\nORDER BY condition_rate DESC;"
624
+ }
625
+
626
+ Repair context:
627
+ {}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_response_attempt_1.raw.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e410d-74e9-77b0-ab36-514ad89a1810"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_response_attempt_1.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e410d-74e9-77b0-ab36-514ad89a1810"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_response_attempt_2.raw.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e410d-873a-74e1-8890-c5ec882b5dfb"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_response_attempt_2.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e410d-873a-74e1-8890-c5ec882b5dfb"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_stderr_attempt_1.txt ADDED
File without changes
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_0516f68e28c29ebe/cli/sql_stderr_attempt_2.txt ADDED
File without changes
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_attempt_1.metadata.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attempt": 1,
3
+ "phase": "sql_generation",
4
+ "command": "codex exec --skip-git-repo-check --disable plugins --sandbox read-only --cd \"/data/jialinzhang/SQLagent\" -m gpt-5.4 --json -",
5
+ "started_at": "2026-05-19T16:18:42.333599+00:00",
6
+ "ended_at": "2026-05-19T16:18:45.621079+00:00",
7
+ "elapsed_ms": 3287.45,
8
+ "returncode": 1,
9
+ "prompt_metrics": {
10
+ "chars": 22157,
11
+ "bytes_utf8": 22157,
12
+ "lines": 624,
13
+ "estimated_tokens": null
14
+ },
15
+ "stdout_metrics": {
16
+ "chars": 281,
17
+ "bytes_utf8": 281,
18
+ "lines": 4,
19
+ "estimated_tokens": null
20
+ },
21
+ "stderr_metrics": {
22
+ "chars": 0,
23
+ "bytes_utf8": 0,
24
+ "lines": 0,
25
+ "estimated_tokens": null
26
+ },
27
+ "parsed_output": {
28
+ "format": "jsonl_events",
29
+ "text_metrics": {
30
+ "chars": 280,
31
+ "bytes_utf8": 280,
32
+ "lines": 4,
33
+ "estimated_tokens": null
34
+ },
35
+ "usage": {}
36
+ },
37
+ "status": "failed",
38
+ "error": "AI CLI command failed with exit code 1: ",
39
+ "prompt_path": "cli/sql_prompt_attempt_1.txt",
40
+ "response_path": "cli/sql_response_attempt_1.txt",
41
+ "raw_response_path": "cli/sql_response_attempt_1.raw.txt",
42
+ "stderr_path": "cli/sql_stderr_attempt_1.txt"
43
+ }
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_attempt_2.metadata.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attempt": 2,
3
+ "phase": "sql_generation",
4
+ "command": "codex exec --skip-git-repo-check --disable plugins --sandbox read-only --cd \"/data/jialinzhang/SQLagent\" -m gpt-5.4 --json -",
5
+ "started_at": "2026-05-19T16:18:46.623795+00:00",
6
+ "ended_at": "2026-05-19T16:18:49.841231+00:00",
7
+ "elapsed_ms": 3217.38,
8
+ "returncode": 1,
9
+ "prompt_metrics": {
10
+ "chars": 22157,
11
+ "bytes_utf8": 22157,
12
+ "lines": 624,
13
+ "estimated_tokens": null
14
+ },
15
+ "stdout_metrics": {
16
+ "chars": 281,
17
+ "bytes_utf8": 281,
18
+ "lines": 4,
19
+ "estimated_tokens": null
20
+ },
21
+ "stderr_metrics": {
22
+ "chars": 0,
23
+ "bytes_utf8": 0,
24
+ "lines": 0,
25
+ "estimated_tokens": null
26
+ },
27
+ "parsed_output": {
28
+ "format": "jsonl_events",
29
+ "text_metrics": {
30
+ "chars": 280,
31
+ "bytes_utf8": 280,
32
+ "lines": 4,
33
+ "estimated_tokens": null
34
+ },
35
+ "usage": {}
36
+ },
37
+ "status": "failed",
38
+ "error": "AI CLI command failed with exit code 1: ",
39
+ "prompt_path": "cli/sql_prompt_attempt_2.txt",
40
+ "response_path": "cli/sql_response_attempt_2.txt",
41
+ "raw_response_path": "cli/sql_response_attempt_2.raw.txt",
42
+ "stderr_path": "cli/sql_stderr_attempt_2.txt"
43
+ }
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_prompt_attempt_1.txt ADDED
@@ -0,0 +1,624 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are generating one SQLite SELECT query for a single-table SQL QA task.
2
+ Return strict JSON only, with this schema: {"sql": "...", "notes": "..."}.
3
+ Rules:
4
+ - Use only the provided table and columns.
5
+ - Do not write INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, PRAGMA, ATTACH, DETACH, or VACUUM.
6
+ - Prefer the planned template and bound roles when provided.
7
+ - Add a leading SQL comment exactly like: -- template_id: <planned_template_id>.
8
+ - Generate SQLite-compatible SQL. SQLite does not support PERCENTILE_CONT or STDDEV.
9
+ - Quote identifiers with double quotes.
10
+ - Return no markdown and no extra prose.
11
+
12
+ Dataset context:
13
+ Dataset context for SQL QA:
14
+ - dataset_id: m2
15
+ - dataset_name: Carinsuranceclaimprediction Classification
16
+ - table_name: m2
17
+ - table_layout: single-table dataset (do not assume joins).
18
+ - row_semantics: One row is one tabular observation with 43 feature columns and target `is_day_night_rear_view_mirror`.
19
+ - task_type: classification
20
+ - target_column: is_day_night_rear_view_mirror
21
+ - main_row_count: 58592
22
+ - important_fields:
23
+ - policy_id: role=feature, type=identifier_string. tags=['identifier', 'probe_exclude', 'high_cardinality_candidate'] desc=Identifier-like field for policy id.
24
+ - policy_tenure: role=feature, type=numeric. tags=['condition_candidate', 'measure', 'high_cardinality_candidate'] desc=Numeric field for policy tenure.
25
+ - age_of_car: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of car.
26
+ - age_of_policyholder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of policyholder.
27
+ - area_cluster: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for area cluster.
28
+ - population_density: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for population density.
29
+ - make: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for make.
30
+ - segment: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for segment.
31
+ - model: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for model.
32
+ - fuel_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for fuel type.
33
+ - max_torque: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max torque.
34
+ - max_power: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max power.
35
+ - engine_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for engine type.
36
+ - airbags: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for airbags.
37
+ - is_esc: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is esc.
38
+ - is_adjustable_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is adjustable steering.
39
+ - is_tpms: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is tpms.
40
+ - is_parking_sensors: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking sensors.
41
+ - is_parking_camera: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking camera.
42
+ - rear_brakes_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for rear brakes type.
43
+ - displacement: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for displacement.
44
+ - cylinder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for cylinder.
45
+ - transmission_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for transmission type.
46
+ - gear_box: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gear box.
47
+ - steering_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for steering type.
48
+ - turning_radius: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for turning radius.
49
+ - length: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for length.
50
+ - width: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for width.
51
+ - height: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for height.
52
+ - gross_weight: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gross weight.
53
+ - is_front_fog_lights: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is front fog lights.
54
+ - is_rear_window_wiper: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window wiper.
55
+ - is_rear_window_washer: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window washer.
56
+ - is_rear_window_defogger: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window defogger.
57
+ - is_brake_assist: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is brake assist.
58
+ - is_power_door_locks: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power door locks.
59
+ - is_central_locking: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is central locking.
60
+ - is_power_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power steering.
61
+ - is_driver_seat_height_adjustable: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is driver seat height adjustable.
62
+ - is_day_night_rear_view_mirror: role=target, type=binary_target. tags=['subgroup_candidate', 'condition_candidate', 'target_candidate'] desc=Target field for is day night rear view mirror.
63
+ - is_ecw: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is ecw.
64
+ - is_speed_alert: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is speed alert.
65
+ - ncap_rating: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for ncap rating.
66
+ - is_claim: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is claim.
67
+ - useful_field_combinations: [['age_of_car', 'age_of_policyholder', 'is_day_night_rear_view_mirror'], ['age_of_car', 'policy_tenure', 'is_day_night_rear_view_mirror'], ['policy_tenure', 'age_of_car', 'is_day_night_rear_view_mirror']]
68
+ - fields_requiring_caution: ['is_day_night_rear_view_mirror', 'policy_tenure']
69
+ - source_url: https://www.kaggle.com/datasets/ifteshanajnin/carinsuranceclaimprediction-classification
70
+
71
+ SQLite schema snapshot:
72
+ {
73
+ "table_name": "m2",
74
+ "quoted_table_name": "\"m2\"",
75
+ "row_count": 58592,
76
+ "columns": [
77
+ {
78
+ "name": "policy_id",
79
+ "type": "TEXT",
80
+ "notnull": false,
81
+ "pk": false
82
+ },
83
+ {
84
+ "name": "policy_tenure",
85
+ "type": "TEXT",
86
+ "notnull": false,
87
+ "pk": false
88
+ },
89
+ {
90
+ "name": "age_of_car",
91
+ "type": "TEXT",
92
+ "notnull": false,
93
+ "pk": false
94
+ },
95
+ {
96
+ "name": "age_of_policyholder",
97
+ "type": "TEXT",
98
+ "notnull": false,
99
+ "pk": false
100
+ },
101
+ {
102
+ "name": "area_cluster",
103
+ "type": "TEXT",
104
+ "notnull": false,
105
+ "pk": false
106
+ },
107
+ {
108
+ "name": "population_density",
109
+ "type": "TEXT",
110
+ "notnull": false,
111
+ "pk": false
112
+ },
113
+ {
114
+ "name": "make",
115
+ "type": "TEXT",
116
+ "notnull": false,
117
+ "pk": false
118
+ },
119
+ {
120
+ "name": "segment",
121
+ "type": "TEXT",
122
+ "notnull": false,
123
+ "pk": false
124
+ },
125
+ {
126
+ "name": "model",
127
+ "type": "TEXT",
128
+ "notnull": false,
129
+ "pk": false
130
+ },
131
+ {
132
+ "name": "fuel_type",
133
+ "type": "TEXT",
134
+ "notnull": false,
135
+ "pk": false
136
+ },
137
+ {
138
+ "name": "max_torque",
139
+ "type": "TEXT",
140
+ "notnull": false,
141
+ "pk": false
142
+ },
143
+ {
144
+ "name": "max_power",
145
+ "type": "TEXT",
146
+ "notnull": false,
147
+ "pk": false
148
+ },
149
+ {
150
+ "name": "engine_type",
151
+ "type": "TEXT",
152
+ "notnull": false,
153
+ "pk": false
154
+ },
155
+ {
156
+ "name": "airbags",
157
+ "type": "TEXT",
158
+ "notnull": false,
159
+ "pk": false
160
+ },
161
+ {
162
+ "name": "is_esc",
163
+ "type": "TEXT",
164
+ "notnull": false,
165
+ "pk": false
166
+ },
167
+ {
168
+ "name": "is_adjustable_steering",
169
+ "type": "TEXT",
170
+ "notnull": false,
171
+ "pk": false
172
+ },
173
+ {
174
+ "name": "is_tpms",
175
+ "type": "TEXT",
176
+ "notnull": false,
177
+ "pk": false
178
+ },
179
+ {
180
+ "name": "is_parking_sensors",
181
+ "type": "TEXT",
182
+ "notnull": false,
183
+ "pk": false
184
+ },
185
+ {
186
+ "name": "is_parking_camera",
187
+ "type": "TEXT",
188
+ "notnull": false,
189
+ "pk": false
190
+ },
191
+ {
192
+ "name": "rear_brakes_type",
193
+ "type": "TEXT",
194
+ "notnull": false,
195
+ "pk": false
196
+ },
197
+ {
198
+ "name": "displacement",
199
+ "type": "TEXT",
200
+ "notnull": false,
201
+ "pk": false
202
+ },
203
+ {
204
+ "name": "cylinder",
205
+ "type": "TEXT",
206
+ "notnull": false,
207
+ "pk": false
208
+ },
209
+ {
210
+ "name": "transmission_type",
211
+ "type": "TEXT",
212
+ "notnull": false,
213
+ "pk": false
214
+ },
215
+ {
216
+ "name": "gear_box",
217
+ "type": "TEXT",
218
+ "notnull": false,
219
+ "pk": false
220
+ },
221
+ {
222
+ "name": "steering_type",
223
+ "type": "TEXT",
224
+ "notnull": false,
225
+ "pk": false
226
+ },
227
+ {
228
+ "name": "turning_radius",
229
+ "type": "TEXT",
230
+ "notnull": false,
231
+ "pk": false
232
+ },
233
+ {
234
+ "name": "length",
235
+ "type": "TEXT",
236
+ "notnull": false,
237
+ "pk": false
238
+ },
239
+ {
240
+ "name": "width",
241
+ "type": "TEXT",
242
+ "notnull": false,
243
+ "pk": false
244
+ },
245
+ {
246
+ "name": "height",
247
+ "type": "TEXT",
248
+ "notnull": false,
249
+ "pk": false
250
+ },
251
+ {
252
+ "name": "gross_weight",
253
+ "type": "TEXT",
254
+ "notnull": false,
255
+ "pk": false
256
+ },
257
+ {
258
+ "name": "is_front_fog_lights",
259
+ "type": "TEXT",
260
+ "notnull": false,
261
+ "pk": false
262
+ },
263
+ {
264
+ "name": "is_rear_window_wiper",
265
+ "type": "TEXT",
266
+ "notnull": false,
267
+ "pk": false
268
+ },
269
+ {
270
+ "name": "is_rear_window_washer",
271
+ "type": "TEXT",
272
+ "notnull": false,
273
+ "pk": false
274
+ },
275
+ {
276
+ "name": "is_rear_window_defogger",
277
+ "type": "TEXT",
278
+ "notnull": false,
279
+ "pk": false
280
+ },
281
+ {
282
+ "name": "is_brake_assist",
283
+ "type": "TEXT",
284
+ "notnull": false,
285
+ "pk": false
286
+ },
287
+ {
288
+ "name": "is_power_door_locks",
289
+ "type": "TEXT",
290
+ "notnull": false,
291
+ "pk": false
292
+ },
293
+ {
294
+ "name": "is_central_locking",
295
+ "type": "TEXT",
296
+ "notnull": false,
297
+ "pk": false
298
+ },
299
+ {
300
+ "name": "is_power_steering",
301
+ "type": "TEXT",
302
+ "notnull": false,
303
+ "pk": false
304
+ },
305
+ {
306
+ "name": "is_driver_seat_height_adjustable",
307
+ "type": "TEXT",
308
+ "notnull": false,
309
+ "pk": false
310
+ },
311
+ {
312
+ "name": "is_day_night_rear_view_mirror",
313
+ "type": "TEXT",
314
+ "notnull": false,
315
+ "pk": false
316
+ },
317
+ {
318
+ "name": "is_ecw",
319
+ "type": "TEXT",
320
+ "notnull": false,
321
+ "pk": false
322
+ },
323
+ {
324
+ "name": "is_speed_alert",
325
+ "type": "TEXT",
326
+ "notnull": false,
327
+ "pk": false
328
+ },
329
+ {
330
+ "name": "ncap_rating",
331
+ "type": "TEXT",
332
+ "notnull": false,
333
+ "pk": false
334
+ },
335
+ {
336
+ "name": "is_claim",
337
+ "type": "TEXT",
338
+ "notnull": false,
339
+ "pk": false
340
+ }
341
+ ],
342
+ "sample_rows": [
343
+ {
344
+ "policy_id": "ID00001",
345
+ "policy_tenure": "0.515873589958172",
346
+ "age_of_car": "0.05",
347
+ "age_of_policyholder": "0.644230769230769",
348
+ "area_cluster": "C1",
349
+ "population_density": "4990",
350
+ "make": "1",
351
+ "segment": "A",
352
+ "model": "M1",
353
+ "fuel_type": "CNG",
354
+ "max_torque": "60Nm@3500rpm",
355
+ "max_power": "40.36bhp@6000rpm",
356
+ "engine_type": "F8D Petrol Engine",
357
+ "airbags": "2",
358
+ "is_esc": "No",
359
+ "is_adjustable_steering": "No",
360
+ "is_tpms": "No",
361
+ "is_parking_sensors": "Yes",
362
+ "is_parking_camera": "No",
363
+ "rear_brakes_type": "Drum",
364
+ "displacement": "796",
365
+ "cylinder": "3",
366
+ "transmission_type": "Manual",
367
+ "gear_box": "5",
368
+ "steering_type": "Power",
369
+ "turning_radius": "4.6",
370
+ "length": "3445",
371
+ "width": "1515",
372
+ "height": "1475",
373
+ "gross_weight": "1185",
374
+ "is_front_fog_lights": "No",
375
+ "is_rear_window_wiper": "No",
376
+ "is_rear_window_washer": "No",
377
+ "is_rear_window_defogger": "No",
378
+ "is_brake_assist": "No",
379
+ "is_power_door_locks": "No",
380
+ "is_central_locking": "No",
381
+ "is_power_steering": "Yes",
382
+ "is_driver_seat_height_adjustable": "No",
383
+ "is_day_night_rear_view_mirror": "No",
384
+ "is_ecw": "No",
385
+ "is_speed_alert": "Yes",
386
+ "ncap_rating": "0",
387
+ "is_claim": "0"
388
+ },
389
+ {
390
+ "policy_id": "ID00002",
391
+ "policy_tenure": "0.672618513547733",
392
+ "age_of_car": "0.02",
393
+ "age_of_policyholder": "0.375",
394
+ "area_cluster": "C2",
395
+ "population_density": "27003",
396
+ "make": "1",
397
+ "segment": "A",
398
+ "model": "M1",
399
+ "fuel_type": "CNG",
400
+ "max_torque": "60Nm@3500rpm",
401
+ "max_power": "40.36bhp@6000rpm",
402
+ "engine_type": "F8D Petrol Engine",
403
+ "airbags": "2",
404
+ "is_esc": "No",
405
+ "is_adjustable_steering": "No",
406
+ "is_tpms": "No",
407
+ "is_parking_sensors": "Yes",
408
+ "is_parking_camera": "No",
409
+ "rear_brakes_type": "Drum",
410
+ "displacement": "796",
411
+ "cylinder": "3",
412
+ "transmission_type": "Manual",
413
+ "gear_box": "5",
414
+ "steering_type": "Power",
415
+ "turning_radius": "4.6",
416
+ "length": "3445",
417
+ "width": "1515",
418
+ "height": "1475",
419
+ "gross_weight": "1185",
420
+ "is_front_fog_lights": "No",
421
+ "is_rear_window_wiper": "No",
422
+ "is_rear_window_washer": "No",
423
+ "is_rear_window_defogger": "No",
424
+ "is_brake_assist": "No",
425
+ "is_power_door_locks": "No",
426
+ "is_central_locking": "No",
427
+ "is_power_steering": "Yes",
428
+ "is_driver_seat_height_adjustable": "No",
429
+ "is_day_night_rear_view_mirror": "No",
430
+ "is_ecw": "No",
431
+ "is_speed_alert": "Yes",
432
+ "ncap_rating": "0",
433
+ "is_claim": "0"
434
+ },
435
+ {
436
+ "policy_id": "ID00003",
437
+ "policy_tenure": "0.841110255796233",
438
+ "age_of_car": "0.02",
439
+ "age_of_policyholder": "0.384615384615385",
440
+ "area_cluster": "C3",
441
+ "population_density": "4076",
442
+ "make": "1",
443
+ "segment": "A",
444
+ "model": "M1",
445
+ "fuel_type": "CNG",
446
+ "max_torque": "60Nm@3500rpm",
447
+ "max_power": "40.36bhp@6000rpm",
448
+ "engine_type": "F8D Petrol Engine",
449
+ "airbags": "2",
450
+ "is_esc": "No",
451
+ "is_adjustable_steering": "No",
452
+ "is_tpms": "No",
453
+ "is_parking_sensors": "Yes",
454
+ "is_parking_camera": "No",
455
+ "rear_brakes_type": "Drum",
456
+ "displacement": "796",
457
+ "cylinder": "3",
458
+ "transmission_type": "Manual",
459
+ "gear_box": "5",
460
+ "steering_type": "Power",
461
+ "turning_radius": "4.6",
462
+ "length": "3445",
463
+ "width": "1515",
464
+ "height": "1475",
465
+ "gross_weight": "1185",
466
+ "is_front_fog_lights": "No",
467
+ "is_rear_window_wiper": "No",
468
+ "is_rear_window_washer": "No",
469
+ "is_rear_window_defogger": "No",
470
+ "is_brake_assist": "No",
471
+ "is_power_door_locks": "No",
472
+ "is_central_locking": "No",
473
+ "is_power_steering": "Yes",
474
+ "is_driver_seat_height_adjustable": "No",
475
+ "is_day_night_rear_view_mirror": "No",
476
+ "is_ecw": "No",
477
+ "is_speed_alert": "Yes",
478
+ "ncap_rating": "0",
479
+ "is_claim": "0"
480
+ },
481
+ {
482
+ "policy_id": "ID00004",
483
+ "policy_tenure": "0.900276558749967",
484
+ "age_of_car": "0.11",
485
+ "age_of_policyholder": "0.432692307692308",
486
+ "area_cluster": "C4",
487
+ "population_density": "21622",
488
+ "make": "1",
489
+ "segment": "C1",
490
+ "model": "M2",
491
+ "fuel_type": "Petrol",
492
+ "max_torque": "113Nm@4400rpm",
493
+ "max_power": "88.50bhp@6000rpm",
494
+ "engine_type": "1.2 L K12N Dualjet",
495
+ "airbags": "2",
496
+ "is_esc": "Yes",
497
+ "is_adjustable_steering": "Yes",
498
+ "is_tpms": "No",
499
+ "is_parking_sensors": "Yes",
500
+ "is_parking_camera": "Yes",
501
+ "rear_brakes_type": "Drum",
502
+ "displacement": "1197",
503
+ "cylinder": "4",
504
+ "transmission_type": "Automatic",
505
+ "gear_box": "5",
506
+ "steering_type": "Electric",
507
+ "turning_radius": "4.8",
508
+ "length": "3995",
509
+ "width": "1735",
510
+ "height": "1515",
511
+ "gross_weight": "1335",
512
+ "is_front_fog_lights": "Yes",
513
+ "is_rear_window_wiper": "No",
514
+ "is_rear_window_washer": "No",
515
+ "is_rear_window_defogger": "Yes",
516
+ "is_brake_assist": "Yes",
517
+ "is_power_door_locks": "Yes",
518
+ "is_central_locking": "Yes",
519
+ "is_power_steering": "Yes",
520
+ "is_driver_seat_height_adjustable": "Yes",
521
+ "is_day_night_rear_view_mirror": "Yes",
522
+ "is_ecw": "Yes",
523
+ "is_speed_alert": "Yes",
524
+ "ncap_rating": "2",
525
+ "is_claim": "0"
526
+ },
527
+ {
528
+ "policy_id": "ID00005",
529
+ "policy_tenure": "0.596402813108729",
530
+ "age_of_car": "0.11",
531
+ "age_of_policyholder": "0.634615384615385",
532
+ "area_cluster": "C5",
533
+ "population_density": "34738",
534
+ "make": "2",
535
+ "segment": "A",
536
+ "model": "M3",
537
+ "fuel_type": "Petrol",
538
+ "max_torque": "91Nm@4250rpm",
539
+ "max_power": "67.06bhp@5500rpm",
540
+ "engine_type": "1.0 SCe",
541
+ "airbags": "2",
542
+ "is_esc": "No",
543
+ "is_adjustable_steering": "No",
544
+ "is_tpms": "No",
545
+ "is_parking_sensors": "No",
546
+ "is_parking_camera": "Yes",
547
+ "rear_brakes_type": "Drum",
548
+ "displacement": "999",
549
+ "cylinder": "3",
550
+ "transmission_type": "Automatic",
551
+ "gear_box": "5",
552
+ "steering_type": "Electric",
553
+ "turning_radius": "5",
554
+ "length": "3731",
555
+ "width": "1579",
556
+ "height": "1490",
557
+ "gross_weight": "1155",
558
+ "is_front_fog_lights": "No",
559
+ "is_rear_window_wiper": "No",
560
+ "is_rear_window_washer": "No",
561
+ "is_rear_window_defogger": "No",
562
+ "is_brake_assist": "No",
563
+ "is_power_door_locks": "Yes",
564
+ "is_central_locking": "Yes",
565
+ "is_power_steering": "Yes",
566
+ "is_driver_seat_height_adjustable": "No",
567
+ "is_day_night_rear_view_mirror": "Yes",
568
+ "is_ecw": "Yes",
569
+ "is_speed_alert": "Yes",
570
+ "ncap_rating": "2",
571
+ "is_claim": "0"
572
+ }
573
+ ]
574
+ }
575
+
576
+ Shortlisted templates:
577
+ [
578
+ {
579
+ "template_id": "tpl_tpch_relative_total_threshold",
580
+ "template_name": "Relative-to-Total Extreme Threshold",
581
+ "primary_family": "tail_rarity_structure",
582
+ "portability": "partial",
583
+ "sql_skeleton": "WITH grouped AS (\n SELECT {group_col}, SUM({measure_col}) AS group_value\n FROM {table}\n GROUP BY {group_col}\n), total AS (\n SELECT SUM(group_value) AS total_value\n FROM grouped\n)\nSELECT g.{group_col}, g.group_value\nFROM grouped AS g\nCROSS JOIN total AS t\nWHERE g.group_value > t.total_value * {fraction_threshold}\nORDER BY g.group_value DESC;",
584
+ "required_roles": [
585
+ "group_col",
586
+ "measure_col"
587
+ ]
588
+ }
589
+ ]
590
+
591
+ Problem instance:
592
+ {
593
+ "dataset_id": "m2",
594
+ "question": "Use template Relative-to-Total Extreme Threshold to probe tail_mass_similarity with semantic role count_distribution. Focus on group_col=is_driver_seat_height_adjustable, measure_col=population_density.",
595
+ "planned_template_id": "tpl_tpch_relative_total_threshold",
596
+ "bindings": {
597
+ "group_col": "is_driver_seat_height_adjustable",
598
+ "measure_col": "population_density",
599
+ "top_k": 13,
600
+ "top_n": 5,
601
+ "num_tiles": 10,
602
+ "percentile_value": 0.95,
603
+ "z_threshold": 2.0,
604
+ "fraction_threshold": 0.1,
605
+ "baseline_multiplier": 1.5,
606
+ "baseline_fraction": 0.1,
607
+ "min_group_size": 5,
608
+ "min_support": 5,
609
+ "measure_threshold": 27003.0,
610
+ "time_grain": "month",
611
+ "lookback_rows": 3,
612
+ "current_period_start": "'2024-01-01'",
613
+ "current_period_end": "'2024-04-01'",
614
+ "previous_period_start": "'2023-10-01'",
615
+ "previous_period_end": "'2024-01-01'",
616
+ "drift_ratio_threshold": 0.8
617
+ },
618
+ "can_vary": [],
619
+ "must_fix": [],
620
+ "runtime_sql_skeleton": "WITH grouped AS (\n SELECT {group_col}, SUM({measure_col}) AS group_value\n FROM {table}\n GROUP BY {group_col}\n), total AS (\n SELECT SUM(group_value) AS total_value\n FROM grouped\n)\nSELECT g.{group_col}, g.group_value\nFROM grouped AS g\nCROSS JOIN total AS t\nWHERE g.group_value > t.total_value * {fraction_threshold}\nORDER BY g.group_value DESC;"
621
+ }
622
+
623
+ Repair context:
624
+ {}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_prompt_attempt_2.txt ADDED
@@ -0,0 +1,624 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are generating one SQLite SELECT query for a single-table SQL QA task.
2
+ Return strict JSON only, with this schema: {"sql": "...", "notes": "..."}.
3
+ Rules:
4
+ - Use only the provided table and columns.
5
+ - Do not write INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, PRAGMA, ATTACH, DETACH, or VACUUM.
6
+ - Prefer the planned template and bound roles when provided.
7
+ - Add a leading SQL comment exactly like: -- template_id: <planned_template_id>.
8
+ - Generate SQLite-compatible SQL. SQLite does not support PERCENTILE_CONT or STDDEV.
9
+ - Quote identifiers with double quotes.
10
+ - Return no markdown and no extra prose.
11
+
12
+ Dataset context:
13
+ Dataset context for SQL QA:
14
+ - dataset_id: m2
15
+ - dataset_name: Carinsuranceclaimprediction Classification
16
+ - table_name: m2
17
+ - table_layout: single-table dataset (do not assume joins).
18
+ - row_semantics: One row is one tabular observation with 43 feature columns and target `is_day_night_rear_view_mirror`.
19
+ - task_type: classification
20
+ - target_column: is_day_night_rear_view_mirror
21
+ - main_row_count: 58592
22
+ - important_fields:
23
+ - policy_id: role=feature, type=identifier_string. tags=['identifier', 'probe_exclude', 'high_cardinality_candidate'] desc=Identifier-like field for policy id.
24
+ - policy_tenure: role=feature, type=numeric. tags=['condition_candidate', 'measure', 'high_cardinality_candidate'] desc=Numeric field for policy tenure.
25
+ - age_of_car: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of car.
26
+ - age_of_policyholder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of policyholder.
27
+ - area_cluster: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for area cluster.
28
+ - population_density: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for population density.
29
+ - make: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for make.
30
+ - segment: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for segment.
31
+ - model: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for model.
32
+ - fuel_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for fuel type.
33
+ - max_torque: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max torque.
34
+ - max_power: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max power.
35
+ - engine_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for engine type.
36
+ - airbags: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for airbags.
37
+ - is_esc: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is esc.
38
+ - is_adjustable_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is adjustable steering.
39
+ - is_tpms: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is tpms.
40
+ - is_parking_sensors: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking sensors.
41
+ - is_parking_camera: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking camera.
42
+ - rear_brakes_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for rear brakes type.
43
+ - displacement: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for displacement.
44
+ - cylinder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for cylinder.
45
+ - transmission_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for transmission type.
46
+ - gear_box: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gear box.
47
+ - steering_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for steering type.
48
+ - turning_radius: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for turning radius.
49
+ - length: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for length.
50
+ - width: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for width.
51
+ - height: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for height.
52
+ - gross_weight: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gross weight.
53
+ - is_front_fog_lights: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is front fog lights.
54
+ - is_rear_window_wiper: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window wiper.
55
+ - is_rear_window_washer: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window washer.
56
+ - is_rear_window_defogger: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window defogger.
57
+ - is_brake_assist: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is brake assist.
58
+ - is_power_door_locks: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power door locks.
59
+ - is_central_locking: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is central locking.
60
+ - is_power_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power steering.
61
+ - is_driver_seat_height_adjustable: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is driver seat height adjustable.
62
+ - is_day_night_rear_view_mirror: role=target, type=binary_target. tags=['subgroup_candidate', 'condition_candidate', 'target_candidate'] desc=Target field for is day night rear view mirror.
63
+ - is_ecw: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is ecw.
64
+ - is_speed_alert: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is speed alert.
65
+ - ncap_rating: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for ncap rating.
66
+ - is_claim: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is claim.
67
+ - useful_field_combinations: [['age_of_car', 'age_of_policyholder', 'is_day_night_rear_view_mirror'], ['age_of_car', 'policy_tenure', 'is_day_night_rear_view_mirror'], ['policy_tenure', 'age_of_car', 'is_day_night_rear_view_mirror']]
68
+ - fields_requiring_caution: ['is_day_night_rear_view_mirror', 'policy_tenure']
69
+ - source_url: https://www.kaggle.com/datasets/ifteshanajnin/carinsuranceclaimprediction-classification
70
+
71
+ SQLite schema snapshot:
72
+ {
73
+ "table_name": "m2",
74
+ "quoted_table_name": "\"m2\"",
75
+ "row_count": 58592,
76
+ "columns": [
77
+ {
78
+ "name": "policy_id",
79
+ "type": "TEXT",
80
+ "notnull": false,
81
+ "pk": false
82
+ },
83
+ {
84
+ "name": "policy_tenure",
85
+ "type": "TEXT",
86
+ "notnull": false,
87
+ "pk": false
88
+ },
89
+ {
90
+ "name": "age_of_car",
91
+ "type": "TEXT",
92
+ "notnull": false,
93
+ "pk": false
94
+ },
95
+ {
96
+ "name": "age_of_policyholder",
97
+ "type": "TEXT",
98
+ "notnull": false,
99
+ "pk": false
100
+ },
101
+ {
102
+ "name": "area_cluster",
103
+ "type": "TEXT",
104
+ "notnull": false,
105
+ "pk": false
106
+ },
107
+ {
108
+ "name": "population_density",
109
+ "type": "TEXT",
110
+ "notnull": false,
111
+ "pk": false
112
+ },
113
+ {
114
+ "name": "make",
115
+ "type": "TEXT",
116
+ "notnull": false,
117
+ "pk": false
118
+ },
119
+ {
120
+ "name": "segment",
121
+ "type": "TEXT",
122
+ "notnull": false,
123
+ "pk": false
124
+ },
125
+ {
126
+ "name": "model",
127
+ "type": "TEXT",
128
+ "notnull": false,
129
+ "pk": false
130
+ },
131
+ {
132
+ "name": "fuel_type",
133
+ "type": "TEXT",
134
+ "notnull": false,
135
+ "pk": false
136
+ },
137
+ {
138
+ "name": "max_torque",
139
+ "type": "TEXT",
140
+ "notnull": false,
141
+ "pk": false
142
+ },
143
+ {
144
+ "name": "max_power",
145
+ "type": "TEXT",
146
+ "notnull": false,
147
+ "pk": false
148
+ },
149
+ {
150
+ "name": "engine_type",
151
+ "type": "TEXT",
152
+ "notnull": false,
153
+ "pk": false
154
+ },
155
+ {
156
+ "name": "airbags",
157
+ "type": "TEXT",
158
+ "notnull": false,
159
+ "pk": false
160
+ },
161
+ {
162
+ "name": "is_esc",
163
+ "type": "TEXT",
164
+ "notnull": false,
165
+ "pk": false
166
+ },
167
+ {
168
+ "name": "is_adjustable_steering",
169
+ "type": "TEXT",
170
+ "notnull": false,
171
+ "pk": false
172
+ },
173
+ {
174
+ "name": "is_tpms",
175
+ "type": "TEXT",
176
+ "notnull": false,
177
+ "pk": false
178
+ },
179
+ {
180
+ "name": "is_parking_sensors",
181
+ "type": "TEXT",
182
+ "notnull": false,
183
+ "pk": false
184
+ },
185
+ {
186
+ "name": "is_parking_camera",
187
+ "type": "TEXT",
188
+ "notnull": false,
189
+ "pk": false
190
+ },
191
+ {
192
+ "name": "rear_brakes_type",
193
+ "type": "TEXT",
194
+ "notnull": false,
195
+ "pk": false
196
+ },
197
+ {
198
+ "name": "displacement",
199
+ "type": "TEXT",
200
+ "notnull": false,
201
+ "pk": false
202
+ },
203
+ {
204
+ "name": "cylinder",
205
+ "type": "TEXT",
206
+ "notnull": false,
207
+ "pk": false
208
+ },
209
+ {
210
+ "name": "transmission_type",
211
+ "type": "TEXT",
212
+ "notnull": false,
213
+ "pk": false
214
+ },
215
+ {
216
+ "name": "gear_box",
217
+ "type": "TEXT",
218
+ "notnull": false,
219
+ "pk": false
220
+ },
221
+ {
222
+ "name": "steering_type",
223
+ "type": "TEXT",
224
+ "notnull": false,
225
+ "pk": false
226
+ },
227
+ {
228
+ "name": "turning_radius",
229
+ "type": "TEXT",
230
+ "notnull": false,
231
+ "pk": false
232
+ },
233
+ {
234
+ "name": "length",
235
+ "type": "TEXT",
236
+ "notnull": false,
237
+ "pk": false
238
+ },
239
+ {
240
+ "name": "width",
241
+ "type": "TEXT",
242
+ "notnull": false,
243
+ "pk": false
244
+ },
245
+ {
246
+ "name": "height",
247
+ "type": "TEXT",
248
+ "notnull": false,
249
+ "pk": false
250
+ },
251
+ {
252
+ "name": "gross_weight",
253
+ "type": "TEXT",
254
+ "notnull": false,
255
+ "pk": false
256
+ },
257
+ {
258
+ "name": "is_front_fog_lights",
259
+ "type": "TEXT",
260
+ "notnull": false,
261
+ "pk": false
262
+ },
263
+ {
264
+ "name": "is_rear_window_wiper",
265
+ "type": "TEXT",
266
+ "notnull": false,
267
+ "pk": false
268
+ },
269
+ {
270
+ "name": "is_rear_window_washer",
271
+ "type": "TEXT",
272
+ "notnull": false,
273
+ "pk": false
274
+ },
275
+ {
276
+ "name": "is_rear_window_defogger",
277
+ "type": "TEXT",
278
+ "notnull": false,
279
+ "pk": false
280
+ },
281
+ {
282
+ "name": "is_brake_assist",
283
+ "type": "TEXT",
284
+ "notnull": false,
285
+ "pk": false
286
+ },
287
+ {
288
+ "name": "is_power_door_locks",
289
+ "type": "TEXT",
290
+ "notnull": false,
291
+ "pk": false
292
+ },
293
+ {
294
+ "name": "is_central_locking",
295
+ "type": "TEXT",
296
+ "notnull": false,
297
+ "pk": false
298
+ },
299
+ {
300
+ "name": "is_power_steering",
301
+ "type": "TEXT",
302
+ "notnull": false,
303
+ "pk": false
304
+ },
305
+ {
306
+ "name": "is_driver_seat_height_adjustable",
307
+ "type": "TEXT",
308
+ "notnull": false,
309
+ "pk": false
310
+ },
311
+ {
312
+ "name": "is_day_night_rear_view_mirror",
313
+ "type": "TEXT",
314
+ "notnull": false,
315
+ "pk": false
316
+ },
317
+ {
318
+ "name": "is_ecw",
319
+ "type": "TEXT",
320
+ "notnull": false,
321
+ "pk": false
322
+ },
323
+ {
324
+ "name": "is_speed_alert",
325
+ "type": "TEXT",
326
+ "notnull": false,
327
+ "pk": false
328
+ },
329
+ {
330
+ "name": "ncap_rating",
331
+ "type": "TEXT",
332
+ "notnull": false,
333
+ "pk": false
334
+ },
335
+ {
336
+ "name": "is_claim",
337
+ "type": "TEXT",
338
+ "notnull": false,
339
+ "pk": false
340
+ }
341
+ ],
342
+ "sample_rows": [
343
+ {
344
+ "policy_id": "ID00001",
345
+ "policy_tenure": "0.515873589958172",
346
+ "age_of_car": "0.05",
347
+ "age_of_policyholder": "0.644230769230769",
348
+ "area_cluster": "C1",
349
+ "population_density": "4990",
350
+ "make": "1",
351
+ "segment": "A",
352
+ "model": "M1",
353
+ "fuel_type": "CNG",
354
+ "max_torque": "60Nm@3500rpm",
355
+ "max_power": "40.36bhp@6000rpm",
356
+ "engine_type": "F8D Petrol Engine",
357
+ "airbags": "2",
358
+ "is_esc": "No",
359
+ "is_adjustable_steering": "No",
360
+ "is_tpms": "No",
361
+ "is_parking_sensors": "Yes",
362
+ "is_parking_camera": "No",
363
+ "rear_brakes_type": "Drum",
364
+ "displacement": "796",
365
+ "cylinder": "3",
366
+ "transmission_type": "Manual",
367
+ "gear_box": "5",
368
+ "steering_type": "Power",
369
+ "turning_radius": "4.6",
370
+ "length": "3445",
371
+ "width": "1515",
372
+ "height": "1475",
373
+ "gross_weight": "1185",
374
+ "is_front_fog_lights": "No",
375
+ "is_rear_window_wiper": "No",
376
+ "is_rear_window_washer": "No",
377
+ "is_rear_window_defogger": "No",
378
+ "is_brake_assist": "No",
379
+ "is_power_door_locks": "No",
380
+ "is_central_locking": "No",
381
+ "is_power_steering": "Yes",
382
+ "is_driver_seat_height_adjustable": "No",
383
+ "is_day_night_rear_view_mirror": "No",
384
+ "is_ecw": "No",
385
+ "is_speed_alert": "Yes",
386
+ "ncap_rating": "0",
387
+ "is_claim": "0"
388
+ },
389
+ {
390
+ "policy_id": "ID00002",
391
+ "policy_tenure": "0.672618513547733",
392
+ "age_of_car": "0.02",
393
+ "age_of_policyholder": "0.375",
394
+ "area_cluster": "C2",
395
+ "population_density": "27003",
396
+ "make": "1",
397
+ "segment": "A",
398
+ "model": "M1",
399
+ "fuel_type": "CNG",
400
+ "max_torque": "60Nm@3500rpm",
401
+ "max_power": "40.36bhp@6000rpm",
402
+ "engine_type": "F8D Petrol Engine",
403
+ "airbags": "2",
404
+ "is_esc": "No",
405
+ "is_adjustable_steering": "No",
406
+ "is_tpms": "No",
407
+ "is_parking_sensors": "Yes",
408
+ "is_parking_camera": "No",
409
+ "rear_brakes_type": "Drum",
410
+ "displacement": "796",
411
+ "cylinder": "3",
412
+ "transmission_type": "Manual",
413
+ "gear_box": "5",
414
+ "steering_type": "Power",
415
+ "turning_radius": "4.6",
416
+ "length": "3445",
417
+ "width": "1515",
418
+ "height": "1475",
419
+ "gross_weight": "1185",
420
+ "is_front_fog_lights": "No",
421
+ "is_rear_window_wiper": "No",
422
+ "is_rear_window_washer": "No",
423
+ "is_rear_window_defogger": "No",
424
+ "is_brake_assist": "No",
425
+ "is_power_door_locks": "No",
426
+ "is_central_locking": "No",
427
+ "is_power_steering": "Yes",
428
+ "is_driver_seat_height_adjustable": "No",
429
+ "is_day_night_rear_view_mirror": "No",
430
+ "is_ecw": "No",
431
+ "is_speed_alert": "Yes",
432
+ "ncap_rating": "0",
433
+ "is_claim": "0"
434
+ },
435
+ {
436
+ "policy_id": "ID00003",
437
+ "policy_tenure": "0.841110255796233",
438
+ "age_of_car": "0.02",
439
+ "age_of_policyholder": "0.384615384615385",
440
+ "area_cluster": "C3",
441
+ "population_density": "4076",
442
+ "make": "1",
443
+ "segment": "A",
444
+ "model": "M1",
445
+ "fuel_type": "CNG",
446
+ "max_torque": "60Nm@3500rpm",
447
+ "max_power": "40.36bhp@6000rpm",
448
+ "engine_type": "F8D Petrol Engine",
449
+ "airbags": "2",
450
+ "is_esc": "No",
451
+ "is_adjustable_steering": "No",
452
+ "is_tpms": "No",
453
+ "is_parking_sensors": "Yes",
454
+ "is_parking_camera": "No",
455
+ "rear_brakes_type": "Drum",
456
+ "displacement": "796",
457
+ "cylinder": "3",
458
+ "transmission_type": "Manual",
459
+ "gear_box": "5",
460
+ "steering_type": "Power",
461
+ "turning_radius": "4.6",
462
+ "length": "3445",
463
+ "width": "1515",
464
+ "height": "1475",
465
+ "gross_weight": "1185",
466
+ "is_front_fog_lights": "No",
467
+ "is_rear_window_wiper": "No",
468
+ "is_rear_window_washer": "No",
469
+ "is_rear_window_defogger": "No",
470
+ "is_brake_assist": "No",
471
+ "is_power_door_locks": "No",
472
+ "is_central_locking": "No",
473
+ "is_power_steering": "Yes",
474
+ "is_driver_seat_height_adjustable": "No",
475
+ "is_day_night_rear_view_mirror": "No",
476
+ "is_ecw": "No",
477
+ "is_speed_alert": "Yes",
478
+ "ncap_rating": "0",
479
+ "is_claim": "0"
480
+ },
481
+ {
482
+ "policy_id": "ID00004",
483
+ "policy_tenure": "0.900276558749967",
484
+ "age_of_car": "0.11",
485
+ "age_of_policyholder": "0.432692307692308",
486
+ "area_cluster": "C4",
487
+ "population_density": "21622",
488
+ "make": "1",
489
+ "segment": "C1",
490
+ "model": "M2",
491
+ "fuel_type": "Petrol",
492
+ "max_torque": "113Nm@4400rpm",
493
+ "max_power": "88.50bhp@6000rpm",
494
+ "engine_type": "1.2 L K12N Dualjet",
495
+ "airbags": "2",
496
+ "is_esc": "Yes",
497
+ "is_adjustable_steering": "Yes",
498
+ "is_tpms": "No",
499
+ "is_parking_sensors": "Yes",
500
+ "is_parking_camera": "Yes",
501
+ "rear_brakes_type": "Drum",
502
+ "displacement": "1197",
503
+ "cylinder": "4",
504
+ "transmission_type": "Automatic",
505
+ "gear_box": "5",
506
+ "steering_type": "Electric",
507
+ "turning_radius": "4.8",
508
+ "length": "3995",
509
+ "width": "1735",
510
+ "height": "1515",
511
+ "gross_weight": "1335",
512
+ "is_front_fog_lights": "Yes",
513
+ "is_rear_window_wiper": "No",
514
+ "is_rear_window_washer": "No",
515
+ "is_rear_window_defogger": "Yes",
516
+ "is_brake_assist": "Yes",
517
+ "is_power_door_locks": "Yes",
518
+ "is_central_locking": "Yes",
519
+ "is_power_steering": "Yes",
520
+ "is_driver_seat_height_adjustable": "Yes",
521
+ "is_day_night_rear_view_mirror": "Yes",
522
+ "is_ecw": "Yes",
523
+ "is_speed_alert": "Yes",
524
+ "ncap_rating": "2",
525
+ "is_claim": "0"
526
+ },
527
+ {
528
+ "policy_id": "ID00005",
529
+ "policy_tenure": "0.596402813108729",
530
+ "age_of_car": "0.11",
531
+ "age_of_policyholder": "0.634615384615385",
532
+ "area_cluster": "C5",
533
+ "population_density": "34738",
534
+ "make": "2",
535
+ "segment": "A",
536
+ "model": "M3",
537
+ "fuel_type": "Petrol",
538
+ "max_torque": "91Nm@4250rpm",
539
+ "max_power": "67.06bhp@5500rpm",
540
+ "engine_type": "1.0 SCe",
541
+ "airbags": "2",
542
+ "is_esc": "No",
543
+ "is_adjustable_steering": "No",
544
+ "is_tpms": "No",
545
+ "is_parking_sensors": "No",
546
+ "is_parking_camera": "Yes",
547
+ "rear_brakes_type": "Drum",
548
+ "displacement": "999",
549
+ "cylinder": "3",
550
+ "transmission_type": "Automatic",
551
+ "gear_box": "5",
552
+ "steering_type": "Electric",
553
+ "turning_radius": "5",
554
+ "length": "3731",
555
+ "width": "1579",
556
+ "height": "1490",
557
+ "gross_weight": "1155",
558
+ "is_front_fog_lights": "No",
559
+ "is_rear_window_wiper": "No",
560
+ "is_rear_window_washer": "No",
561
+ "is_rear_window_defogger": "No",
562
+ "is_brake_assist": "No",
563
+ "is_power_door_locks": "Yes",
564
+ "is_central_locking": "Yes",
565
+ "is_power_steering": "Yes",
566
+ "is_driver_seat_height_adjustable": "No",
567
+ "is_day_night_rear_view_mirror": "Yes",
568
+ "is_ecw": "Yes",
569
+ "is_speed_alert": "Yes",
570
+ "ncap_rating": "2",
571
+ "is_claim": "0"
572
+ }
573
+ ]
574
+ }
575
+
576
+ Shortlisted templates:
577
+ [
578
+ {
579
+ "template_id": "tpl_tpch_relative_total_threshold",
580
+ "template_name": "Relative-to-Total Extreme Threshold",
581
+ "primary_family": "tail_rarity_structure",
582
+ "portability": "partial",
583
+ "sql_skeleton": "WITH grouped AS (\n SELECT {group_col}, SUM({measure_col}) AS group_value\n FROM {table}\n GROUP BY {group_col}\n), total AS (\n SELECT SUM(group_value) AS total_value\n FROM grouped\n)\nSELECT g.{group_col}, g.group_value\nFROM grouped AS g\nCROSS JOIN total AS t\nWHERE g.group_value > t.total_value * {fraction_threshold}\nORDER BY g.group_value DESC;",
584
+ "required_roles": [
585
+ "group_col",
586
+ "measure_col"
587
+ ]
588
+ }
589
+ ]
590
+
591
+ Problem instance:
592
+ {
593
+ "dataset_id": "m2",
594
+ "question": "Use template Relative-to-Total Extreme Threshold to probe tail_mass_similarity with semantic role count_distribution. Focus on group_col=is_driver_seat_height_adjustable, measure_col=population_density.",
595
+ "planned_template_id": "tpl_tpch_relative_total_threshold",
596
+ "bindings": {
597
+ "group_col": "is_driver_seat_height_adjustable",
598
+ "measure_col": "population_density",
599
+ "top_k": 13,
600
+ "top_n": 5,
601
+ "num_tiles": 10,
602
+ "percentile_value": 0.95,
603
+ "z_threshold": 2.0,
604
+ "fraction_threshold": 0.1,
605
+ "baseline_multiplier": 1.5,
606
+ "baseline_fraction": 0.1,
607
+ "min_group_size": 5,
608
+ "min_support": 5,
609
+ "measure_threshold": 27003.0,
610
+ "time_grain": "month",
611
+ "lookback_rows": 3,
612
+ "current_period_start": "'2024-01-01'",
613
+ "current_period_end": "'2024-04-01'",
614
+ "previous_period_start": "'2023-10-01'",
615
+ "previous_period_end": "'2024-01-01'",
616
+ "drift_ratio_threshold": 0.8
617
+ },
618
+ "can_vary": [],
619
+ "must_fix": [],
620
+ "runtime_sql_skeleton": "WITH grouped AS (\n SELECT {group_col}, SUM({measure_col}) AS group_value\n FROM {table}\n GROUP BY {group_col}\n), total AS (\n SELECT SUM(group_value) AS total_value\n FROM grouped\n)\nSELECT g.{group_col}, g.group_value\nFROM grouped AS g\nCROSS JOIN total AS t\nWHERE g.group_value > t.total_value * {fraction_threshold}\nORDER BY g.group_value DESC;"
621
+ }
622
+
623
+ Repair context:
624
+ {}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_response_attempt_1.raw.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e4108-4916-7a80-92aa-bb363d96ab2a"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_response_attempt_1.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e4108-4916-7a80-92aa-bb363d96ab2a"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_response_attempt_2.raw.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e4108-59db-7d40-ab2d-3b241e85ae88"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_response_attempt_2.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e4108-59db-7d40-ab2d-3b241e85ae88"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_stderr_attempt_1.txt ADDED
File without changes
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_11efcbae1023ca09/cli/sql_stderr_attempt_2.txt ADDED
File without changes
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_attempt_1.metadata.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attempt": 1,
3
+ "phase": "sql_generation",
4
+ "command": "codex exec --skip-git-repo-check --disable plugins --sandbox read-only --cd \"/data/jialinzhang/SQLagent\" -m gpt-5.4 --json -",
5
+ "started_at": "2026-05-19T16:12:59.787809+00:00",
6
+ "ended_at": "2026-05-19T16:13:02.998073+00:00",
7
+ "elapsed_ms": 3210.23,
8
+ "returncode": 1,
9
+ "prompt_metrics": {
10
+ "chars": 21963,
11
+ "bytes_utf8": 21963,
12
+ "lines": 626,
13
+ "estimated_tokens": null
14
+ },
15
+ "stdout_metrics": {
16
+ "chars": 281,
17
+ "bytes_utf8": 281,
18
+ "lines": 4,
19
+ "estimated_tokens": null
20
+ },
21
+ "stderr_metrics": {
22
+ "chars": 0,
23
+ "bytes_utf8": 0,
24
+ "lines": 0,
25
+ "estimated_tokens": null
26
+ },
27
+ "parsed_output": {
28
+ "format": "jsonl_events",
29
+ "text_metrics": {
30
+ "chars": 280,
31
+ "bytes_utf8": 280,
32
+ "lines": 4,
33
+ "estimated_tokens": null
34
+ },
35
+ "usage": {}
36
+ },
37
+ "status": "failed",
38
+ "error": "AI CLI command failed with exit code 1: ",
39
+ "prompt_path": "cli/sql_prompt_attempt_1.txt",
40
+ "response_path": "cli/sql_response_attempt_1.txt",
41
+ "raw_response_path": "cli/sql_response_attempt_1.raw.txt",
42
+ "stderr_path": "cli/sql_stderr_attempt_1.txt"
43
+ }
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_attempt_2.metadata.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attempt": 2,
3
+ "phase": "sql_generation",
4
+ "command": "codex exec --skip-git-repo-check --disable plugins --sandbox read-only --cd \"/data/jialinzhang/SQLagent\" -m gpt-5.4 --json -",
5
+ "started_at": "2026-05-19T16:13:04.001807+00:00",
6
+ "ended_at": "2026-05-19T16:13:06.940706+00:00",
7
+ "elapsed_ms": 2938.85,
8
+ "returncode": 1,
9
+ "prompt_metrics": {
10
+ "chars": 21963,
11
+ "bytes_utf8": 21963,
12
+ "lines": 626,
13
+ "estimated_tokens": null
14
+ },
15
+ "stdout_metrics": {
16
+ "chars": 281,
17
+ "bytes_utf8": 281,
18
+ "lines": 4,
19
+ "estimated_tokens": null
20
+ },
21
+ "stderr_metrics": {
22
+ "chars": 0,
23
+ "bytes_utf8": 0,
24
+ "lines": 0,
25
+ "estimated_tokens": null
26
+ },
27
+ "parsed_output": {
28
+ "format": "jsonl_events",
29
+ "text_metrics": {
30
+ "chars": 280,
31
+ "bytes_utf8": 280,
32
+ "lines": 4,
33
+ "estimated_tokens": null
34
+ },
35
+ "usage": {}
36
+ },
37
+ "status": "failed",
38
+ "error": "AI CLI command failed with exit code 1: ",
39
+ "prompt_path": "cli/sql_prompt_attempt_2.txt",
40
+ "response_path": "cli/sql_response_attempt_2.txt",
41
+ "raw_response_path": "cli/sql_response_attempt_2.raw.txt",
42
+ "stderr_path": "cli/sql_stderr_attempt_2.txt"
43
+ }
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_prompt_attempt_1.txt ADDED
@@ -0,0 +1,626 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are generating one SQLite SELECT query for a single-table SQL QA task.
2
+ Return strict JSON only, with this schema: {"sql": "...", "notes": "..."}.
3
+ Rules:
4
+ - Use only the provided table and columns.
5
+ - Do not write INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, PRAGMA, ATTACH, DETACH, or VACUUM.
6
+ - Prefer the planned template and bound roles when provided.
7
+ - Add a leading SQL comment exactly like: -- template_id: <planned_template_id>.
8
+ - Generate SQLite-compatible SQL. SQLite does not support PERCENTILE_CONT or STDDEV.
9
+ - Quote identifiers with double quotes.
10
+ - Return no markdown and no extra prose.
11
+
12
+ Dataset context:
13
+ Dataset context for SQL QA:
14
+ - dataset_id: m2
15
+ - dataset_name: Carinsuranceclaimprediction Classification
16
+ - table_name: m2
17
+ - table_layout: single-table dataset (do not assume joins).
18
+ - row_semantics: One row is one tabular observation with 43 feature columns and target `is_day_night_rear_view_mirror`.
19
+ - task_type: classification
20
+ - target_column: is_day_night_rear_view_mirror
21
+ - main_row_count: 58592
22
+ - important_fields:
23
+ - policy_id: role=feature, type=identifier_string. tags=['identifier', 'probe_exclude', 'high_cardinality_candidate'] desc=Identifier-like field for policy id.
24
+ - policy_tenure: role=feature, type=numeric. tags=['condition_candidate', 'measure', 'high_cardinality_candidate'] desc=Numeric field for policy tenure.
25
+ - age_of_car: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of car.
26
+ - age_of_policyholder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of policyholder.
27
+ - area_cluster: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for area cluster.
28
+ - population_density: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for population density.
29
+ - make: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for make.
30
+ - segment: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for segment.
31
+ - model: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for model.
32
+ - fuel_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for fuel type.
33
+ - max_torque: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max torque.
34
+ - max_power: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max power.
35
+ - engine_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for engine type.
36
+ - airbags: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for airbags.
37
+ - is_esc: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is esc.
38
+ - is_adjustable_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is adjustable steering.
39
+ - is_tpms: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is tpms.
40
+ - is_parking_sensors: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking sensors.
41
+ - is_parking_camera: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking camera.
42
+ - rear_brakes_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for rear brakes type.
43
+ - displacement: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for displacement.
44
+ - cylinder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for cylinder.
45
+ - transmission_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for transmission type.
46
+ - gear_box: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gear box.
47
+ - steering_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for steering type.
48
+ - turning_radius: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for turning radius.
49
+ - length: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for length.
50
+ - width: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for width.
51
+ - height: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for height.
52
+ - gross_weight: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gross weight.
53
+ - is_front_fog_lights: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is front fog lights.
54
+ - is_rear_window_wiper: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window wiper.
55
+ - is_rear_window_washer: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window washer.
56
+ - is_rear_window_defogger: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window defogger.
57
+ - is_brake_assist: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is brake assist.
58
+ - is_power_door_locks: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power door locks.
59
+ - is_central_locking: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is central locking.
60
+ - is_power_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power steering.
61
+ - is_driver_seat_height_adjustable: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is driver seat height adjustable.
62
+ - is_day_night_rear_view_mirror: role=target, type=binary_target. tags=['subgroup_candidate', 'condition_candidate', 'target_candidate'] desc=Target field for is day night rear view mirror.
63
+ - is_ecw: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is ecw.
64
+ - is_speed_alert: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is speed alert.
65
+ - ncap_rating: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for ncap rating.
66
+ - is_claim: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is claim.
67
+ - useful_field_combinations: [['age_of_car', 'age_of_policyholder', 'is_day_night_rear_view_mirror'], ['age_of_car', 'policy_tenure', 'is_day_night_rear_view_mirror'], ['policy_tenure', 'age_of_car', 'is_day_night_rear_view_mirror']]
68
+ - fields_requiring_caution: ['is_day_night_rear_view_mirror', 'policy_tenure']
69
+ - source_url: https://www.kaggle.com/datasets/ifteshanajnin/carinsuranceclaimprediction-classification
70
+
71
+ SQLite schema snapshot:
72
+ {
73
+ "table_name": "m2",
74
+ "quoted_table_name": "\"m2\"",
75
+ "row_count": 58592,
76
+ "columns": [
77
+ {
78
+ "name": "policy_id",
79
+ "type": "TEXT",
80
+ "notnull": false,
81
+ "pk": false
82
+ },
83
+ {
84
+ "name": "policy_tenure",
85
+ "type": "TEXT",
86
+ "notnull": false,
87
+ "pk": false
88
+ },
89
+ {
90
+ "name": "age_of_car",
91
+ "type": "TEXT",
92
+ "notnull": false,
93
+ "pk": false
94
+ },
95
+ {
96
+ "name": "age_of_policyholder",
97
+ "type": "TEXT",
98
+ "notnull": false,
99
+ "pk": false
100
+ },
101
+ {
102
+ "name": "area_cluster",
103
+ "type": "TEXT",
104
+ "notnull": false,
105
+ "pk": false
106
+ },
107
+ {
108
+ "name": "population_density",
109
+ "type": "TEXT",
110
+ "notnull": false,
111
+ "pk": false
112
+ },
113
+ {
114
+ "name": "make",
115
+ "type": "TEXT",
116
+ "notnull": false,
117
+ "pk": false
118
+ },
119
+ {
120
+ "name": "segment",
121
+ "type": "TEXT",
122
+ "notnull": false,
123
+ "pk": false
124
+ },
125
+ {
126
+ "name": "model",
127
+ "type": "TEXT",
128
+ "notnull": false,
129
+ "pk": false
130
+ },
131
+ {
132
+ "name": "fuel_type",
133
+ "type": "TEXT",
134
+ "notnull": false,
135
+ "pk": false
136
+ },
137
+ {
138
+ "name": "max_torque",
139
+ "type": "TEXT",
140
+ "notnull": false,
141
+ "pk": false
142
+ },
143
+ {
144
+ "name": "max_power",
145
+ "type": "TEXT",
146
+ "notnull": false,
147
+ "pk": false
148
+ },
149
+ {
150
+ "name": "engine_type",
151
+ "type": "TEXT",
152
+ "notnull": false,
153
+ "pk": false
154
+ },
155
+ {
156
+ "name": "airbags",
157
+ "type": "TEXT",
158
+ "notnull": false,
159
+ "pk": false
160
+ },
161
+ {
162
+ "name": "is_esc",
163
+ "type": "TEXT",
164
+ "notnull": false,
165
+ "pk": false
166
+ },
167
+ {
168
+ "name": "is_adjustable_steering",
169
+ "type": "TEXT",
170
+ "notnull": false,
171
+ "pk": false
172
+ },
173
+ {
174
+ "name": "is_tpms",
175
+ "type": "TEXT",
176
+ "notnull": false,
177
+ "pk": false
178
+ },
179
+ {
180
+ "name": "is_parking_sensors",
181
+ "type": "TEXT",
182
+ "notnull": false,
183
+ "pk": false
184
+ },
185
+ {
186
+ "name": "is_parking_camera",
187
+ "type": "TEXT",
188
+ "notnull": false,
189
+ "pk": false
190
+ },
191
+ {
192
+ "name": "rear_brakes_type",
193
+ "type": "TEXT",
194
+ "notnull": false,
195
+ "pk": false
196
+ },
197
+ {
198
+ "name": "displacement",
199
+ "type": "TEXT",
200
+ "notnull": false,
201
+ "pk": false
202
+ },
203
+ {
204
+ "name": "cylinder",
205
+ "type": "TEXT",
206
+ "notnull": false,
207
+ "pk": false
208
+ },
209
+ {
210
+ "name": "transmission_type",
211
+ "type": "TEXT",
212
+ "notnull": false,
213
+ "pk": false
214
+ },
215
+ {
216
+ "name": "gear_box",
217
+ "type": "TEXT",
218
+ "notnull": false,
219
+ "pk": false
220
+ },
221
+ {
222
+ "name": "steering_type",
223
+ "type": "TEXT",
224
+ "notnull": false,
225
+ "pk": false
226
+ },
227
+ {
228
+ "name": "turning_radius",
229
+ "type": "TEXT",
230
+ "notnull": false,
231
+ "pk": false
232
+ },
233
+ {
234
+ "name": "length",
235
+ "type": "TEXT",
236
+ "notnull": false,
237
+ "pk": false
238
+ },
239
+ {
240
+ "name": "width",
241
+ "type": "TEXT",
242
+ "notnull": false,
243
+ "pk": false
244
+ },
245
+ {
246
+ "name": "height",
247
+ "type": "TEXT",
248
+ "notnull": false,
249
+ "pk": false
250
+ },
251
+ {
252
+ "name": "gross_weight",
253
+ "type": "TEXT",
254
+ "notnull": false,
255
+ "pk": false
256
+ },
257
+ {
258
+ "name": "is_front_fog_lights",
259
+ "type": "TEXT",
260
+ "notnull": false,
261
+ "pk": false
262
+ },
263
+ {
264
+ "name": "is_rear_window_wiper",
265
+ "type": "TEXT",
266
+ "notnull": false,
267
+ "pk": false
268
+ },
269
+ {
270
+ "name": "is_rear_window_washer",
271
+ "type": "TEXT",
272
+ "notnull": false,
273
+ "pk": false
274
+ },
275
+ {
276
+ "name": "is_rear_window_defogger",
277
+ "type": "TEXT",
278
+ "notnull": false,
279
+ "pk": false
280
+ },
281
+ {
282
+ "name": "is_brake_assist",
283
+ "type": "TEXT",
284
+ "notnull": false,
285
+ "pk": false
286
+ },
287
+ {
288
+ "name": "is_power_door_locks",
289
+ "type": "TEXT",
290
+ "notnull": false,
291
+ "pk": false
292
+ },
293
+ {
294
+ "name": "is_central_locking",
295
+ "type": "TEXT",
296
+ "notnull": false,
297
+ "pk": false
298
+ },
299
+ {
300
+ "name": "is_power_steering",
301
+ "type": "TEXT",
302
+ "notnull": false,
303
+ "pk": false
304
+ },
305
+ {
306
+ "name": "is_driver_seat_height_adjustable",
307
+ "type": "TEXT",
308
+ "notnull": false,
309
+ "pk": false
310
+ },
311
+ {
312
+ "name": "is_day_night_rear_view_mirror",
313
+ "type": "TEXT",
314
+ "notnull": false,
315
+ "pk": false
316
+ },
317
+ {
318
+ "name": "is_ecw",
319
+ "type": "TEXT",
320
+ "notnull": false,
321
+ "pk": false
322
+ },
323
+ {
324
+ "name": "is_speed_alert",
325
+ "type": "TEXT",
326
+ "notnull": false,
327
+ "pk": false
328
+ },
329
+ {
330
+ "name": "ncap_rating",
331
+ "type": "TEXT",
332
+ "notnull": false,
333
+ "pk": false
334
+ },
335
+ {
336
+ "name": "is_claim",
337
+ "type": "TEXT",
338
+ "notnull": false,
339
+ "pk": false
340
+ }
341
+ ],
342
+ "sample_rows": [
343
+ {
344
+ "policy_id": "ID00001",
345
+ "policy_tenure": "0.515873589958172",
346
+ "age_of_car": "0.05",
347
+ "age_of_policyholder": "0.644230769230769",
348
+ "area_cluster": "C1",
349
+ "population_density": "4990",
350
+ "make": "1",
351
+ "segment": "A",
352
+ "model": "M1",
353
+ "fuel_type": "CNG",
354
+ "max_torque": "60Nm@3500rpm",
355
+ "max_power": "40.36bhp@6000rpm",
356
+ "engine_type": "F8D Petrol Engine",
357
+ "airbags": "2",
358
+ "is_esc": "No",
359
+ "is_adjustable_steering": "No",
360
+ "is_tpms": "No",
361
+ "is_parking_sensors": "Yes",
362
+ "is_parking_camera": "No",
363
+ "rear_brakes_type": "Drum",
364
+ "displacement": "796",
365
+ "cylinder": "3",
366
+ "transmission_type": "Manual",
367
+ "gear_box": "5",
368
+ "steering_type": "Power",
369
+ "turning_radius": "4.6",
370
+ "length": "3445",
371
+ "width": "1515",
372
+ "height": "1475",
373
+ "gross_weight": "1185",
374
+ "is_front_fog_lights": "No",
375
+ "is_rear_window_wiper": "No",
376
+ "is_rear_window_washer": "No",
377
+ "is_rear_window_defogger": "No",
378
+ "is_brake_assist": "No",
379
+ "is_power_door_locks": "No",
380
+ "is_central_locking": "No",
381
+ "is_power_steering": "Yes",
382
+ "is_driver_seat_height_adjustable": "No",
383
+ "is_day_night_rear_view_mirror": "No",
384
+ "is_ecw": "No",
385
+ "is_speed_alert": "Yes",
386
+ "ncap_rating": "0",
387
+ "is_claim": "0"
388
+ },
389
+ {
390
+ "policy_id": "ID00002",
391
+ "policy_tenure": "0.672618513547733",
392
+ "age_of_car": "0.02",
393
+ "age_of_policyholder": "0.375",
394
+ "area_cluster": "C2",
395
+ "population_density": "27003",
396
+ "make": "1",
397
+ "segment": "A",
398
+ "model": "M1",
399
+ "fuel_type": "CNG",
400
+ "max_torque": "60Nm@3500rpm",
401
+ "max_power": "40.36bhp@6000rpm",
402
+ "engine_type": "F8D Petrol Engine",
403
+ "airbags": "2",
404
+ "is_esc": "No",
405
+ "is_adjustable_steering": "No",
406
+ "is_tpms": "No",
407
+ "is_parking_sensors": "Yes",
408
+ "is_parking_camera": "No",
409
+ "rear_brakes_type": "Drum",
410
+ "displacement": "796",
411
+ "cylinder": "3",
412
+ "transmission_type": "Manual",
413
+ "gear_box": "5",
414
+ "steering_type": "Power",
415
+ "turning_radius": "4.6",
416
+ "length": "3445",
417
+ "width": "1515",
418
+ "height": "1475",
419
+ "gross_weight": "1185",
420
+ "is_front_fog_lights": "No",
421
+ "is_rear_window_wiper": "No",
422
+ "is_rear_window_washer": "No",
423
+ "is_rear_window_defogger": "No",
424
+ "is_brake_assist": "No",
425
+ "is_power_door_locks": "No",
426
+ "is_central_locking": "No",
427
+ "is_power_steering": "Yes",
428
+ "is_driver_seat_height_adjustable": "No",
429
+ "is_day_night_rear_view_mirror": "No",
430
+ "is_ecw": "No",
431
+ "is_speed_alert": "Yes",
432
+ "ncap_rating": "0",
433
+ "is_claim": "0"
434
+ },
435
+ {
436
+ "policy_id": "ID00003",
437
+ "policy_tenure": "0.841110255796233",
438
+ "age_of_car": "0.02",
439
+ "age_of_policyholder": "0.384615384615385",
440
+ "area_cluster": "C3",
441
+ "population_density": "4076",
442
+ "make": "1",
443
+ "segment": "A",
444
+ "model": "M1",
445
+ "fuel_type": "CNG",
446
+ "max_torque": "60Nm@3500rpm",
447
+ "max_power": "40.36bhp@6000rpm",
448
+ "engine_type": "F8D Petrol Engine",
449
+ "airbags": "2",
450
+ "is_esc": "No",
451
+ "is_adjustable_steering": "No",
452
+ "is_tpms": "No",
453
+ "is_parking_sensors": "Yes",
454
+ "is_parking_camera": "No",
455
+ "rear_brakes_type": "Drum",
456
+ "displacement": "796",
457
+ "cylinder": "3",
458
+ "transmission_type": "Manual",
459
+ "gear_box": "5",
460
+ "steering_type": "Power",
461
+ "turning_radius": "4.6",
462
+ "length": "3445",
463
+ "width": "1515",
464
+ "height": "1475",
465
+ "gross_weight": "1185",
466
+ "is_front_fog_lights": "No",
467
+ "is_rear_window_wiper": "No",
468
+ "is_rear_window_washer": "No",
469
+ "is_rear_window_defogger": "No",
470
+ "is_brake_assist": "No",
471
+ "is_power_door_locks": "No",
472
+ "is_central_locking": "No",
473
+ "is_power_steering": "Yes",
474
+ "is_driver_seat_height_adjustable": "No",
475
+ "is_day_night_rear_view_mirror": "No",
476
+ "is_ecw": "No",
477
+ "is_speed_alert": "Yes",
478
+ "ncap_rating": "0",
479
+ "is_claim": "0"
480
+ },
481
+ {
482
+ "policy_id": "ID00004",
483
+ "policy_tenure": "0.900276558749967",
484
+ "age_of_car": "0.11",
485
+ "age_of_policyholder": "0.432692307692308",
486
+ "area_cluster": "C4",
487
+ "population_density": "21622",
488
+ "make": "1",
489
+ "segment": "C1",
490
+ "model": "M2",
491
+ "fuel_type": "Petrol",
492
+ "max_torque": "113Nm@4400rpm",
493
+ "max_power": "88.50bhp@6000rpm",
494
+ "engine_type": "1.2 L K12N Dualjet",
495
+ "airbags": "2",
496
+ "is_esc": "Yes",
497
+ "is_adjustable_steering": "Yes",
498
+ "is_tpms": "No",
499
+ "is_parking_sensors": "Yes",
500
+ "is_parking_camera": "Yes",
501
+ "rear_brakes_type": "Drum",
502
+ "displacement": "1197",
503
+ "cylinder": "4",
504
+ "transmission_type": "Automatic",
505
+ "gear_box": "5",
506
+ "steering_type": "Electric",
507
+ "turning_radius": "4.8",
508
+ "length": "3995",
509
+ "width": "1735",
510
+ "height": "1515",
511
+ "gross_weight": "1335",
512
+ "is_front_fog_lights": "Yes",
513
+ "is_rear_window_wiper": "No",
514
+ "is_rear_window_washer": "No",
515
+ "is_rear_window_defogger": "Yes",
516
+ "is_brake_assist": "Yes",
517
+ "is_power_door_locks": "Yes",
518
+ "is_central_locking": "Yes",
519
+ "is_power_steering": "Yes",
520
+ "is_driver_seat_height_adjustable": "Yes",
521
+ "is_day_night_rear_view_mirror": "Yes",
522
+ "is_ecw": "Yes",
523
+ "is_speed_alert": "Yes",
524
+ "ncap_rating": "2",
525
+ "is_claim": "0"
526
+ },
527
+ {
528
+ "policy_id": "ID00005",
529
+ "policy_tenure": "0.596402813108729",
530
+ "age_of_car": "0.11",
531
+ "age_of_policyholder": "0.634615384615385",
532
+ "area_cluster": "C5",
533
+ "population_density": "34738",
534
+ "make": "2",
535
+ "segment": "A",
536
+ "model": "M3",
537
+ "fuel_type": "Petrol",
538
+ "max_torque": "91Nm@4250rpm",
539
+ "max_power": "67.06bhp@5500rpm",
540
+ "engine_type": "1.0 SCe",
541
+ "airbags": "2",
542
+ "is_esc": "No",
543
+ "is_adjustable_steering": "No",
544
+ "is_tpms": "No",
545
+ "is_parking_sensors": "No",
546
+ "is_parking_camera": "Yes",
547
+ "rear_brakes_type": "Drum",
548
+ "displacement": "999",
549
+ "cylinder": "3",
550
+ "transmission_type": "Automatic",
551
+ "gear_box": "5",
552
+ "steering_type": "Electric",
553
+ "turning_radius": "5",
554
+ "length": "3731",
555
+ "width": "1579",
556
+ "height": "1490",
557
+ "gross_weight": "1155",
558
+ "is_front_fog_lights": "No",
559
+ "is_rear_window_wiper": "No",
560
+ "is_rear_window_washer": "No",
561
+ "is_rear_window_defogger": "No",
562
+ "is_brake_assist": "No",
563
+ "is_power_door_locks": "Yes",
564
+ "is_central_locking": "Yes",
565
+ "is_power_steering": "Yes",
566
+ "is_driver_seat_height_adjustable": "No",
567
+ "is_day_night_rear_view_mirror": "Yes",
568
+ "is_ecw": "Yes",
569
+ "is_speed_alert": "Yes",
570
+ "ncap_rating": "2",
571
+ "is_claim": "0"
572
+ }
573
+ ]
574
+ }
575
+
576
+ Shortlisted templates:
577
+ [
578
+ {
579
+ "template_id": "tpl_tpcds_within_group_share",
580
+ "template_name": "Within-Group Share of Total",
581
+ "primary_family": "conditional_dependency_structure",
582
+ "portability": "partial",
583
+ "sql_skeleton": "SELECT {group_col}, {item_col},\n SUM({measure_col}) AS total_measure,\n SUM({measure_col}) * 100.0 / SUM(SUM({measure_col})) OVER (PARTITION BY {group_col}) AS share_within_group\nFROM {table}\nGROUP BY {group_col}, {item_col}\nORDER BY share_within_group DESC;",
584
+ "required_roles": [
585
+ "group_col",
586
+ "item_col",
587
+ "measure_col"
588
+ ]
589
+ }
590
+ ]
591
+
592
+ Problem instance:
593
+ {
594
+ "dataset_id": "m2",
595
+ "question": "Use template Within-Group Share of Total to probe dependency_strength_similarity with semantic role within_group_proportion. Focus on group_col=is_central_locking, measure_col=make.",
596
+ "planned_template_id": "tpl_tpcds_within_group_share",
597
+ "bindings": {
598
+ "group_col": "is_central_locking",
599
+ "measure_col": "make",
600
+ "item_col": "population_density",
601
+ "top_k": 14,
602
+ "top_n": 5,
603
+ "num_tiles": 10,
604
+ "percentile_value": 0.95,
605
+ "z_threshold": 2.0,
606
+ "fraction_threshold": 0.1,
607
+ "baseline_multiplier": 1.5,
608
+ "baseline_fraction": 0.1,
609
+ "min_group_size": 5,
610
+ "min_support": 5,
611
+ "measure_threshold": 3.0,
612
+ "time_grain": "month",
613
+ "lookback_rows": 3,
614
+ "current_period_start": "'2024-01-01'",
615
+ "current_period_end": "'2024-04-01'",
616
+ "previous_period_start": "'2023-10-01'",
617
+ "previous_period_end": "'2024-01-01'",
618
+ "drift_ratio_threshold": 0.8
619
+ },
620
+ "can_vary": [],
621
+ "must_fix": [],
622
+ "runtime_sql_skeleton": "SELECT {group_col}, {item_col},\n SUM({measure_col}) AS total_measure,\n SUM({measure_col}) * 100.0 / SUM(SUM({measure_col})) OVER (PARTITION BY {group_col}) AS share_within_group\nFROM {table}\nGROUP BY {group_col}, {item_col}\nORDER BY share_within_group DESC;"
623
+ }
624
+
625
+ Repair context:
626
+ {}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_prompt_attempt_2.txt ADDED
@@ -0,0 +1,626 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are generating one SQLite SELECT query for a single-table SQL QA task.
2
+ Return strict JSON only, with this schema: {"sql": "...", "notes": "..."}.
3
+ Rules:
4
+ - Use only the provided table and columns.
5
+ - Do not write INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, PRAGMA, ATTACH, DETACH, or VACUUM.
6
+ - Prefer the planned template and bound roles when provided.
7
+ - Add a leading SQL comment exactly like: -- template_id: <planned_template_id>.
8
+ - Generate SQLite-compatible SQL. SQLite does not support PERCENTILE_CONT or STDDEV.
9
+ - Quote identifiers with double quotes.
10
+ - Return no markdown and no extra prose.
11
+
12
+ Dataset context:
13
+ Dataset context for SQL QA:
14
+ - dataset_id: m2
15
+ - dataset_name: Carinsuranceclaimprediction Classification
16
+ - table_name: m2
17
+ - table_layout: single-table dataset (do not assume joins).
18
+ - row_semantics: One row is one tabular observation with 43 feature columns and target `is_day_night_rear_view_mirror`.
19
+ - task_type: classification
20
+ - target_column: is_day_night_rear_view_mirror
21
+ - main_row_count: 58592
22
+ - important_fields:
23
+ - policy_id: role=feature, type=identifier_string. tags=['identifier', 'probe_exclude', 'high_cardinality_candidate'] desc=Identifier-like field for policy id.
24
+ - policy_tenure: role=feature, type=numeric. tags=['condition_candidate', 'measure', 'high_cardinality_candidate'] desc=Numeric field for policy tenure.
25
+ - age_of_car: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of car.
26
+ - age_of_policyholder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of policyholder.
27
+ - area_cluster: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for area cluster.
28
+ - population_density: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for population density.
29
+ - make: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for make.
30
+ - segment: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for segment.
31
+ - model: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for model.
32
+ - fuel_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for fuel type.
33
+ - max_torque: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max torque.
34
+ - max_power: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max power.
35
+ - engine_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for engine type.
36
+ - airbags: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for airbags.
37
+ - is_esc: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is esc.
38
+ - is_adjustable_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is adjustable steering.
39
+ - is_tpms: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is tpms.
40
+ - is_parking_sensors: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking sensors.
41
+ - is_parking_camera: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking camera.
42
+ - rear_brakes_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for rear brakes type.
43
+ - displacement: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for displacement.
44
+ - cylinder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for cylinder.
45
+ - transmission_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for transmission type.
46
+ - gear_box: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gear box.
47
+ - steering_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for steering type.
48
+ - turning_radius: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for turning radius.
49
+ - length: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for length.
50
+ - width: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for width.
51
+ - height: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for height.
52
+ - gross_weight: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gross weight.
53
+ - is_front_fog_lights: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is front fog lights.
54
+ - is_rear_window_wiper: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window wiper.
55
+ - is_rear_window_washer: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window washer.
56
+ - is_rear_window_defogger: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window defogger.
57
+ - is_brake_assist: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is brake assist.
58
+ - is_power_door_locks: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power door locks.
59
+ - is_central_locking: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is central locking.
60
+ - is_power_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power steering.
61
+ - is_driver_seat_height_adjustable: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is driver seat height adjustable.
62
+ - is_day_night_rear_view_mirror: role=target, type=binary_target. tags=['subgroup_candidate', 'condition_candidate', 'target_candidate'] desc=Target field for is day night rear view mirror.
63
+ - is_ecw: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is ecw.
64
+ - is_speed_alert: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is speed alert.
65
+ - ncap_rating: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for ncap rating.
66
+ - is_claim: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is claim.
67
+ - useful_field_combinations: [['age_of_car', 'age_of_policyholder', 'is_day_night_rear_view_mirror'], ['age_of_car', 'policy_tenure', 'is_day_night_rear_view_mirror'], ['policy_tenure', 'age_of_car', 'is_day_night_rear_view_mirror']]
68
+ - fields_requiring_caution: ['is_day_night_rear_view_mirror', 'policy_tenure']
69
+ - source_url: https://www.kaggle.com/datasets/ifteshanajnin/carinsuranceclaimprediction-classification
70
+
71
+ SQLite schema snapshot:
72
+ {
73
+ "table_name": "m2",
74
+ "quoted_table_name": "\"m2\"",
75
+ "row_count": 58592,
76
+ "columns": [
77
+ {
78
+ "name": "policy_id",
79
+ "type": "TEXT",
80
+ "notnull": false,
81
+ "pk": false
82
+ },
83
+ {
84
+ "name": "policy_tenure",
85
+ "type": "TEXT",
86
+ "notnull": false,
87
+ "pk": false
88
+ },
89
+ {
90
+ "name": "age_of_car",
91
+ "type": "TEXT",
92
+ "notnull": false,
93
+ "pk": false
94
+ },
95
+ {
96
+ "name": "age_of_policyholder",
97
+ "type": "TEXT",
98
+ "notnull": false,
99
+ "pk": false
100
+ },
101
+ {
102
+ "name": "area_cluster",
103
+ "type": "TEXT",
104
+ "notnull": false,
105
+ "pk": false
106
+ },
107
+ {
108
+ "name": "population_density",
109
+ "type": "TEXT",
110
+ "notnull": false,
111
+ "pk": false
112
+ },
113
+ {
114
+ "name": "make",
115
+ "type": "TEXT",
116
+ "notnull": false,
117
+ "pk": false
118
+ },
119
+ {
120
+ "name": "segment",
121
+ "type": "TEXT",
122
+ "notnull": false,
123
+ "pk": false
124
+ },
125
+ {
126
+ "name": "model",
127
+ "type": "TEXT",
128
+ "notnull": false,
129
+ "pk": false
130
+ },
131
+ {
132
+ "name": "fuel_type",
133
+ "type": "TEXT",
134
+ "notnull": false,
135
+ "pk": false
136
+ },
137
+ {
138
+ "name": "max_torque",
139
+ "type": "TEXT",
140
+ "notnull": false,
141
+ "pk": false
142
+ },
143
+ {
144
+ "name": "max_power",
145
+ "type": "TEXT",
146
+ "notnull": false,
147
+ "pk": false
148
+ },
149
+ {
150
+ "name": "engine_type",
151
+ "type": "TEXT",
152
+ "notnull": false,
153
+ "pk": false
154
+ },
155
+ {
156
+ "name": "airbags",
157
+ "type": "TEXT",
158
+ "notnull": false,
159
+ "pk": false
160
+ },
161
+ {
162
+ "name": "is_esc",
163
+ "type": "TEXT",
164
+ "notnull": false,
165
+ "pk": false
166
+ },
167
+ {
168
+ "name": "is_adjustable_steering",
169
+ "type": "TEXT",
170
+ "notnull": false,
171
+ "pk": false
172
+ },
173
+ {
174
+ "name": "is_tpms",
175
+ "type": "TEXT",
176
+ "notnull": false,
177
+ "pk": false
178
+ },
179
+ {
180
+ "name": "is_parking_sensors",
181
+ "type": "TEXT",
182
+ "notnull": false,
183
+ "pk": false
184
+ },
185
+ {
186
+ "name": "is_parking_camera",
187
+ "type": "TEXT",
188
+ "notnull": false,
189
+ "pk": false
190
+ },
191
+ {
192
+ "name": "rear_brakes_type",
193
+ "type": "TEXT",
194
+ "notnull": false,
195
+ "pk": false
196
+ },
197
+ {
198
+ "name": "displacement",
199
+ "type": "TEXT",
200
+ "notnull": false,
201
+ "pk": false
202
+ },
203
+ {
204
+ "name": "cylinder",
205
+ "type": "TEXT",
206
+ "notnull": false,
207
+ "pk": false
208
+ },
209
+ {
210
+ "name": "transmission_type",
211
+ "type": "TEXT",
212
+ "notnull": false,
213
+ "pk": false
214
+ },
215
+ {
216
+ "name": "gear_box",
217
+ "type": "TEXT",
218
+ "notnull": false,
219
+ "pk": false
220
+ },
221
+ {
222
+ "name": "steering_type",
223
+ "type": "TEXT",
224
+ "notnull": false,
225
+ "pk": false
226
+ },
227
+ {
228
+ "name": "turning_radius",
229
+ "type": "TEXT",
230
+ "notnull": false,
231
+ "pk": false
232
+ },
233
+ {
234
+ "name": "length",
235
+ "type": "TEXT",
236
+ "notnull": false,
237
+ "pk": false
238
+ },
239
+ {
240
+ "name": "width",
241
+ "type": "TEXT",
242
+ "notnull": false,
243
+ "pk": false
244
+ },
245
+ {
246
+ "name": "height",
247
+ "type": "TEXT",
248
+ "notnull": false,
249
+ "pk": false
250
+ },
251
+ {
252
+ "name": "gross_weight",
253
+ "type": "TEXT",
254
+ "notnull": false,
255
+ "pk": false
256
+ },
257
+ {
258
+ "name": "is_front_fog_lights",
259
+ "type": "TEXT",
260
+ "notnull": false,
261
+ "pk": false
262
+ },
263
+ {
264
+ "name": "is_rear_window_wiper",
265
+ "type": "TEXT",
266
+ "notnull": false,
267
+ "pk": false
268
+ },
269
+ {
270
+ "name": "is_rear_window_washer",
271
+ "type": "TEXT",
272
+ "notnull": false,
273
+ "pk": false
274
+ },
275
+ {
276
+ "name": "is_rear_window_defogger",
277
+ "type": "TEXT",
278
+ "notnull": false,
279
+ "pk": false
280
+ },
281
+ {
282
+ "name": "is_brake_assist",
283
+ "type": "TEXT",
284
+ "notnull": false,
285
+ "pk": false
286
+ },
287
+ {
288
+ "name": "is_power_door_locks",
289
+ "type": "TEXT",
290
+ "notnull": false,
291
+ "pk": false
292
+ },
293
+ {
294
+ "name": "is_central_locking",
295
+ "type": "TEXT",
296
+ "notnull": false,
297
+ "pk": false
298
+ },
299
+ {
300
+ "name": "is_power_steering",
301
+ "type": "TEXT",
302
+ "notnull": false,
303
+ "pk": false
304
+ },
305
+ {
306
+ "name": "is_driver_seat_height_adjustable",
307
+ "type": "TEXT",
308
+ "notnull": false,
309
+ "pk": false
310
+ },
311
+ {
312
+ "name": "is_day_night_rear_view_mirror",
313
+ "type": "TEXT",
314
+ "notnull": false,
315
+ "pk": false
316
+ },
317
+ {
318
+ "name": "is_ecw",
319
+ "type": "TEXT",
320
+ "notnull": false,
321
+ "pk": false
322
+ },
323
+ {
324
+ "name": "is_speed_alert",
325
+ "type": "TEXT",
326
+ "notnull": false,
327
+ "pk": false
328
+ },
329
+ {
330
+ "name": "ncap_rating",
331
+ "type": "TEXT",
332
+ "notnull": false,
333
+ "pk": false
334
+ },
335
+ {
336
+ "name": "is_claim",
337
+ "type": "TEXT",
338
+ "notnull": false,
339
+ "pk": false
340
+ }
341
+ ],
342
+ "sample_rows": [
343
+ {
344
+ "policy_id": "ID00001",
345
+ "policy_tenure": "0.515873589958172",
346
+ "age_of_car": "0.05",
347
+ "age_of_policyholder": "0.644230769230769",
348
+ "area_cluster": "C1",
349
+ "population_density": "4990",
350
+ "make": "1",
351
+ "segment": "A",
352
+ "model": "M1",
353
+ "fuel_type": "CNG",
354
+ "max_torque": "60Nm@3500rpm",
355
+ "max_power": "40.36bhp@6000rpm",
356
+ "engine_type": "F8D Petrol Engine",
357
+ "airbags": "2",
358
+ "is_esc": "No",
359
+ "is_adjustable_steering": "No",
360
+ "is_tpms": "No",
361
+ "is_parking_sensors": "Yes",
362
+ "is_parking_camera": "No",
363
+ "rear_brakes_type": "Drum",
364
+ "displacement": "796",
365
+ "cylinder": "3",
366
+ "transmission_type": "Manual",
367
+ "gear_box": "5",
368
+ "steering_type": "Power",
369
+ "turning_radius": "4.6",
370
+ "length": "3445",
371
+ "width": "1515",
372
+ "height": "1475",
373
+ "gross_weight": "1185",
374
+ "is_front_fog_lights": "No",
375
+ "is_rear_window_wiper": "No",
376
+ "is_rear_window_washer": "No",
377
+ "is_rear_window_defogger": "No",
378
+ "is_brake_assist": "No",
379
+ "is_power_door_locks": "No",
380
+ "is_central_locking": "No",
381
+ "is_power_steering": "Yes",
382
+ "is_driver_seat_height_adjustable": "No",
383
+ "is_day_night_rear_view_mirror": "No",
384
+ "is_ecw": "No",
385
+ "is_speed_alert": "Yes",
386
+ "ncap_rating": "0",
387
+ "is_claim": "0"
388
+ },
389
+ {
390
+ "policy_id": "ID00002",
391
+ "policy_tenure": "0.672618513547733",
392
+ "age_of_car": "0.02",
393
+ "age_of_policyholder": "0.375",
394
+ "area_cluster": "C2",
395
+ "population_density": "27003",
396
+ "make": "1",
397
+ "segment": "A",
398
+ "model": "M1",
399
+ "fuel_type": "CNG",
400
+ "max_torque": "60Nm@3500rpm",
401
+ "max_power": "40.36bhp@6000rpm",
402
+ "engine_type": "F8D Petrol Engine",
403
+ "airbags": "2",
404
+ "is_esc": "No",
405
+ "is_adjustable_steering": "No",
406
+ "is_tpms": "No",
407
+ "is_parking_sensors": "Yes",
408
+ "is_parking_camera": "No",
409
+ "rear_brakes_type": "Drum",
410
+ "displacement": "796",
411
+ "cylinder": "3",
412
+ "transmission_type": "Manual",
413
+ "gear_box": "5",
414
+ "steering_type": "Power",
415
+ "turning_radius": "4.6",
416
+ "length": "3445",
417
+ "width": "1515",
418
+ "height": "1475",
419
+ "gross_weight": "1185",
420
+ "is_front_fog_lights": "No",
421
+ "is_rear_window_wiper": "No",
422
+ "is_rear_window_washer": "No",
423
+ "is_rear_window_defogger": "No",
424
+ "is_brake_assist": "No",
425
+ "is_power_door_locks": "No",
426
+ "is_central_locking": "No",
427
+ "is_power_steering": "Yes",
428
+ "is_driver_seat_height_adjustable": "No",
429
+ "is_day_night_rear_view_mirror": "No",
430
+ "is_ecw": "No",
431
+ "is_speed_alert": "Yes",
432
+ "ncap_rating": "0",
433
+ "is_claim": "0"
434
+ },
435
+ {
436
+ "policy_id": "ID00003",
437
+ "policy_tenure": "0.841110255796233",
438
+ "age_of_car": "0.02",
439
+ "age_of_policyholder": "0.384615384615385",
440
+ "area_cluster": "C3",
441
+ "population_density": "4076",
442
+ "make": "1",
443
+ "segment": "A",
444
+ "model": "M1",
445
+ "fuel_type": "CNG",
446
+ "max_torque": "60Nm@3500rpm",
447
+ "max_power": "40.36bhp@6000rpm",
448
+ "engine_type": "F8D Petrol Engine",
449
+ "airbags": "2",
450
+ "is_esc": "No",
451
+ "is_adjustable_steering": "No",
452
+ "is_tpms": "No",
453
+ "is_parking_sensors": "Yes",
454
+ "is_parking_camera": "No",
455
+ "rear_brakes_type": "Drum",
456
+ "displacement": "796",
457
+ "cylinder": "3",
458
+ "transmission_type": "Manual",
459
+ "gear_box": "5",
460
+ "steering_type": "Power",
461
+ "turning_radius": "4.6",
462
+ "length": "3445",
463
+ "width": "1515",
464
+ "height": "1475",
465
+ "gross_weight": "1185",
466
+ "is_front_fog_lights": "No",
467
+ "is_rear_window_wiper": "No",
468
+ "is_rear_window_washer": "No",
469
+ "is_rear_window_defogger": "No",
470
+ "is_brake_assist": "No",
471
+ "is_power_door_locks": "No",
472
+ "is_central_locking": "No",
473
+ "is_power_steering": "Yes",
474
+ "is_driver_seat_height_adjustable": "No",
475
+ "is_day_night_rear_view_mirror": "No",
476
+ "is_ecw": "No",
477
+ "is_speed_alert": "Yes",
478
+ "ncap_rating": "0",
479
+ "is_claim": "0"
480
+ },
481
+ {
482
+ "policy_id": "ID00004",
483
+ "policy_tenure": "0.900276558749967",
484
+ "age_of_car": "0.11",
485
+ "age_of_policyholder": "0.432692307692308",
486
+ "area_cluster": "C4",
487
+ "population_density": "21622",
488
+ "make": "1",
489
+ "segment": "C1",
490
+ "model": "M2",
491
+ "fuel_type": "Petrol",
492
+ "max_torque": "113Nm@4400rpm",
493
+ "max_power": "88.50bhp@6000rpm",
494
+ "engine_type": "1.2 L K12N Dualjet",
495
+ "airbags": "2",
496
+ "is_esc": "Yes",
497
+ "is_adjustable_steering": "Yes",
498
+ "is_tpms": "No",
499
+ "is_parking_sensors": "Yes",
500
+ "is_parking_camera": "Yes",
501
+ "rear_brakes_type": "Drum",
502
+ "displacement": "1197",
503
+ "cylinder": "4",
504
+ "transmission_type": "Automatic",
505
+ "gear_box": "5",
506
+ "steering_type": "Electric",
507
+ "turning_radius": "4.8",
508
+ "length": "3995",
509
+ "width": "1735",
510
+ "height": "1515",
511
+ "gross_weight": "1335",
512
+ "is_front_fog_lights": "Yes",
513
+ "is_rear_window_wiper": "No",
514
+ "is_rear_window_washer": "No",
515
+ "is_rear_window_defogger": "Yes",
516
+ "is_brake_assist": "Yes",
517
+ "is_power_door_locks": "Yes",
518
+ "is_central_locking": "Yes",
519
+ "is_power_steering": "Yes",
520
+ "is_driver_seat_height_adjustable": "Yes",
521
+ "is_day_night_rear_view_mirror": "Yes",
522
+ "is_ecw": "Yes",
523
+ "is_speed_alert": "Yes",
524
+ "ncap_rating": "2",
525
+ "is_claim": "0"
526
+ },
527
+ {
528
+ "policy_id": "ID00005",
529
+ "policy_tenure": "0.596402813108729",
530
+ "age_of_car": "0.11",
531
+ "age_of_policyholder": "0.634615384615385",
532
+ "area_cluster": "C5",
533
+ "population_density": "34738",
534
+ "make": "2",
535
+ "segment": "A",
536
+ "model": "M3",
537
+ "fuel_type": "Petrol",
538
+ "max_torque": "91Nm@4250rpm",
539
+ "max_power": "67.06bhp@5500rpm",
540
+ "engine_type": "1.0 SCe",
541
+ "airbags": "2",
542
+ "is_esc": "No",
543
+ "is_adjustable_steering": "No",
544
+ "is_tpms": "No",
545
+ "is_parking_sensors": "No",
546
+ "is_parking_camera": "Yes",
547
+ "rear_brakes_type": "Drum",
548
+ "displacement": "999",
549
+ "cylinder": "3",
550
+ "transmission_type": "Automatic",
551
+ "gear_box": "5",
552
+ "steering_type": "Electric",
553
+ "turning_radius": "5",
554
+ "length": "3731",
555
+ "width": "1579",
556
+ "height": "1490",
557
+ "gross_weight": "1155",
558
+ "is_front_fog_lights": "No",
559
+ "is_rear_window_wiper": "No",
560
+ "is_rear_window_washer": "No",
561
+ "is_rear_window_defogger": "No",
562
+ "is_brake_assist": "No",
563
+ "is_power_door_locks": "Yes",
564
+ "is_central_locking": "Yes",
565
+ "is_power_steering": "Yes",
566
+ "is_driver_seat_height_adjustable": "No",
567
+ "is_day_night_rear_view_mirror": "Yes",
568
+ "is_ecw": "Yes",
569
+ "is_speed_alert": "Yes",
570
+ "ncap_rating": "2",
571
+ "is_claim": "0"
572
+ }
573
+ ]
574
+ }
575
+
576
+ Shortlisted templates:
577
+ [
578
+ {
579
+ "template_id": "tpl_tpcds_within_group_share",
580
+ "template_name": "Within-Group Share of Total",
581
+ "primary_family": "conditional_dependency_structure",
582
+ "portability": "partial",
583
+ "sql_skeleton": "SELECT {group_col}, {item_col},\n SUM({measure_col}) AS total_measure,\n SUM({measure_col}) * 100.0 / SUM(SUM({measure_col})) OVER (PARTITION BY {group_col}) AS share_within_group\nFROM {table}\nGROUP BY {group_col}, {item_col}\nORDER BY share_within_group DESC;",
584
+ "required_roles": [
585
+ "group_col",
586
+ "item_col",
587
+ "measure_col"
588
+ ]
589
+ }
590
+ ]
591
+
592
+ Problem instance:
593
+ {
594
+ "dataset_id": "m2",
595
+ "question": "Use template Within-Group Share of Total to probe dependency_strength_similarity with semantic role within_group_proportion. Focus on group_col=is_central_locking, measure_col=make.",
596
+ "planned_template_id": "tpl_tpcds_within_group_share",
597
+ "bindings": {
598
+ "group_col": "is_central_locking",
599
+ "measure_col": "make",
600
+ "item_col": "population_density",
601
+ "top_k": 14,
602
+ "top_n": 5,
603
+ "num_tiles": 10,
604
+ "percentile_value": 0.95,
605
+ "z_threshold": 2.0,
606
+ "fraction_threshold": 0.1,
607
+ "baseline_multiplier": 1.5,
608
+ "baseline_fraction": 0.1,
609
+ "min_group_size": 5,
610
+ "min_support": 5,
611
+ "measure_threshold": 3.0,
612
+ "time_grain": "month",
613
+ "lookback_rows": 3,
614
+ "current_period_start": "'2024-01-01'",
615
+ "current_period_end": "'2024-04-01'",
616
+ "previous_period_start": "'2023-10-01'",
617
+ "previous_period_end": "'2024-01-01'",
618
+ "drift_ratio_threshold": 0.8
619
+ },
620
+ "can_vary": [],
621
+ "must_fix": [],
622
+ "runtime_sql_skeleton": "SELECT {group_col}, {item_col},\n SUM({measure_col}) AS total_measure,\n SUM({measure_col}) * 100.0 / SUM(SUM({measure_col})) OVER (PARTITION BY {group_col}) AS share_within_group\nFROM {table}\nGROUP BY {group_col}, {item_col}\nORDER BY share_within_group DESC;"
623
+ }
624
+
625
+ Repair context:
626
+ {}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_response_attempt_1.raw.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e4103-0ef9-7621-92ac-c42f7e0edacf"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_response_attempt_1.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e4103-0ef9-7621-92ac-c42f7e0edacf"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_response_attempt_2.raw.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e4103-1f7b-74d1-903e-7da4ab766bcc"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_response_attempt_2.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e4103-1f7b-74d1-903e-7da4ab766bcc"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_stderr_attempt_1.txt ADDED
File without changes
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1429c26d6fc0f93a/cli/sql_stderr_attempt_2.txt ADDED
File without changes
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_attempt_1.metadata.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attempt": 1,
3
+ "phase": "sql_generation",
4
+ "command": "codex exec --skip-git-repo-check --disable plugins --sandbox read-only --cd \"/data/jialinzhang/SQLagent\" -m gpt-5.4 --json -",
5
+ "started_at": "2026-05-19T16:18:03.437120+00:00",
6
+ "ended_at": "2026-05-19T16:18:08.853283+00:00",
7
+ "elapsed_ms": 5416.11,
8
+ "returncode": 1,
9
+ "prompt_metrics": {
10
+ "chars": 22124,
11
+ "bytes_utf8": 22124,
12
+ "lines": 624,
13
+ "estimated_tokens": null
14
+ },
15
+ "stdout_metrics": {
16
+ "chars": 281,
17
+ "bytes_utf8": 281,
18
+ "lines": 4,
19
+ "estimated_tokens": null
20
+ },
21
+ "stderr_metrics": {
22
+ "chars": 0,
23
+ "bytes_utf8": 0,
24
+ "lines": 0,
25
+ "estimated_tokens": null
26
+ },
27
+ "parsed_output": {
28
+ "format": "jsonl_events",
29
+ "text_metrics": {
30
+ "chars": 280,
31
+ "bytes_utf8": 280,
32
+ "lines": 4,
33
+ "estimated_tokens": null
34
+ },
35
+ "usage": {}
36
+ },
37
+ "status": "failed",
38
+ "error": "AI CLI command failed with exit code 1: ",
39
+ "prompt_path": "cli/sql_prompt_attempt_1.txt",
40
+ "response_path": "cli/sql_response_attempt_1.txt",
41
+ "raw_response_path": "cli/sql_response_attempt_1.raw.txt",
42
+ "stderr_path": "cli/sql_stderr_attempt_1.txt"
43
+ }
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_attempt_2.metadata.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attempt": 2,
3
+ "phase": "sql_generation",
4
+ "command": "codex exec --skip-git-repo-check --disable plugins --sandbox read-only --cd \"/data/jialinzhang/SQLagent\" -m gpt-5.4 --json -",
5
+ "started_at": "2026-05-19T16:18:09.855770+00:00",
6
+ "ended_at": "2026-05-19T16:18:13.826807+00:00",
7
+ "elapsed_ms": 3970.99,
8
+ "returncode": 1,
9
+ "prompt_metrics": {
10
+ "chars": 22124,
11
+ "bytes_utf8": 22124,
12
+ "lines": 624,
13
+ "estimated_tokens": null
14
+ },
15
+ "stdout_metrics": {
16
+ "chars": 281,
17
+ "bytes_utf8": 281,
18
+ "lines": 4,
19
+ "estimated_tokens": null
20
+ },
21
+ "stderr_metrics": {
22
+ "chars": 0,
23
+ "bytes_utf8": 0,
24
+ "lines": 0,
25
+ "estimated_tokens": null
26
+ },
27
+ "parsed_output": {
28
+ "format": "jsonl_events",
29
+ "text_metrics": {
30
+ "chars": 280,
31
+ "bytes_utf8": 280,
32
+ "lines": 4,
33
+ "estimated_tokens": null
34
+ },
35
+ "usage": {}
36
+ },
37
+ "status": "failed",
38
+ "error": "AI CLI command failed with exit code 1: ",
39
+ "prompt_path": "cli/sql_prompt_attempt_2.txt",
40
+ "response_path": "cli/sql_response_attempt_2.txt",
41
+ "raw_response_path": "cli/sql_response_attempt_2.raw.txt",
42
+ "stderr_path": "cli/sql_stderr_attempt_2.txt"
43
+ }
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_prompt_attempt_1.txt ADDED
@@ -0,0 +1,624 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are generating one SQLite SELECT query for a single-table SQL QA task.
2
+ Return strict JSON only, with this schema: {"sql": "...", "notes": "..."}.
3
+ Rules:
4
+ - Use only the provided table and columns.
5
+ - Do not write INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, PRAGMA, ATTACH, DETACH, or VACUUM.
6
+ - Prefer the planned template and bound roles when provided.
7
+ - Add a leading SQL comment exactly like: -- template_id: <planned_template_id>.
8
+ - Generate SQLite-compatible SQL. SQLite does not support PERCENTILE_CONT or STDDEV.
9
+ - Quote identifiers with double quotes.
10
+ - Return no markdown and no extra prose.
11
+
12
+ Dataset context:
13
+ Dataset context for SQL QA:
14
+ - dataset_id: m2
15
+ - dataset_name: Carinsuranceclaimprediction Classification
16
+ - table_name: m2
17
+ - table_layout: single-table dataset (do not assume joins).
18
+ - row_semantics: One row is one tabular observation with 43 feature columns and target `is_day_night_rear_view_mirror`.
19
+ - task_type: classification
20
+ - target_column: is_day_night_rear_view_mirror
21
+ - main_row_count: 58592
22
+ - important_fields:
23
+ - policy_id: role=feature, type=identifier_string. tags=['identifier', 'probe_exclude', 'high_cardinality_candidate'] desc=Identifier-like field for policy id.
24
+ - policy_tenure: role=feature, type=numeric. tags=['condition_candidate', 'measure', 'high_cardinality_candidate'] desc=Numeric field for policy tenure.
25
+ - age_of_car: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of car.
26
+ - age_of_policyholder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of policyholder.
27
+ - area_cluster: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for area cluster.
28
+ - population_density: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for population density.
29
+ - make: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for make.
30
+ - segment: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for segment.
31
+ - model: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for model.
32
+ - fuel_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for fuel type.
33
+ - max_torque: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max torque.
34
+ - max_power: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max power.
35
+ - engine_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for engine type.
36
+ - airbags: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for airbags.
37
+ - is_esc: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is esc.
38
+ - is_adjustable_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is adjustable steering.
39
+ - is_tpms: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is tpms.
40
+ - is_parking_sensors: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking sensors.
41
+ - is_parking_camera: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking camera.
42
+ - rear_brakes_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for rear brakes type.
43
+ - displacement: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for displacement.
44
+ - cylinder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for cylinder.
45
+ - transmission_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for transmission type.
46
+ - gear_box: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gear box.
47
+ - steering_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for steering type.
48
+ - turning_radius: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for turning radius.
49
+ - length: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for length.
50
+ - width: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for width.
51
+ - height: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for height.
52
+ - gross_weight: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gross weight.
53
+ - is_front_fog_lights: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is front fog lights.
54
+ - is_rear_window_wiper: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window wiper.
55
+ - is_rear_window_washer: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window washer.
56
+ - is_rear_window_defogger: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window defogger.
57
+ - is_brake_assist: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is brake assist.
58
+ - is_power_door_locks: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power door locks.
59
+ - is_central_locking: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is central locking.
60
+ - is_power_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power steering.
61
+ - is_driver_seat_height_adjustable: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is driver seat height adjustable.
62
+ - is_day_night_rear_view_mirror: role=target, type=binary_target. tags=['subgroup_candidate', 'condition_candidate', 'target_candidate'] desc=Target field for is day night rear view mirror.
63
+ - is_ecw: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is ecw.
64
+ - is_speed_alert: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is speed alert.
65
+ - ncap_rating: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for ncap rating.
66
+ - is_claim: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is claim.
67
+ - useful_field_combinations: [['age_of_car', 'age_of_policyholder', 'is_day_night_rear_view_mirror'], ['age_of_car', 'policy_tenure', 'is_day_night_rear_view_mirror'], ['policy_tenure', 'age_of_car', 'is_day_night_rear_view_mirror']]
68
+ - fields_requiring_caution: ['is_day_night_rear_view_mirror', 'policy_tenure']
69
+ - source_url: https://www.kaggle.com/datasets/ifteshanajnin/carinsuranceclaimprediction-classification
70
+
71
+ SQLite schema snapshot:
72
+ {
73
+ "table_name": "m2",
74
+ "quoted_table_name": "\"m2\"",
75
+ "row_count": 58592,
76
+ "columns": [
77
+ {
78
+ "name": "policy_id",
79
+ "type": "TEXT",
80
+ "notnull": false,
81
+ "pk": false
82
+ },
83
+ {
84
+ "name": "policy_tenure",
85
+ "type": "TEXT",
86
+ "notnull": false,
87
+ "pk": false
88
+ },
89
+ {
90
+ "name": "age_of_car",
91
+ "type": "TEXT",
92
+ "notnull": false,
93
+ "pk": false
94
+ },
95
+ {
96
+ "name": "age_of_policyholder",
97
+ "type": "TEXT",
98
+ "notnull": false,
99
+ "pk": false
100
+ },
101
+ {
102
+ "name": "area_cluster",
103
+ "type": "TEXT",
104
+ "notnull": false,
105
+ "pk": false
106
+ },
107
+ {
108
+ "name": "population_density",
109
+ "type": "TEXT",
110
+ "notnull": false,
111
+ "pk": false
112
+ },
113
+ {
114
+ "name": "make",
115
+ "type": "TEXT",
116
+ "notnull": false,
117
+ "pk": false
118
+ },
119
+ {
120
+ "name": "segment",
121
+ "type": "TEXT",
122
+ "notnull": false,
123
+ "pk": false
124
+ },
125
+ {
126
+ "name": "model",
127
+ "type": "TEXT",
128
+ "notnull": false,
129
+ "pk": false
130
+ },
131
+ {
132
+ "name": "fuel_type",
133
+ "type": "TEXT",
134
+ "notnull": false,
135
+ "pk": false
136
+ },
137
+ {
138
+ "name": "max_torque",
139
+ "type": "TEXT",
140
+ "notnull": false,
141
+ "pk": false
142
+ },
143
+ {
144
+ "name": "max_power",
145
+ "type": "TEXT",
146
+ "notnull": false,
147
+ "pk": false
148
+ },
149
+ {
150
+ "name": "engine_type",
151
+ "type": "TEXT",
152
+ "notnull": false,
153
+ "pk": false
154
+ },
155
+ {
156
+ "name": "airbags",
157
+ "type": "TEXT",
158
+ "notnull": false,
159
+ "pk": false
160
+ },
161
+ {
162
+ "name": "is_esc",
163
+ "type": "TEXT",
164
+ "notnull": false,
165
+ "pk": false
166
+ },
167
+ {
168
+ "name": "is_adjustable_steering",
169
+ "type": "TEXT",
170
+ "notnull": false,
171
+ "pk": false
172
+ },
173
+ {
174
+ "name": "is_tpms",
175
+ "type": "TEXT",
176
+ "notnull": false,
177
+ "pk": false
178
+ },
179
+ {
180
+ "name": "is_parking_sensors",
181
+ "type": "TEXT",
182
+ "notnull": false,
183
+ "pk": false
184
+ },
185
+ {
186
+ "name": "is_parking_camera",
187
+ "type": "TEXT",
188
+ "notnull": false,
189
+ "pk": false
190
+ },
191
+ {
192
+ "name": "rear_brakes_type",
193
+ "type": "TEXT",
194
+ "notnull": false,
195
+ "pk": false
196
+ },
197
+ {
198
+ "name": "displacement",
199
+ "type": "TEXT",
200
+ "notnull": false,
201
+ "pk": false
202
+ },
203
+ {
204
+ "name": "cylinder",
205
+ "type": "TEXT",
206
+ "notnull": false,
207
+ "pk": false
208
+ },
209
+ {
210
+ "name": "transmission_type",
211
+ "type": "TEXT",
212
+ "notnull": false,
213
+ "pk": false
214
+ },
215
+ {
216
+ "name": "gear_box",
217
+ "type": "TEXT",
218
+ "notnull": false,
219
+ "pk": false
220
+ },
221
+ {
222
+ "name": "steering_type",
223
+ "type": "TEXT",
224
+ "notnull": false,
225
+ "pk": false
226
+ },
227
+ {
228
+ "name": "turning_radius",
229
+ "type": "TEXT",
230
+ "notnull": false,
231
+ "pk": false
232
+ },
233
+ {
234
+ "name": "length",
235
+ "type": "TEXT",
236
+ "notnull": false,
237
+ "pk": false
238
+ },
239
+ {
240
+ "name": "width",
241
+ "type": "TEXT",
242
+ "notnull": false,
243
+ "pk": false
244
+ },
245
+ {
246
+ "name": "height",
247
+ "type": "TEXT",
248
+ "notnull": false,
249
+ "pk": false
250
+ },
251
+ {
252
+ "name": "gross_weight",
253
+ "type": "TEXT",
254
+ "notnull": false,
255
+ "pk": false
256
+ },
257
+ {
258
+ "name": "is_front_fog_lights",
259
+ "type": "TEXT",
260
+ "notnull": false,
261
+ "pk": false
262
+ },
263
+ {
264
+ "name": "is_rear_window_wiper",
265
+ "type": "TEXT",
266
+ "notnull": false,
267
+ "pk": false
268
+ },
269
+ {
270
+ "name": "is_rear_window_washer",
271
+ "type": "TEXT",
272
+ "notnull": false,
273
+ "pk": false
274
+ },
275
+ {
276
+ "name": "is_rear_window_defogger",
277
+ "type": "TEXT",
278
+ "notnull": false,
279
+ "pk": false
280
+ },
281
+ {
282
+ "name": "is_brake_assist",
283
+ "type": "TEXT",
284
+ "notnull": false,
285
+ "pk": false
286
+ },
287
+ {
288
+ "name": "is_power_door_locks",
289
+ "type": "TEXT",
290
+ "notnull": false,
291
+ "pk": false
292
+ },
293
+ {
294
+ "name": "is_central_locking",
295
+ "type": "TEXT",
296
+ "notnull": false,
297
+ "pk": false
298
+ },
299
+ {
300
+ "name": "is_power_steering",
301
+ "type": "TEXT",
302
+ "notnull": false,
303
+ "pk": false
304
+ },
305
+ {
306
+ "name": "is_driver_seat_height_adjustable",
307
+ "type": "TEXT",
308
+ "notnull": false,
309
+ "pk": false
310
+ },
311
+ {
312
+ "name": "is_day_night_rear_view_mirror",
313
+ "type": "TEXT",
314
+ "notnull": false,
315
+ "pk": false
316
+ },
317
+ {
318
+ "name": "is_ecw",
319
+ "type": "TEXT",
320
+ "notnull": false,
321
+ "pk": false
322
+ },
323
+ {
324
+ "name": "is_speed_alert",
325
+ "type": "TEXT",
326
+ "notnull": false,
327
+ "pk": false
328
+ },
329
+ {
330
+ "name": "ncap_rating",
331
+ "type": "TEXT",
332
+ "notnull": false,
333
+ "pk": false
334
+ },
335
+ {
336
+ "name": "is_claim",
337
+ "type": "TEXT",
338
+ "notnull": false,
339
+ "pk": false
340
+ }
341
+ ],
342
+ "sample_rows": [
343
+ {
344
+ "policy_id": "ID00001",
345
+ "policy_tenure": "0.515873589958172",
346
+ "age_of_car": "0.05",
347
+ "age_of_policyholder": "0.644230769230769",
348
+ "area_cluster": "C1",
349
+ "population_density": "4990",
350
+ "make": "1",
351
+ "segment": "A",
352
+ "model": "M1",
353
+ "fuel_type": "CNG",
354
+ "max_torque": "60Nm@3500rpm",
355
+ "max_power": "40.36bhp@6000rpm",
356
+ "engine_type": "F8D Petrol Engine",
357
+ "airbags": "2",
358
+ "is_esc": "No",
359
+ "is_adjustable_steering": "No",
360
+ "is_tpms": "No",
361
+ "is_parking_sensors": "Yes",
362
+ "is_parking_camera": "No",
363
+ "rear_brakes_type": "Drum",
364
+ "displacement": "796",
365
+ "cylinder": "3",
366
+ "transmission_type": "Manual",
367
+ "gear_box": "5",
368
+ "steering_type": "Power",
369
+ "turning_radius": "4.6",
370
+ "length": "3445",
371
+ "width": "1515",
372
+ "height": "1475",
373
+ "gross_weight": "1185",
374
+ "is_front_fog_lights": "No",
375
+ "is_rear_window_wiper": "No",
376
+ "is_rear_window_washer": "No",
377
+ "is_rear_window_defogger": "No",
378
+ "is_brake_assist": "No",
379
+ "is_power_door_locks": "No",
380
+ "is_central_locking": "No",
381
+ "is_power_steering": "Yes",
382
+ "is_driver_seat_height_adjustable": "No",
383
+ "is_day_night_rear_view_mirror": "No",
384
+ "is_ecw": "No",
385
+ "is_speed_alert": "Yes",
386
+ "ncap_rating": "0",
387
+ "is_claim": "0"
388
+ },
389
+ {
390
+ "policy_id": "ID00002",
391
+ "policy_tenure": "0.672618513547733",
392
+ "age_of_car": "0.02",
393
+ "age_of_policyholder": "0.375",
394
+ "area_cluster": "C2",
395
+ "population_density": "27003",
396
+ "make": "1",
397
+ "segment": "A",
398
+ "model": "M1",
399
+ "fuel_type": "CNG",
400
+ "max_torque": "60Nm@3500rpm",
401
+ "max_power": "40.36bhp@6000rpm",
402
+ "engine_type": "F8D Petrol Engine",
403
+ "airbags": "2",
404
+ "is_esc": "No",
405
+ "is_adjustable_steering": "No",
406
+ "is_tpms": "No",
407
+ "is_parking_sensors": "Yes",
408
+ "is_parking_camera": "No",
409
+ "rear_brakes_type": "Drum",
410
+ "displacement": "796",
411
+ "cylinder": "3",
412
+ "transmission_type": "Manual",
413
+ "gear_box": "5",
414
+ "steering_type": "Power",
415
+ "turning_radius": "4.6",
416
+ "length": "3445",
417
+ "width": "1515",
418
+ "height": "1475",
419
+ "gross_weight": "1185",
420
+ "is_front_fog_lights": "No",
421
+ "is_rear_window_wiper": "No",
422
+ "is_rear_window_washer": "No",
423
+ "is_rear_window_defogger": "No",
424
+ "is_brake_assist": "No",
425
+ "is_power_door_locks": "No",
426
+ "is_central_locking": "No",
427
+ "is_power_steering": "Yes",
428
+ "is_driver_seat_height_adjustable": "No",
429
+ "is_day_night_rear_view_mirror": "No",
430
+ "is_ecw": "No",
431
+ "is_speed_alert": "Yes",
432
+ "ncap_rating": "0",
433
+ "is_claim": "0"
434
+ },
435
+ {
436
+ "policy_id": "ID00003",
437
+ "policy_tenure": "0.841110255796233",
438
+ "age_of_car": "0.02",
439
+ "age_of_policyholder": "0.384615384615385",
440
+ "area_cluster": "C3",
441
+ "population_density": "4076",
442
+ "make": "1",
443
+ "segment": "A",
444
+ "model": "M1",
445
+ "fuel_type": "CNG",
446
+ "max_torque": "60Nm@3500rpm",
447
+ "max_power": "40.36bhp@6000rpm",
448
+ "engine_type": "F8D Petrol Engine",
449
+ "airbags": "2",
450
+ "is_esc": "No",
451
+ "is_adjustable_steering": "No",
452
+ "is_tpms": "No",
453
+ "is_parking_sensors": "Yes",
454
+ "is_parking_camera": "No",
455
+ "rear_brakes_type": "Drum",
456
+ "displacement": "796",
457
+ "cylinder": "3",
458
+ "transmission_type": "Manual",
459
+ "gear_box": "5",
460
+ "steering_type": "Power",
461
+ "turning_radius": "4.6",
462
+ "length": "3445",
463
+ "width": "1515",
464
+ "height": "1475",
465
+ "gross_weight": "1185",
466
+ "is_front_fog_lights": "No",
467
+ "is_rear_window_wiper": "No",
468
+ "is_rear_window_washer": "No",
469
+ "is_rear_window_defogger": "No",
470
+ "is_brake_assist": "No",
471
+ "is_power_door_locks": "No",
472
+ "is_central_locking": "No",
473
+ "is_power_steering": "Yes",
474
+ "is_driver_seat_height_adjustable": "No",
475
+ "is_day_night_rear_view_mirror": "No",
476
+ "is_ecw": "No",
477
+ "is_speed_alert": "Yes",
478
+ "ncap_rating": "0",
479
+ "is_claim": "0"
480
+ },
481
+ {
482
+ "policy_id": "ID00004",
483
+ "policy_tenure": "0.900276558749967",
484
+ "age_of_car": "0.11",
485
+ "age_of_policyholder": "0.432692307692308",
486
+ "area_cluster": "C4",
487
+ "population_density": "21622",
488
+ "make": "1",
489
+ "segment": "C1",
490
+ "model": "M2",
491
+ "fuel_type": "Petrol",
492
+ "max_torque": "113Nm@4400rpm",
493
+ "max_power": "88.50bhp@6000rpm",
494
+ "engine_type": "1.2 L K12N Dualjet",
495
+ "airbags": "2",
496
+ "is_esc": "Yes",
497
+ "is_adjustable_steering": "Yes",
498
+ "is_tpms": "No",
499
+ "is_parking_sensors": "Yes",
500
+ "is_parking_camera": "Yes",
501
+ "rear_brakes_type": "Drum",
502
+ "displacement": "1197",
503
+ "cylinder": "4",
504
+ "transmission_type": "Automatic",
505
+ "gear_box": "5",
506
+ "steering_type": "Electric",
507
+ "turning_radius": "4.8",
508
+ "length": "3995",
509
+ "width": "1735",
510
+ "height": "1515",
511
+ "gross_weight": "1335",
512
+ "is_front_fog_lights": "Yes",
513
+ "is_rear_window_wiper": "No",
514
+ "is_rear_window_washer": "No",
515
+ "is_rear_window_defogger": "Yes",
516
+ "is_brake_assist": "Yes",
517
+ "is_power_door_locks": "Yes",
518
+ "is_central_locking": "Yes",
519
+ "is_power_steering": "Yes",
520
+ "is_driver_seat_height_adjustable": "Yes",
521
+ "is_day_night_rear_view_mirror": "Yes",
522
+ "is_ecw": "Yes",
523
+ "is_speed_alert": "Yes",
524
+ "ncap_rating": "2",
525
+ "is_claim": "0"
526
+ },
527
+ {
528
+ "policy_id": "ID00005",
529
+ "policy_tenure": "0.596402813108729",
530
+ "age_of_car": "0.11",
531
+ "age_of_policyholder": "0.634615384615385",
532
+ "area_cluster": "C5",
533
+ "population_density": "34738",
534
+ "make": "2",
535
+ "segment": "A",
536
+ "model": "M3",
537
+ "fuel_type": "Petrol",
538
+ "max_torque": "91Nm@4250rpm",
539
+ "max_power": "67.06bhp@5500rpm",
540
+ "engine_type": "1.0 SCe",
541
+ "airbags": "2",
542
+ "is_esc": "No",
543
+ "is_adjustable_steering": "No",
544
+ "is_tpms": "No",
545
+ "is_parking_sensors": "No",
546
+ "is_parking_camera": "Yes",
547
+ "rear_brakes_type": "Drum",
548
+ "displacement": "999",
549
+ "cylinder": "3",
550
+ "transmission_type": "Automatic",
551
+ "gear_box": "5",
552
+ "steering_type": "Electric",
553
+ "turning_radius": "5",
554
+ "length": "3731",
555
+ "width": "1579",
556
+ "height": "1490",
557
+ "gross_weight": "1155",
558
+ "is_front_fog_lights": "No",
559
+ "is_rear_window_wiper": "No",
560
+ "is_rear_window_washer": "No",
561
+ "is_rear_window_defogger": "No",
562
+ "is_brake_assist": "No",
563
+ "is_power_door_locks": "Yes",
564
+ "is_central_locking": "Yes",
565
+ "is_power_steering": "Yes",
566
+ "is_driver_seat_height_adjustable": "No",
567
+ "is_day_night_rear_view_mirror": "Yes",
568
+ "is_ecw": "Yes",
569
+ "is_speed_alert": "Yes",
570
+ "ncap_rating": "2",
571
+ "is_claim": "0"
572
+ }
573
+ ]
574
+ }
575
+
576
+ Shortlisted templates:
577
+ [
578
+ {
579
+ "template_id": "tpl_tpch_relative_total_threshold",
580
+ "template_name": "Relative-to-Total Extreme Threshold",
581
+ "primary_family": "tail_rarity_structure",
582
+ "portability": "partial",
583
+ "sql_skeleton": "WITH grouped AS (\n SELECT {group_col}, SUM({measure_col}) AS group_value\n FROM {table}\n GROUP BY {group_col}\n), total AS (\n SELECT SUM(group_value) AS total_value\n FROM grouped\n)\nSELECT g.{group_col}, g.group_value\nFROM grouped AS g\nCROSS JOIN total AS t\nWHERE g.group_value > t.total_value * {fraction_threshold}\nORDER BY g.group_value DESC;",
584
+ "required_roles": [
585
+ "group_col",
586
+ "measure_col"
587
+ ]
588
+ }
589
+ ]
590
+
591
+ Problem instance:
592
+ {
593
+ "dataset_id": "m2",
594
+ "question": "Use template Relative-to-Total Extreme Threshold to probe tail_mass_similarity with semantic role count_distribution. Focus on group_col=is_power_door_locks, measure_col=policy_tenure.",
595
+ "planned_template_id": "tpl_tpch_relative_total_threshold",
596
+ "bindings": {
597
+ "group_col": "is_power_door_locks",
598
+ "measure_col": "policy_tenure",
599
+ "top_k": 15,
600
+ "top_n": 7,
601
+ "num_tiles": 10,
602
+ "percentile_value": 0.95,
603
+ "z_threshold": 2.0,
604
+ "fraction_threshold": 0.05,
605
+ "baseline_multiplier": 1.75,
606
+ "baseline_fraction": 0.1,
607
+ "min_group_size": 5,
608
+ "min_support": 4,
609
+ "measure_threshold": 0.904032,
610
+ "time_grain": "month",
611
+ "lookback_rows": 3,
612
+ "current_period_start": "'2024-01-01'",
613
+ "current_period_end": "'2024-04-01'",
614
+ "previous_period_start": "'2023-10-01'",
615
+ "previous_period_end": "'2024-01-01'",
616
+ "drift_ratio_threshold": 0.8
617
+ },
618
+ "can_vary": [],
619
+ "must_fix": [],
620
+ "runtime_sql_skeleton": "WITH grouped AS (\n SELECT {group_col}, SUM({measure_col}) AS group_value\n FROM {table}\n GROUP BY {group_col}\n), total AS (\n SELECT SUM(group_value) AS total_value\n FROM grouped\n)\nSELECT g.{group_col}, g.group_value\nFROM grouped AS g\nCROSS JOIN total AS t\nWHERE g.group_value > t.total_value * {fraction_threshold}\nORDER BY g.group_value DESC;"
621
+ }
622
+
623
+ Repair context:
624
+ {}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_prompt_attempt_2.txt ADDED
@@ -0,0 +1,624 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are generating one SQLite SELECT query for a single-table SQL QA task.
2
+ Return strict JSON only, with this schema: {"sql": "...", "notes": "..."}.
3
+ Rules:
4
+ - Use only the provided table and columns.
5
+ - Do not write INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, PRAGMA, ATTACH, DETACH, or VACUUM.
6
+ - Prefer the planned template and bound roles when provided.
7
+ - Add a leading SQL comment exactly like: -- template_id: <planned_template_id>.
8
+ - Generate SQLite-compatible SQL. SQLite does not support PERCENTILE_CONT or STDDEV.
9
+ - Quote identifiers with double quotes.
10
+ - Return no markdown and no extra prose.
11
+
12
+ Dataset context:
13
+ Dataset context for SQL QA:
14
+ - dataset_id: m2
15
+ - dataset_name: Carinsuranceclaimprediction Classification
16
+ - table_name: m2
17
+ - table_layout: single-table dataset (do not assume joins).
18
+ - row_semantics: One row is one tabular observation with 43 feature columns and target `is_day_night_rear_view_mirror`.
19
+ - task_type: classification
20
+ - target_column: is_day_night_rear_view_mirror
21
+ - main_row_count: 58592
22
+ - important_fields:
23
+ - policy_id: role=feature, type=identifier_string. tags=['identifier', 'probe_exclude', 'high_cardinality_candidate'] desc=Identifier-like field for policy id.
24
+ - policy_tenure: role=feature, type=numeric. tags=['condition_candidate', 'measure', 'high_cardinality_candidate'] desc=Numeric field for policy tenure.
25
+ - age_of_car: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of car.
26
+ - age_of_policyholder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of policyholder.
27
+ - area_cluster: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for area cluster.
28
+ - population_density: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for population density.
29
+ - make: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for make.
30
+ - segment: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for segment.
31
+ - model: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for model.
32
+ - fuel_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for fuel type.
33
+ - max_torque: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max torque.
34
+ - max_power: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max power.
35
+ - engine_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for engine type.
36
+ - airbags: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for airbags.
37
+ - is_esc: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is esc.
38
+ - is_adjustable_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is adjustable steering.
39
+ - is_tpms: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is tpms.
40
+ - is_parking_sensors: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking sensors.
41
+ - is_parking_camera: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking camera.
42
+ - rear_brakes_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for rear brakes type.
43
+ - displacement: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for displacement.
44
+ - cylinder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for cylinder.
45
+ - transmission_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for transmission type.
46
+ - gear_box: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gear box.
47
+ - steering_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for steering type.
48
+ - turning_radius: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for turning radius.
49
+ - length: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for length.
50
+ - width: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for width.
51
+ - height: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for height.
52
+ - gross_weight: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gross weight.
53
+ - is_front_fog_lights: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is front fog lights.
54
+ - is_rear_window_wiper: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window wiper.
55
+ - is_rear_window_washer: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window washer.
56
+ - is_rear_window_defogger: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window defogger.
57
+ - is_brake_assist: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is brake assist.
58
+ - is_power_door_locks: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power door locks.
59
+ - is_central_locking: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is central locking.
60
+ - is_power_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power steering.
61
+ - is_driver_seat_height_adjustable: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is driver seat height adjustable.
62
+ - is_day_night_rear_view_mirror: role=target, type=binary_target. tags=['subgroup_candidate', 'condition_candidate', 'target_candidate'] desc=Target field for is day night rear view mirror.
63
+ - is_ecw: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is ecw.
64
+ - is_speed_alert: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is speed alert.
65
+ - ncap_rating: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for ncap rating.
66
+ - is_claim: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is claim.
67
+ - useful_field_combinations: [['age_of_car', 'age_of_policyholder', 'is_day_night_rear_view_mirror'], ['age_of_car', 'policy_tenure', 'is_day_night_rear_view_mirror'], ['policy_tenure', 'age_of_car', 'is_day_night_rear_view_mirror']]
68
+ - fields_requiring_caution: ['is_day_night_rear_view_mirror', 'policy_tenure']
69
+ - source_url: https://www.kaggle.com/datasets/ifteshanajnin/carinsuranceclaimprediction-classification
70
+
71
+ SQLite schema snapshot:
72
+ {
73
+ "table_name": "m2",
74
+ "quoted_table_name": "\"m2\"",
75
+ "row_count": 58592,
76
+ "columns": [
77
+ {
78
+ "name": "policy_id",
79
+ "type": "TEXT",
80
+ "notnull": false,
81
+ "pk": false
82
+ },
83
+ {
84
+ "name": "policy_tenure",
85
+ "type": "TEXT",
86
+ "notnull": false,
87
+ "pk": false
88
+ },
89
+ {
90
+ "name": "age_of_car",
91
+ "type": "TEXT",
92
+ "notnull": false,
93
+ "pk": false
94
+ },
95
+ {
96
+ "name": "age_of_policyholder",
97
+ "type": "TEXT",
98
+ "notnull": false,
99
+ "pk": false
100
+ },
101
+ {
102
+ "name": "area_cluster",
103
+ "type": "TEXT",
104
+ "notnull": false,
105
+ "pk": false
106
+ },
107
+ {
108
+ "name": "population_density",
109
+ "type": "TEXT",
110
+ "notnull": false,
111
+ "pk": false
112
+ },
113
+ {
114
+ "name": "make",
115
+ "type": "TEXT",
116
+ "notnull": false,
117
+ "pk": false
118
+ },
119
+ {
120
+ "name": "segment",
121
+ "type": "TEXT",
122
+ "notnull": false,
123
+ "pk": false
124
+ },
125
+ {
126
+ "name": "model",
127
+ "type": "TEXT",
128
+ "notnull": false,
129
+ "pk": false
130
+ },
131
+ {
132
+ "name": "fuel_type",
133
+ "type": "TEXT",
134
+ "notnull": false,
135
+ "pk": false
136
+ },
137
+ {
138
+ "name": "max_torque",
139
+ "type": "TEXT",
140
+ "notnull": false,
141
+ "pk": false
142
+ },
143
+ {
144
+ "name": "max_power",
145
+ "type": "TEXT",
146
+ "notnull": false,
147
+ "pk": false
148
+ },
149
+ {
150
+ "name": "engine_type",
151
+ "type": "TEXT",
152
+ "notnull": false,
153
+ "pk": false
154
+ },
155
+ {
156
+ "name": "airbags",
157
+ "type": "TEXT",
158
+ "notnull": false,
159
+ "pk": false
160
+ },
161
+ {
162
+ "name": "is_esc",
163
+ "type": "TEXT",
164
+ "notnull": false,
165
+ "pk": false
166
+ },
167
+ {
168
+ "name": "is_adjustable_steering",
169
+ "type": "TEXT",
170
+ "notnull": false,
171
+ "pk": false
172
+ },
173
+ {
174
+ "name": "is_tpms",
175
+ "type": "TEXT",
176
+ "notnull": false,
177
+ "pk": false
178
+ },
179
+ {
180
+ "name": "is_parking_sensors",
181
+ "type": "TEXT",
182
+ "notnull": false,
183
+ "pk": false
184
+ },
185
+ {
186
+ "name": "is_parking_camera",
187
+ "type": "TEXT",
188
+ "notnull": false,
189
+ "pk": false
190
+ },
191
+ {
192
+ "name": "rear_brakes_type",
193
+ "type": "TEXT",
194
+ "notnull": false,
195
+ "pk": false
196
+ },
197
+ {
198
+ "name": "displacement",
199
+ "type": "TEXT",
200
+ "notnull": false,
201
+ "pk": false
202
+ },
203
+ {
204
+ "name": "cylinder",
205
+ "type": "TEXT",
206
+ "notnull": false,
207
+ "pk": false
208
+ },
209
+ {
210
+ "name": "transmission_type",
211
+ "type": "TEXT",
212
+ "notnull": false,
213
+ "pk": false
214
+ },
215
+ {
216
+ "name": "gear_box",
217
+ "type": "TEXT",
218
+ "notnull": false,
219
+ "pk": false
220
+ },
221
+ {
222
+ "name": "steering_type",
223
+ "type": "TEXT",
224
+ "notnull": false,
225
+ "pk": false
226
+ },
227
+ {
228
+ "name": "turning_radius",
229
+ "type": "TEXT",
230
+ "notnull": false,
231
+ "pk": false
232
+ },
233
+ {
234
+ "name": "length",
235
+ "type": "TEXT",
236
+ "notnull": false,
237
+ "pk": false
238
+ },
239
+ {
240
+ "name": "width",
241
+ "type": "TEXT",
242
+ "notnull": false,
243
+ "pk": false
244
+ },
245
+ {
246
+ "name": "height",
247
+ "type": "TEXT",
248
+ "notnull": false,
249
+ "pk": false
250
+ },
251
+ {
252
+ "name": "gross_weight",
253
+ "type": "TEXT",
254
+ "notnull": false,
255
+ "pk": false
256
+ },
257
+ {
258
+ "name": "is_front_fog_lights",
259
+ "type": "TEXT",
260
+ "notnull": false,
261
+ "pk": false
262
+ },
263
+ {
264
+ "name": "is_rear_window_wiper",
265
+ "type": "TEXT",
266
+ "notnull": false,
267
+ "pk": false
268
+ },
269
+ {
270
+ "name": "is_rear_window_washer",
271
+ "type": "TEXT",
272
+ "notnull": false,
273
+ "pk": false
274
+ },
275
+ {
276
+ "name": "is_rear_window_defogger",
277
+ "type": "TEXT",
278
+ "notnull": false,
279
+ "pk": false
280
+ },
281
+ {
282
+ "name": "is_brake_assist",
283
+ "type": "TEXT",
284
+ "notnull": false,
285
+ "pk": false
286
+ },
287
+ {
288
+ "name": "is_power_door_locks",
289
+ "type": "TEXT",
290
+ "notnull": false,
291
+ "pk": false
292
+ },
293
+ {
294
+ "name": "is_central_locking",
295
+ "type": "TEXT",
296
+ "notnull": false,
297
+ "pk": false
298
+ },
299
+ {
300
+ "name": "is_power_steering",
301
+ "type": "TEXT",
302
+ "notnull": false,
303
+ "pk": false
304
+ },
305
+ {
306
+ "name": "is_driver_seat_height_adjustable",
307
+ "type": "TEXT",
308
+ "notnull": false,
309
+ "pk": false
310
+ },
311
+ {
312
+ "name": "is_day_night_rear_view_mirror",
313
+ "type": "TEXT",
314
+ "notnull": false,
315
+ "pk": false
316
+ },
317
+ {
318
+ "name": "is_ecw",
319
+ "type": "TEXT",
320
+ "notnull": false,
321
+ "pk": false
322
+ },
323
+ {
324
+ "name": "is_speed_alert",
325
+ "type": "TEXT",
326
+ "notnull": false,
327
+ "pk": false
328
+ },
329
+ {
330
+ "name": "ncap_rating",
331
+ "type": "TEXT",
332
+ "notnull": false,
333
+ "pk": false
334
+ },
335
+ {
336
+ "name": "is_claim",
337
+ "type": "TEXT",
338
+ "notnull": false,
339
+ "pk": false
340
+ }
341
+ ],
342
+ "sample_rows": [
343
+ {
344
+ "policy_id": "ID00001",
345
+ "policy_tenure": "0.515873589958172",
346
+ "age_of_car": "0.05",
347
+ "age_of_policyholder": "0.644230769230769",
348
+ "area_cluster": "C1",
349
+ "population_density": "4990",
350
+ "make": "1",
351
+ "segment": "A",
352
+ "model": "M1",
353
+ "fuel_type": "CNG",
354
+ "max_torque": "60Nm@3500rpm",
355
+ "max_power": "40.36bhp@6000rpm",
356
+ "engine_type": "F8D Petrol Engine",
357
+ "airbags": "2",
358
+ "is_esc": "No",
359
+ "is_adjustable_steering": "No",
360
+ "is_tpms": "No",
361
+ "is_parking_sensors": "Yes",
362
+ "is_parking_camera": "No",
363
+ "rear_brakes_type": "Drum",
364
+ "displacement": "796",
365
+ "cylinder": "3",
366
+ "transmission_type": "Manual",
367
+ "gear_box": "5",
368
+ "steering_type": "Power",
369
+ "turning_radius": "4.6",
370
+ "length": "3445",
371
+ "width": "1515",
372
+ "height": "1475",
373
+ "gross_weight": "1185",
374
+ "is_front_fog_lights": "No",
375
+ "is_rear_window_wiper": "No",
376
+ "is_rear_window_washer": "No",
377
+ "is_rear_window_defogger": "No",
378
+ "is_brake_assist": "No",
379
+ "is_power_door_locks": "No",
380
+ "is_central_locking": "No",
381
+ "is_power_steering": "Yes",
382
+ "is_driver_seat_height_adjustable": "No",
383
+ "is_day_night_rear_view_mirror": "No",
384
+ "is_ecw": "No",
385
+ "is_speed_alert": "Yes",
386
+ "ncap_rating": "0",
387
+ "is_claim": "0"
388
+ },
389
+ {
390
+ "policy_id": "ID00002",
391
+ "policy_tenure": "0.672618513547733",
392
+ "age_of_car": "0.02",
393
+ "age_of_policyholder": "0.375",
394
+ "area_cluster": "C2",
395
+ "population_density": "27003",
396
+ "make": "1",
397
+ "segment": "A",
398
+ "model": "M1",
399
+ "fuel_type": "CNG",
400
+ "max_torque": "60Nm@3500rpm",
401
+ "max_power": "40.36bhp@6000rpm",
402
+ "engine_type": "F8D Petrol Engine",
403
+ "airbags": "2",
404
+ "is_esc": "No",
405
+ "is_adjustable_steering": "No",
406
+ "is_tpms": "No",
407
+ "is_parking_sensors": "Yes",
408
+ "is_parking_camera": "No",
409
+ "rear_brakes_type": "Drum",
410
+ "displacement": "796",
411
+ "cylinder": "3",
412
+ "transmission_type": "Manual",
413
+ "gear_box": "5",
414
+ "steering_type": "Power",
415
+ "turning_radius": "4.6",
416
+ "length": "3445",
417
+ "width": "1515",
418
+ "height": "1475",
419
+ "gross_weight": "1185",
420
+ "is_front_fog_lights": "No",
421
+ "is_rear_window_wiper": "No",
422
+ "is_rear_window_washer": "No",
423
+ "is_rear_window_defogger": "No",
424
+ "is_brake_assist": "No",
425
+ "is_power_door_locks": "No",
426
+ "is_central_locking": "No",
427
+ "is_power_steering": "Yes",
428
+ "is_driver_seat_height_adjustable": "No",
429
+ "is_day_night_rear_view_mirror": "No",
430
+ "is_ecw": "No",
431
+ "is_speed_alert": "Yes",
432
+ "ncap_rating": "0",
433
+ "is_claim": "0"
434
+ },
435
+ {
436
+ "policy_id": "ID00003",
437
+ "policy_tenure": "0.841110255796233",
438
+ "age_of_car": "0.02",
439
+ "age_of_policyholder": "0.384615384615385",
440
+ "area_cluster": "C3",
441
+ "population_density": "4076",
442
+ "make": "1",
443
+ "segment": "A",
444
+ "model": "M1",
445
+ "fuel_type": "CNG",
446
+ "max_torque": "60Nm@3500rpm",
447
+ "max_power": "40.36bhp@6000rpm",
448
+ "engine_type": "F8D Petrol Engine",
449
+ "airbags": "2",
450
+ "is_esc": "No",
451
+ "is_adjustable_steering": "No",
452
+ "is_tpms": "No",
453
+ "is_parking_sensors": "Yes",
454
+ "is_parking_camera": "No",
455
+ "rear_brakes_type": "Drum",
456
+ "displacement": "796",
457
+ "cylinder": "3",
458
+ "transmission_type": "Manual",
459
+ "gear_box": "5",
460
+ "steering_type": "Power",
461
+ "turning_radius": "4.6",
462
+ "length": "3445",
463
+ "width": "1515",
464
+ "height": "1475",
465
+ "gross_weight": "1185",
466
+ "is_front_fog_lights": "No",
467
+ "is_rear_window_wiper": "No",
468
+ "is_rear_window_washer": "No",
469
+ "is_rear_window_defogger": "No",
470
+ "is_brake_assist": "No",
471
+ "is_power_door_locks": "No",
472
+ "is_central_locking": "No",
473
+ "is_power_steering": "Yes",
474
+ "is_driver_seat_height_adjustable": "No",
475
+ "is_day_night_rear_view_mirror": "No",
476
+ "is_ecw": "No",
477
+ "is_speed_alert": "Yes",
478
+ "ncap_rating": "0",
479
+ "is_claim": "0"
480
+ },
481
+ {
482
+ "policy_id": "ID00004",
483
+ "policy_tenure": "0.900276558749967",
484
+ "age_of_car": "0.11",
485
+ "age_of_policyholder": "0.432692307692308",
486
+ "area_cluster": "C4",
487
+ "population_density": "21622",
488
+ "make": "1",
489
+ "segment": "C1",
490
+ "model": "M2",
491
+ "fuel_type": "Petrol",
492
+ "max_torque": "113Nm@4400rpm",
493
+ "max_power": "88.50bhp@6000rpm",
494
+ "engine_type": "1.2 L K12N Dualjet",
495
+ "airbags": "2",
496
+ "is_esc": "Yes",
497
+ "is_adjustable_steering": "Yes",
498
+ "is_tpms": "No",
499
+ "is_parking_sensors": "Yes",
500
+ "is_parking_camera": "Yes",
501
+ "rear_brakes_type": "Drum",
502
+ "displacement": "1197",
503
+ "cylinder": "4",
504
+ "transmission_type": "Automatic",
505
+ "gear_box": "5",
506
+ "steering_type": "Electric",
507
+ "turning_radius": "4.8",
508
+ "length": "3995",
509
+ "width": "1735",
510
+ "height": "1515",
511
+ "gross_weight": "1335",
512
+ "is_front_fog_lights": "Yes",
513
+ "is_rear_window_wiper": "No",
514
+ "is_rear_window_washer": "No",
515
+ "is_rear_window_defogger": "Yes",
516
+ "is_brake_assist": "Yes",
517
+ "is_power_door_locks": "Yes",
518
+ "is_central_locking": "Yes",
519
+ "is_power_steering": "Yes",
520
+ "is_driver_seat_height_adjustable": "Yes",
521
+ "is_day_night_rear_view_mirror": "Yes",
522
+ "is_ecw": "Yes",
523
+ "is_speed_alert": "Yes",
524
+ "ncap_rating": "2",
525
+ "is_claim": "0"
526
+ },
527
+ {
528
+ "policy_id": "ID00005",
529
+ "policy_tenure": "0.596402813108729",
530
+ "age_of_car": "0.11",
531
+ "age_of_policyholder": "0.634615384615385",
532
+ "area_cluster": "C5",
533
+ "population_density": "34738",
534
+ "make": "2",
535
+ "segment": "A",
536
+ "model": "M3",
537
+ "fuel_type": "Petrol",
538
+ "max_torque": "91Nm@4250rpm",
539
+ "max_power": "67.06bhp@5500rpm",
540
+ "engine_type": "1.0 SCe",
541
+ "airbags": "2",
542
+ "is_esc": "No",
543
+ "is_adjustable_steering": "No",
544
+ "is_tpms": "No",
545
+ "is_parking_sensors": "No",
546
+ "is_parking_camera": "Yes",
547
+ "rear_brakes_type": "Drum",
548
+ "displacement": "999",
549
+ "cylinder": "3",
550
+ "transmission_type": "Automatic",
551
+ "gear_box": "5",
552
+ "steering_type": "Electric",
553
+ "turning_radius": "5",
554
+ "length": "3731",
555
+ "width": "1579",
556
+ "height": "1490",
557
+ "gross_weight": "1155",
558
+ "is_front_fog_lights": "No",
559
+ "is_rear_window_wiper": "No",
560
+ "is_rear_window_washer": "No",
561
+ "is_rear_window_defogger": "No",
562
+ "is_brake_assist": "No",
563
+ "is_power_door_locks": "Yes",
564
+ "is_central_locking": "Yes",
565
+ "is_power_steering": "Yes",
566
+ "is_driver_seat_height_adjustable": "No",
567
+ "is_day_night_rear_view_mirror": "Yes",
568
+ "is_ecw": "Yes",
569
+ "is_speed_alert": "Yes",
570
+ "ncap_rating": "2",
571
+ "is_claim": "0"
572
+ }
573
+ ]
574
+ }
575
+
576
+ Shortlisted templates:
577
+ [
578
+ {
579
+ "template_id": "tpl_tpch_relative_total_threshold",
580
+ "template_name": "Relative-to-Total Extreme Threshold",
581
+ "primary_family": "tail_rarity_structure",
582
+ "portability": "partial",
583
+ "sql_skeleton": "WITH grouped AS (\n SELECT {group_col}, SUM({measure_col}) AS group_value\n FROM {table}\n GROUP BY {group_col}\n), total AS (\n SELECT SUM(group_value) AS total_value\n FROM grouped\n)\nSELECT g.{group_col}, g.group_value\nFROM grouped AS g\nCROSS JOIN total AS t\nWHERE g.group_value > t.total_value * {fraction_threshold}\nORDER BY g.group_value DESC;",
584
+ "required_roles": [
585
+ "group_col",
586
+ "measure_col"
587
+ ]
588
+ }
589
+ ]
590
+
591
+ Problem instance:
592
+ {
593
+ "dataset_id": "m2",
594
+ "question": "Use template Relative-to-Total Extreme Threshold to probe tail_mass_similarity with semantic role count_distribution. Focus on group_col=is_power_door_locks, measure_col=policy_tenure.",
595
+ "planned_template_id": "tpl_tpch_relative_total_threshold",
596
+ "bindings": {
597
+ "group_col": "is_power_door_locks",
598
+ "measure_col": "policy_tenure",
599
+ "top_k": 15,
600
+ "top_n": 7,
601
+ "num_tiles": 10,
602
+ "percentile_value": 0.95,
603
+ "z_threshold": 2.0,
604
+ "fraction_threshold": 0.05,
605
+ "baseline_multiplier": 1.75,
606
+ "baseline_fraction": 0.1,
607
+ "min_group_size": 5,
608
+ "min_support": 4,
609
+ "measure_threshold": 0.904032,
610
+ "time_grain": "month",
611
+ "lookback_rows": 3,
612
+ "current_period_start": "'2024-01-01'",
613
+ "current_period_end": "'2024-04-01'",
614
+ "previous_period_start": "'2023-10-01'",
615
+ "previous_period_end": "'2024-01-01'",
616
+ "drift_ratio_threshold": 0.8
617
+ },
618
+ "can_vary": [],
619
+ "must_fix": [],
620
+ "runtime_sql_skeleton": "WITH grouped AS (\n SELECT {group_col}, SUM({measure_col}) AS group_value\n FROM {table}\n GROUP BY {group_col}\n), total AS (\n SELECT SUM(group_value) AS total_value\n FROM grouped\n)\nSELECT g.{group_col}, g.group_value\nFROM grouped AS g\nCROSS JOIN total AS t\nWHERE g.group_value > t.total_value * {fraction_threshold}\nORDER BY g.group_value DESC;"
621
+ }
622
+
623
+ Repair context:
624
+ {}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_response_attempt_1.raw.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e4107-b196-7b93-afdd-ae0874e45521"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_response_attempt_1.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e4107-b196-7b93-afdd-ae0874e45521"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_response_attempt_2.raw.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e4107-caad-71d2-a39e-f5ac79ccf9c5"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_response_attempt_2.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e4107-caad-71d2-a39e-f5ac79ccf9c5"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_stderr_attempt_1.txt ADDED
File without changes
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_18a2e5d3c9857218/cli/sql_stderr_attempt_2.txt ADDED
File without changes
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_attempt_1.metadata.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attempt": 1,
3
+ "phase": "sql_generation",
4
+ "command": "codex exec --skip-git-repo-check --disable plugins --sandbox read-only --cd \"/data/jialinzhang/SQLagent\" -m gpt-5.4 --json -",
5
+ "started_at": "2026-05-19T16:29:40.978461+00:00",
6
+ "ended_at": "2026-05-19T16:29:44.284126+00:00",
7
+ "elapsed_ms": 3305.61,
8
+ "returncode": 1,
9
+ "prompt_metrics": {
10
+ "chars": 21627,
11
+ "bytes_utf8": 21627,
12
+ "lines": 624,
13
+ "estimated_tokens": null
14
+ },
15
+ "stdout_metrics": {
16
+ "chars": 281,
17
+ "bytes_utf8": 281,
18
+ "lines": 4,
19
+ "estimated_tokens": null
20
+ },
21
+ "stderr_metrics": {
22
+ "chars": 0,
23
+ "bytes_utf8": 0,
24
+ "lines": 0,
25
+ "estimated_tokens": null
26
+ },
27
+ "parsed_output": {
28
+ "format": "jsonl_events",
29
+ "text_metrics": {
30
+ "chars": 280,
31
+ "bytes_utf8": 280,
32
+ "lines": 4,
33
+ "estimated_tokens": null
34
+ },
35
+ "usage": {}
36
+ },
37
+ "status": "failed",
38
+ "error": "AI CLI command failed with exit code 1: ",
39
+ "prompt_path": "cli/sql_prompt_attempt_1.txt",
40
+ "response_path": "cli/sql_response_attempt_1.txt",
41
+ "raw_response_path": "cli/sql_response_attempt_1.raw.txt",
42
+ "stderr_path": "cli/sql_stderr_attempt_1.txt"
43
+ }
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_attempt_2.metadata.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attempt": 2,
3
+ "phase": "sql_generation",
4
+ "command": "codex exec --skip-git-repo-check --disable plugins --sandbox read-only --cd \"/data/jialinzhang/SQLagent\" -m gpt-5.4 --json -",
5
+ "started_at": "2026-05-19T16:29:45.286922+00:00",
6
+ "ended_at": "2026-05-19T16:29:48.770478+00:00",
7
+ "elapsed_ms": 3483.49,
8
+ "returncode": 1,
9
+ "prompt_metrics": {
10
+ "chars": 21627,
11
+ "bytes_utf8": 21627,
12
+ "lines": 624,
13
+ "estimated_tokens": null
14
+ },
15
+ "stdout_metrics": {
16
+ "chars": 281,
17
+ "bytes_utf8": 281,
18
+ "lines": 4,
19
+ "estimated_tokens": null
20
+ },
21
+ "stderr_metrics": {
22
+ "chars": 0,
23
+ "bytes_utf8": 0,
24
+ "lines": 0,
25
+ "estimated_tokens": null
26
+ },
27
+ "parsed_output": {
28
+ "format": "jsonl_events",
29
+ "text_metrics": {
30
+ "chars": 280,
31
+ "bytes_utf8": 280,
32
+ "lines": 4,
33
+ "estimated_tokens": null
34
+ },
35
+ "usage": {}
36
+ },
37
+ "status": "failed",
38
+ "error": "AI CLI command failed with exit code 1: ",
39
+ "prompt_path": "cli/sql_prompt_attempt_2.txt",
40
+ "response_path": "cli/sql_response_attempt_2.txt",
41
+ "raw_response_path": "cli/sql_response_attempt_2.raw.txt",
42
+ "stderr_path": "cli/sql_stderr_attempt_2.txt"
43
+ }
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_prompt_attempt_1.txt ADDED
@@ -0,0 +1,624 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are generating one SQLite SELECT query for a single-table SQL QA task.
2
+ Return strict JSON only, with this schema: {"sql": "...", "notes": "..."}.
3
+ Rules:
4
+ - Use only the provided table and columns.
5
+ - Do not write INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, PRAGMA, ATTACH, DETACH, or VACUUM.
6
+ - Prefer the planned template and bound roles when provided.
7
+ - Add a leading SQL comment exactly like: -- template_id: <planned_template_id>.
8
+ - Generate SQLite-compatible SQL. SQLite does not support PERCENTILE_CONT or STDDEV.
9
+ - Quote identifiers with double quotes.
10
+ - Return no markdown and no extra prose.
11
+
12
+ Dataset context:
13
+ Dataset context for SQL QA:
14
+ - dataset_id: m2
15
+ - dataset_name: Carinsuranceclaimprediction Classification
16
+ - table_name: m2
17
+ - table_layout: single-table dataset (do not assume joins).
18
+ - row_semantics: One row is one tabular observation with 43 feature columns and target `is_day_night_rear_view_mirror`.
19
+ - task_type: classification
20
+ - target_column: is_day_night_rear_view_mirror
21
+ - main_row_count: 58592
22
+ - important_fields:
23
+ - policy_id: role=feature, type=identifier_string. tags=['identifier', 'probe_exclude', 'high_cardinality_candidate'] desc=Identifier-like field for policy id.
24
+ - policy_tenure: role=feature, type=numeric. tags=['condition_candidate', 'measure', 'high_cardinality_candidate'] desc=Numeric field for policy tenure.
25
+ - age_of_car: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of car.
26
+ - age_of_policyholder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of policyholder.
27
+ - area_cluster: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for area cluster.
28
+ - population_density: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for population density.
29
+ - make: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for make.
30
+ - segment: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for segment.
31
+ - model: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for model.
32
+ - fuel_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for fuel type.
33
+ - max_torque: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max torque.
34
+ - max_power: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max power.
35
+ - engine_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for engine type.
36
+ - airbags: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for airbags.
37
+ - is_esc: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is esc.
38
+ - is_adjustable_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is adjustable steering.
39
+ - is_tpms: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is tpms.
40
+ - is_parking_sensors: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking sensors.
41
+ - is_parking_camera: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking camera.
42
+ - rear_brakes_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for rear brakes type.
43
+ - displacement: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for displacement.
44
+ - cylinder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for cylinder.
45
+ - transmission_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for transmission type.
46
+ - gear_box: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gear box.
47
+ - steering_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for steering type.
48
+ - turning_radius: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for turning radius.
49
+ - length: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for length.
50
+ - width: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for width.
51
+ - height: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for height.
52
+ - gross_weight: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gross weight.
53
+ - is_front_fog_lights: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is front fog lights.
54
+ - is_rear_window_wiper: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window wiper.
55
+ - is_rear_window_washer: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window washer.
56
+ - is_rear_window_defogger: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window defogger.
57
+ - is_brake_assist: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is brake assist.
58
+ - is_power_door_locks: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power door locks.
59
+ - is_central_locking: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is central locking.
60
+ - is_power_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power steering.
61
+ - is_driver_seat_height_adjustable: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is driver seat height adjustable.
62
+ - is_day_night_rear_view_mirror: role=target, type=binary_target. tags=['subgroup_candidate', 'condition_candidate', 'target_candidate'] desc=Target field for is day night rear view mirror.
63
+ - is_ecw: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is ecw.
64
+ - is_speed_alert: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is speed alert.
65
+ - ncap_rating: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for ncap rating.
66
+ - is_claim: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is claim.
67
+ - useful_field_combinations: [['age_of_car', 'age_of_policyholder', 'is_day_night_rear_view_mirror'], ['age_of_car', 'policy_tenure', 'is_day_night_rear_view_mirror'], ['policy_tenure', 'age_of_car', 'is_day_night_rear_view_mirror']]
68
+ - fields_requiring_caution: ['is_day_night_rear_view_mirror', 'policy_tenure']
69
+ - source_url: https://www.kaggle.com/datasets/ifteshanajnin/carinsuranceclaimprediction-classification
70
+
71
+ SQLite schema snapshot:
72
+ {
73
+ "table_name": "m2",
74
+ "quoted_table_name": "\"m2\"",
75
+ "row_count": 58592,
76
+ "columns": [
77
+ {
78
+ "name": "policy_id",
79
+ "type": "TEXT",
80
+ "notnull": false,
81
+ "pk": false
82
+ },
83
+ {
84
+ "name": "policy_tenure",
85
+ "type": "TEXT",
86
+ "notnull": false,
87
+ "pk": false
88
+ },
89
+ {
90
+ "name": "age_of_car",
91
+ "type": "TEXT",
92
+ "notnull": false,
93
+ "pk": false
94
+ },
95
+ {
96
+ "name": "age_of_policyholder",
97
+ "type": "TEXT",
98
+ "notnull": false,
99
+ "pk": false
100
+ },
101
+ {
102
+ "name": "area_cluster",
103
+ "type": "TEXT",
104
+ "notnull": false,
105
+ "pk": false
106
+ },
107
+ {
108
+ "name": "population_density",
109
+ "type": "TEXT",
110
+ "notnull": false,
111
+ "pk": false
112
+ },
113
+ {
114
+ "name": "make",
115
+ "type": "TEXT",
116
+ "notnull": false,
117
+ "pk": false
118
+ },
119
+ {
120
+ "name": "segment",
121
+ "type": "TEXT",
122
+ "notnull": false,
123
+ "pk": false
124
+ },
125
+ {
126
+ "name": "model",
127
+ "type": "TEXT",
128
+ "notnull": false,
129
+ "pk": false
130
+ },
131
+ {
132
+ "name": "fuel_type",
133
+ "type": "TEXT",
134
+ "notnull": false,
135
+ "pk": false
136
+ },
137
+ {
138
+ "name": "max_torque",
139
+ "type": "TEXT",
140
+ "notnull": false,
141
+ "pk": false
142
+ },
143
+ {
144
+ "name": "max_power",
145
+ "type": "TEXT",
146
+ "notnull": false,
147
+ "pk": false
148
+ },
149
+ {
150
+ "name": "engine_type",
151
+ "type": "TEXT",
152
+ "notnull": false,
153
+ "pk": false
154
+ },
155
+ {
156
+ "name": "airbags",
157
+ "type": "TEXT",
158
+ "notnull": false,
159
+ "pk": false
160
+ },
161
+ {
162
+ "name": "is_esc",
163
+ "type": "TEXT",
164
+ "notnull": false,
165
+ "pk": false
166
+ },
167
+ {
168
+ "name": "is_adjustable_steering",
169
+ "type": "TEXT",
170
+ "notnull": false,
171
+ "pk": false
172
+ },
173
+ {
174
+ "name": "is_tpms",
175
+ "type": "TEXT",
176
+ "notnull": false,
177
+ "pk": false
178
+ },
179
+ {
180
+ "name": "is_parking_sensors",
181
+ "type": "TEXT",
182
+ "notnull": false,
183
+ "pk": false
184
+ },
185
+ {
186
+ "name": "is_parking_camera",
187
+ "type": "TEXT",
188
+ "notnull": false,
189
+ "pk": false
190
+ },
191
+ {
192
+ "name": "rear_brakes_type",
193
+ "type": "TEXT",
194
+ "notnull": false,
195
+ "pk": false
196
+ },
197
+ {
198
+ "name": "displacement",
199
+ "type": "TEXT",
200
+ "notnull": false,
201
+ "pk": false
202
+ },
203
+ {
204
+ "name": "cylinder",
205
+ "type": "TEXT",
206
+ "notnull": false,
207
+ "pk": false
208
+ },
209
+ {
210
+ "name": "transmission_type",
211
+ "type": "TEXT",
212
+ "notnull": false,
213
+ "pk": false
214
+ },
215
+ {
216
+ "name": "gear_box",
217
+ "type": "TEXT",
218
+ "notnull": false,
219
+ "pk": false
220
+ },
221
+ {
222
+ "name": "steering_type",
223
+ "type": "TEXT",
224
+ "notnull": false,
225
+ "pk": false
226
+ },
227
+ {
228
+ "name": "turning_radius",
229
+ "type": "TEXT",
230
+ "notnull": false,
231
+ "pk": false
232
+ },
233
+ {
234
+ "name": "length",
235
+ "type": "TEXT",
236
+ "notnull": false,
237
+ "pk": false
238
+ },
239
+ {
240
+ "name": "width",
241
+ "type": "TEXT",
242
+ "notnull": false,
243
+ "pk": false
244
+ },
245
+ {
246
+ "name": "height",
247
+ "type": "TEXT",
248
+ "notnull": false,
249
+ "pk": false
250
+ },
251
+ {
252
+ "name": "gross_weight",
253
+ "type": "TEXT",
254
+ "notnull": false,
255
+ "pk": false
256
+ },
257
+ {
258
+ "name": "is_front_fog_lights",
259
+ "type": "TEXT",
260
+ "notnull": false,
261
+ "pk": false
262
+ },
263
+ {
264
+ "name": "is_rear_window_wiper",
265
+ "type": "TEXT",
266
+ "notnull": false,
267
+ "pk": false
268
+ },
269
+ {
270
+ "name": "is_rear_window_washer",
271
+ "type": "TEXT",
272
+ "notnull": false,
273
+ "pk": false
274
+ },
275
+ {
276
+ "name": "is_rear_window_defogger",
277
+ "type": "TEXT",
278
+ "notnull": false,
279
+ "pk": false
280
+ },
281
+ {
282
+ "name": "is_brake_assist",
283
+ "type": "TEXT",
284
+ "notnull": false,
285
+ "pk": false
286
+ },
287
+ {
288
+ "name": "is_power_door_locks",
289
+ "type": "TEXT",
290
+ "notnull": false,
291
+ "pk": false
292
+ },
293
+ {
294
+ "name": "is_central_locking",
295
+ "type": "TEXT",
296
+ "notnull": false,
297
+ "pk": false
298
+ },
299
+ {
300
+ "name": "is_power_steering",
301
+ "type": "TEXT",
302
+ "notnull": false,
303
+ "pk": false
304
+ },
305
+ {
306
+ "name": "is_driver_seat_height_adjustable",
307
+ "type": "TEXT",
308
+ "notnull": false,
309
+ "pk": false
310
+ },
311
+ {
312
+ "name": "is_day_night_rear_view_mirror",
313
+ "type": "TEXT",
314
+ "notnull": false,
315
+ "pk": false
316
+ },
317
+ {
318
+ "name": "is_ecw",
319
+ "type": "TEXT",
320
+ "notnull": false,
321
+ "pk": false
322
+ },
323
+ {
324
+ "name": "is_speed_alert",
325
+ "type": "TEXT",
326
+ "notnull": false,
327
+ "pk": false
328
+ },
329
+ {
330
+ "name": "ncap_rating",
331
+ "type": "TEXT",
332
+ "notnull": false,
333
+ "pk": false
334
+ },
335
+ {
336
+ "name": "is_claim",
337
+ "type": "TEXT",
338
+ "notnull": false,
339
+ "pk": false
340
+ }
341
+ ],
342
+ "sample_rows": [
343
+ {
344
+ "policy_id": "ID00001",
345
+ "policy_tenure": "0.515873589958172",
346
+ "age_of_car": "0.05",
347
+ "age_of_policyholder": "0.644230769230769",
348
+ "area_cluster": "C1",
349
+ "population_density": "4990",
350
+ "make": "1",
351
+ "segment": "A",
352
+ "model": "M1",
353
+ "fuel_type": "CNG",
354
+ "max_torque": "60Nm@3500rpm",
355
+ "max_power": "40.36bhp@6000rpm",
356
+ "engine_type": "F8D Petrol Engine",
357
+ "airbags": "2",
358
+ "is_esc": "No",
359
+ "is_adjustable_steering": "No",
360
+ "is_tpms": "No",
361
+ "is_parking_sensors": "Yes",
362
+ "is_parking_camera": "No",
363
+ "rear_brakes_type": "Drum",
364
+ "displacement": "796",
365
+ "cylinder": "3",
366
+ "transmission_type": "Manual",
367
+ "gear_box": "5",
368
+ "steering_type": "Power",
369
+ "turning_radius": "4.6",
370
+ "length": "3445",
371
+ "width": "1515",
372
+ "height": "1475",
373
+ "gross_weight": "1185",
374
+ "is_front_fog_lights": "No",
375
+ "is_rear_window_wiper": "No",
376
+ "is_rear_window_washer": "No",
377
+ "is_rear_window_defogger": "No",
378
+ "is_brake_assist": "No",
379
+ "is_power_door_locks": "No",
380
+ "is_central_locking": "No",
381
+ "is_power_steering": "Yes",
382
+ "is_driver_seat_height_adjustable": "No",
383
+ "is_day_night_rear_view_mirror": "No",
384
+ "is_ecw": "No",
385
+ "is_speed_alert": "Yes",
386
+ "ncap_rating": "0",
387
+ "is_claim": "0"
388
+ },
389
+ {
390
+ "policy_id": "ID00002",
391
+ "policy_tenure": "0.672618513547733",
392
+ "age_of_car": "0.02",
393
+ "age_of_policyholder": "0.375",
394
+ "area_cluster": "C2",
395
+ "population_density": "27003",
396
+ "make": "1",
397
+ "segment": "A",
398
+ "model": "M1",
399
+ "fuel_type": "CNG",
400
+ "max_torque": "60Nm@3500rpm",
401
+ "max_power": "40.36bhp@6000rpm",
402
+ "engine_type": "F8D Petrol Engine",
403
+ "airbags": "2",
404
+ "is_esc": "No",
405
+ "is_adjustable_steering": "No",
406
+ "is_tpms": "No",
407
+ "is_parking_sensors": "Yes",
408
+ "is_parking_camera": "No",
409
+ "rear_brakes_type": "Drum",
410
+ "displacement": "796",
411
+ "cylinder": "3",
412
+ "transmission_type": "Manual",
413
+ "gear_box": "5",
414
+ "steering_type": "Power",
415
+ "turning_radius": "4.6",
416
+ "length": "3445",
417
+ "width": "1515",
418
+ "height": "1475",
419
+ "gross_weight": "1185",
420
+ "is_front_fog_lights": "No",
421
+ "is_rear_window_wiper": "No",
422
+ "is_rear_window_washer": "No",
423
+ "is_rear_window_defogger": "No",
424
+ "is_brake_assist": "No",
425
+ "is_power_door_locks": "No",
426
+ "is_central_locking": "No",
427
+ "is_power_steering": "Yes",
428
+ "is_driver_seat_height_adjustable": "No",
429
+ "is_day_night_rear_view_mirror": "No",
430
+ "is_ecw": "No",
431
+ "is_speed_alert": "Yes",
432
+ "ncap_rating": "0",
433
+ "is_claim": "0"
434
+ },
435
+ {
436
+ "policy_id": "ID00003",
437
+ "policy_tenure": "0.841110255796233",
438
+ "age_of_car": "0.02",
439
+ "age_of_policyholder": "0.384615384615385",
440
+ "area_cluster": "C3",
441
+ "population_density": "4076",
442
+ "make": "1",
443
+ "segment": "A",
444
+ "model": "M1",
445
+ "fuel_type": "CNG",
446
+ "max_torque": "60Nm@3500rpm",
447
+ "max_power": "40.36bhp@6000rpm",
448
+ "engine_type": "F8D Petrol Engine",
449
+ "airbags": "2",
450
+ "is_esc": "No",
451
+ "is_adjustable_steering": "No",
452
+ "is_tpms": "No",
453
+ "is_parking_sensors": "Yes",
454
+ "is_parking_camera": "No",
455
+ "rear_brakes_type": "Drum",
456
+ "displacement": "796",
457
+ "cylinder": "3",
458
+ "transmission_type": "Manual",
459
+ "gear_box": "5",
460
+ "steering_type": "Power",
461
+ "turning_radius": "4.6",
462
+ "length": "3445",
463
+ "width": "1515",
464
+ "height": "1475",
465
+ "gross_weight": "1185",
466
+ "is_front_fog_lights": "No",
467
+ "is_rear_window_wiper": "No",
468
+ "is_rear_window_washer": "No",
469
+ "is_rear_window_defogger": "No",
470
+ "is_brake_assist": "No",
471
+ "is_power_door_locks": "No",
472
+ "is_central_locking": "No",
473
+ "is_power_steering": "Yes",
474
+ "is_driver_seat_height_adjustable": "No",
475
+ "is_day_night_rear_view_mirror": "No",
476
+ "is_ecw": "No",
477
+ "is_speed_alert": "Yes",
478
+ "ncap_rating": "0",
479
+ "is_claim": "0"
480
+ },
481
+ {
482
+ "policy_id": "ID00004",
483
+ "policy_tenure": "0.900276558749967",
484
+ "age_of_car": "0.11",
485
+ "age_of_policyholder": "0.432692307692308",
486
+ "area_cluster": "C4",
487
+ "population_density": "21622",
488
+ "make": "1",
489
+ "segment": "C1",
490
+ "model": "M2",
491
+ "fuel_type": "Petrol",
492
+ "max_torque": "113Nm@4400rpm",
493
+ "max_power": "88.50bhp@6000rpm",
494
+ "engine_type": "1.2 L K12N Dualjet",
495
+ "airbags": "2",
496
+ "is_esc": "Yes",
497
+ "is_adjustable_steering": "Yes",
498
+ "is_tpms": "No",
499
+ "is_parking_sensors": "Yes",
500
+ "is_parking_camera": "Yes",
501
+ "rear_brakes_type": "Drum",
502
+ "displacement": "1197",
503
+ "cylinder": "4",
504
+ "transmission_type": "Automatic",
505
+ "gear_box": "5",
506
+ "steering_type": "Electric",
507
+ "turning_radius": "4.8",
508
+ "length": "3995",
509
+ "width": "1735",
510
+ "height": "1515",
511
+ "gross_weight": "1335",
512
+ "is_front_fog_lights": "Yes",
513
+ "is_rear_window_wiper": "No",
514
+ "is_rear_window_washer": "No",
515
+ "is_rear_window_defogger": "Yes",
516
+ "is_brake_assist": "Yes",
517
+ "is_power_door_locks": "Yes",
518
+ "is_central_locking": "Yes",
519
+ "is_power_steering": "Yes",
520
+ "is_driver_seat_height_adjustable": "Yes",
521
+ "is_day_night_rear_view_mirror": "Yes",
522
+ "is_ecw": "Yes",
523
+ "is_speed_alert": "Yes",
524
+ "ncap_rating": "2",
525
+ "is_claim": "0"
526
+ },
527
+ {
528
+ "policy_id": "ID00005",
529
+ "policy_tenure": "0.596402813108729",
530
+ "age_of_car": "0.11",
531
+ "age_of_policyholder": "0.634615384615385",
532
+ "area_cluster": "C5",
533
+ "population_density": "34738",
534
+ "make": "2",
535
+ "segment": "A",
536
+ "model": "M3",
537
+ "fuel_type": "Petrol",
538
+ "max_torque": "91Nm@4250rpm",
539
+ "max_power": "67.06bhp@5500rpm",
540
+ "engine_type": "1.0 SCe",
541
+ "airbags": "2",
542
+ "is_esc": "No",
543
+ "is_adjustable_steering": "No",
544
+ "is_tpms": "No",
545
+ "is_parking_sensors": "No",
546
+ "is_parking_camera": "Yes",
547
+ "rear_brakes_type": "Drum",
548
+ "displacement": "999",
549
+ "cylinder": "3",
550
+ "transmission_type": "Automatic",
551
+ "gear_box": "5",
552
+ "steering_type": "Electric",
553
+ "turning_radius": "5",
554
+ "length": "3731",
555
+ "width": "1579",
556
+ "height": "1490",
557
+ "gross_weight": "1155",
558
+ "is_front_fog_lights": "No",
559
+ "is_rear_window_wiper": "No",
560
+ "is_rear_window_washer": "No",
561
+ "is_rear_window_defogger": "No",
562
+ "is_brake_assist": "No",
563
+ "is_power_door_locks": "Yes",
564
+ "is_central_locking": "Yes",
565
+ "is_power_steering": "Yes",
566
+ "is_driver_seat_height_adjustable": "No",
567
+ "is_day_night_rear_view_mirror": "Yes",
568
+ "is_ecw": "Yes",
569
+ "is_speed_alert": "Yes",
570
+ "ncap_rating": "2",
571
+ "is_claim": "0"
572
+ }
573
+ ]
574
+ }
575
+
576
+ Shortlisted templates:
577
+ [
578
+ {
579
+ "template_id": "tpl_m4_window_partition_avg",
580
+ "template_name": "Window Partition Average",
581
+ "primary_family": "conditional_dependency_structure",
582
+ "portability": "partial",
583
+ "sql_skeleton": "SELECT DISTINCT {group_col},\n AVG({measure_col}) OVER (PARTITION BY {group_col}) AS avg_measure\nFROM {table}\nORDER BY avg_measure DESC;",
584
+ "required_roles": [
585
+ "group_col",
586
+ "measure_col"
587
+ ]
588
+ }
589
+ ]
590
+
591
+ Problem instance:
592
+ {
593
+ "dataset_id": "m2",
594
+ "question": "Use template Window Partition Average to probe slice_level_consistency with semantic role filtered_stable_view. Focus on group_col=max_torque, measure_col=ncap_rating.",
595
+ "planned_template_id": "tpl_m4_window_partition_avg",
596
+ "bindings": {
597
+ "group_col": "max_torque",
598
+ "measure_col": "ncap_rating",
599
+ "top_k": 14,
600
+ "top_n": 5,
601
+ "num_tiles": 10,
602
+ "percentile_value": 0.95,
603
+ "z_threshold": 2.0,
604
+ "fraction_threshold": 0.1,
605
+ "baseline_multiplier": 1.5,
606
+ "baseline_fraction": 0.1,
607
+ "min_group_size": 5,
608
+ "min_support": 5,
609
+ "measure_threshold": 3.0,
610
+ "time_grain": "month",
611
+ "lookback_rows": 3,
612
+ "current_period_start": "'2024-01-01'",
613
+ "current_period_end": "'2024-04-01'",
614
+ "previous_period_start": "'2023-10-01'",
615
+ "previous_period_end": "'2024-01-01'",
616
+ "drift_ratio_threshold": 0.8
617
+ },
618
+ "can_vary": [],
619
+ "must_fix": [],
620
+ "runtime_sql_skeleton": "SELECT DISTINCT {group_col},\n AVG({measure_col}) OVER (PARTITION BY {group_col}) AS avg_measure\nFROM {table}\nORDER BY avg_measure DESC;"
621
+ }
622
+
623
+ Repair context:
624
+ {}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_prompt_attempt_2.txt ADDED
@@ -0,0 +1,624 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are generating one SQLite SELECT query for a single-table SQL QA task.
2
+ Return strict JSON only, with this schema: {"sql": "...", "notes": "..."}.
3
+ Rules:
4
+ - Use only the provided table and columns.
5
+ - Do not write INSERT, UPDATE, DELETE, DROP, ALTER, CREATE, PRAGMA, ATTACH, DETACH, or VACUUM.
6
+ - Prefer the planned template and bound roles when provided.
7
+ - Add a leading SQL comment exactly like: -- template_id: <planned_template_id>.
8
+ - Generate SQLite-compatible SQL. SQLite does not support PERCENTILE_CONT or STDDEV.
9
+ - Quote identifiers with double quotes.
10
+ - Return no markdown and no extra prose.
11
+
12
+ Dataset context:
13
+ Dataset context for SQL QA:
14
+ - dataset_id: m2
15
+ - dataset_name: Carinsuranceclaimprediction Classification
16
+ - table_name: m2
17
+ - table_layout: single-table dataset (do not assume joins).
18
+ - row_semantics: One row is one tabular observation with 43 feature columns and target `is_day_night_rear_view_mirror`.
19
+ - task_type: classification
20
+ - target_column: is_day_night_rear_view_mirror
21
+ - main_row_count: 58592
22
+ - important_fields:
23
+ - policy_id: role=feature, type=identifier_string. tags=['identifier', 'probe_exclude', 'high_cardinality_candidate'] desc=Identifier-like field for policy id.
24
+ - policy_tenure: role=feature, type=numeric. tags=['condition_candidate', 'measure', 'high_cardinality_candidate'] desc=Numeric field for policy tenure.
25
+ - age_of_car: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of car.
26
+ - age_of_policyholder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for age of policyholder.
27
+ - area_cluster: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for area cluster.
28
+ - population_density: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for population density.
29
+ - make: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for make.
30
+ - segment: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for segment.
31
+ - model: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for model.
32
+ - fuel_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for fuel type.
33
+ - max_torque: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max torque.
34
+ - max_power: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for max power.
35
+ - engine_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for engine type.
36
+ - airbags: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for airbags.
37
+ - is_esc: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is esc.
38
+ - is_adjustable_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is adjustable steering.
39
+ - is_tpms: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is tpms.
40
+ - is_parking_sensors: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking sensors.
41
+ - is_parking_camera: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is parking camera.
42
+ - rear_brakes_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for rear brakes type.
43
+ - displacement: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for displacement.
44
+ - cylinder: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for cylinder.
45
+ - transmission_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for transmission type.
46
+ - gear_box: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gear box.
47
+ - steering_type: role=feature, type=categorical_nominal. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for steering type.
48
+ - turning_radius: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for turning radius.
49
+ - length: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for length.
50
+ - width: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for width.
51
+ - height: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for height.
52
+ - gross_weight: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for gross weight.
53
+ - is_front_fog_lights: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is front fog lights.
54
+ - is_rear_window_wiper: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window wiper.
55
+ - is_rear_window_washer: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window washer.
56
+ - is_rear_window_defogger: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is rear window defogger.
57
+ - is_brake_assist: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is brake assist.
58
+ - is_power_door_locks: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power door locks.
59
+ - is_central_locking: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is central locking.
60
+ - is_power_steering: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is power steering.
61
+ - is_driver_seat_height_adjustable: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is driver seat height adjustable.
62
+ - is_day_night_rear_view_mirror: role=target, type=binary_target. tags=['subgroup_candidate', 'condition_candidate', 'target_candidate'] desc=Target field for is day night rear view mirror.
63
+ - is_ecw: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is ecw.
64
+ - is_speed_alert: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is speed alert.
65
+ - ncap_rating: role=feature, type=numeric_discrete. tags=['subgroup_candidate', 'condition_candidate', 'measure'] desc=Numeric field for ncap rating.
66
+ - is_claim: role=feature, type=categorical_binary. tags=['subgroup_candidate', 'condition_candidate'] desc=Categorical field for is claim.
67
+ - useful_field_combinations: [['age_of_car', 'age_of_policyholder', 'is_day_night_rear_view_mirror'], ['age_of_car', 'policy_tenure', 'is_day_night_rear_view_mirror'], ['policy_tenure', 'age_of_car', 'is_day_night_rear_view_mirror']]
68
+ - fields_requiring_caution: ['is_day_night_rear_view_mirror', 'policy_tenure']
69
+ - source_url: https://www.kaggle.com/datasets/ifteshanajnin/carinsuranceclaimprediction-classification
70
+
71
+ SQLite schema snapshot:
72
+ {
73
+ "table_name": "m2",
74
+ "quoted_table_name": "\"m2\"",
75
+ "row_count": 58592,
76
+ "columns": [
77
+ {
78
+ "name": "policy_id",
79
+ "type": "TEXT",
80
+ "notnull": false,
81
+ "pk": false
82
+ },
83
+ {
84
+ "name": "policy_tenure",
85
+ "type": "TEXT",
86
+ "notnull": false,
87
+ "pk": false
88
+ },
89
+ {
90
+ "name": "age_of_car",
91
+ "type": "TEXT",
92
+ "notnull": false,
93
+ "pk": false
94
+ },
95
+ {
96
+ "name": "age_of_policyholder",
97
+ "type": "TEXT",
98
+ "notnull": false,
99
+ "pk": false
100
+ },
101
+ {
102
+ "name": "area_cluster",
103
+ "type": "TEXT",
104
+ "notnull": false,
105
+ "pk": false
106
+ },
107
+ {
108
+ "name": "population_density",
109
+ "type": "TEXT",
110
+ "notnull": false,
111
+ "pk": false
112
+ },
113
+ {
114
+ "name": "make",
115
+ "type": "TEXT",
116
+ "notnull": false,
117
+ "pk": false
118
+ },
119
+ {
120
+ "name": "segment",
121
+ "type": "TEXT",
122
+ "notnull": false,
123
+ "pk": false
124
+ },
125
+ {
126
+ "name": "model",
127
+ "type": "TEXT",
128
+ "notnull": false,
129
+ "pk": false
130
+ },
131
+ {
132
+ "name": "fuel_type",
133
+ "type": "TEXT",
134
+ "notnull": false,
135
+ "pk": false
136
+ },
137
+ {
138
+ "name": "max_torque",
139
+ "type": "TEXT",
140
+ "notnull": false,
141
+ "pk": false
142
+ },
143
+ {
144
+ "name": "max_power",
145
+ "type": "TEXT",
146
+ "notnull": false,
147
+ "pk": false
148
+ },
149
+ {
150
+ "name": "engine_type",
151
+ "type": "TEXT",
152
+ "notnull": false,
153
+ "pk": false
154
+ },
155
+ {
156
+ "name": "airbags",
157
+ "type": "TEXT",
158
+ "notnull": false,
159
+ "pk": false
160
+ },
161
+ {
162
+ "name": "is_esc",
163
+ "type": "TEXT",
164
+ "notnull": false,
165
+ "pk": false
166
+ },
167
+ {
168
+ "name": "is_adjustable_steering",
169
+ "type": "TEXT",
170
+ "notnull": false,
171
+ "pk": false
172
+ },
173
+ {
174
+ "name": "is_tpms",
175
+ "type": "TEXT",
176
+ "notnull": false,
177
+ "pk": false
178
+ },
179
+ {
180
+ "name": "is_parking_sensors",
181
+ "type": "TEXT",
182
+ "notnull": false,
183
+ "pk": false
184
+ },
185
+ {
186
+ "name": "is_parking_camera",
187
+ "type": "TEXT",
188
+ "notnull": false,
189
+ "pk": false
190
+ },
191
+ {
192
+ "name": "rear_brakes_type",
193
+ "type": "TEXT",
194
+ "notnull": false,
195
+ "pk": false
196
+ },
197
+ {
198
+ "name": "displacement",
199
+ "type": "TEXT",
200
+ "notnull": false,
201
+ "pk": false
202
+ },
203
+ {
204
+ "name": "cylinder",
205
+ "type": "TEXT",
206
+ "notnull": false,
207
+ "pk": false
208
+ },
209
+ {
210
+ "name": "transmission_type",
211
+ "type": "TEXT",
212
+ "notnull": false,
213
+ "pk": false
214
+ },
215
+ {
216
+ "name": "gear_box",
217
+ "type": "TEXT",
218
+ "notnull": false,
219
+ "pk": false
220
+ },
221
+ {
222
+ "name": "steering_type",
223
+ "type": "TEXT",
224
+ "notnull": false,
225
+ "pk": false
226
+ },
227
+ {
228
+ "name": "turning_radius",
229
+ "type": "TEXT",
230
+ "notnull": false,
231
+ "pk": false
232
+ },
233
+ {
234
+ "name": "length",
235
+ "type": "TEXT",
236
+ "notnull": false,
237
+ "pk": false
238
+ },
239
+ {
240
+ "name": "width",
241
+ "type": "TEXT",
242
+ "notnull": false,
243
+ "pk": false
244
+ },
245
+ {
246
+ "name": "height",
247
+ "type": "TEXT",
248
+ "notnull": false,
249
+ "pk": false
250
+ },
251
+ {
252
+ "name": "gross_weight",
253
+ "type": "TEXT",
254
+ "notnull": false,
255
+ "pk": false
256
+ },
257
+ {
258
+ "name": "is_front_fog_lights",
259
+ "type": "TEXT",
260
+ "notnull": false,
261
+ "pk": false
262
+ },
263
+ {
264
+ "name": "is_rear_window_wiper",
265
+ "type": "TEXT",
266
+ "notnull": false,
267
+ "pk": false
268
+ },
269
+ {
270
+ "name": "is_rear_window_washer",
271
+ "type": "TEXT",
272
+ "notnull": false,
273
+ "pk": false
274
+ },
275
+ {
276
+ "name": "is_rear_window_defogger",
277
+ "type": "TEXT",
278
+ "notnull": false,
279
+ "pk": false
280
+ },
281
+ {
282
+ "name": "is_brake_assist",
283
+ "type": "TEXT",
284
+ "notnull": false,
285
+ "pk": false
286
+ },
287
+ {
288
+ "name": "is_power_door_locks",
289
+ "type": "TEXT",
290
+ "notnull": false,
291
+ "pk": false
292
+ },
293
+ {
294
+ "name": "is_central_locking",
295
+ "type": "TEXT",
296
+ "notnull": false,
297
+ "pk": false
298
+ },
299
+ {
300
+ "name": "is_power_steering",
301
+ "type": "TEXT",
302
+ "notnull": false,
303
+ "pk": false
304
+ },
305
+ {
306
+ "name": "is_driver_seat_height_adjustable",
307
+ "type": "TEXT",
308
+ "notnull": false,
309
+ "pk": false
310
+ },
311
+ {
312
+ "name": "is_day_night_rear_view_mirror",
313
+ "type": "TEXT",
314
+ "notnull": false,
315
+ "pk": false
316
+ },
317
+ {
318
+ "name": "is_ecw",
319
+ "type": "TEXT",
320
+ "notnull": false,
321
+ "pk": false
322
+ },
323
+ {
324
+ "name": "is_speed_alert",
325
+ "type": "TEXT",
326
+ "notnull": false,
327
+ "pk": false
328
+ },
329
+ {
330
+ "name": "ncap_rating",
331
+ "type": "TEXT",
332
+ "notnull": false,
333
+ "pk": false
334
+ },
335
+ {
336
+ "name": "is_claim",
337
+ "type": "TEXT",
338
+ "notnull": false,
339
+ "pk": false
340
+ }
341
+ ],
342
+ "sample_rows": [
343
+ {
344
+ "policy_id": "ID00001",
345
+ "policy_tenure": "0.515873589958172",
346
+ "age_of_car": "0.05",
347
+ "age_of_policyholder": "0.644230769230769",
348
+ "area_cluster": "C1",
349
+ "population_density": "4990",
350
+ "make": "1",
351
+ "segment": "A",
352
+ "model": "M1",
353
+ "fuel_type": "CNG",
354
+ "max_torque": "60Nm@3500rpm",
355
+ "max_power": "40.36bhp@6000rpm",
356
+ "engine_type": "F8D Petrol Engine",
357
+ "airbags": "2",
358
+ "is_esc": "No",
359
+ "is_adjustable_steering": "No",
360
+ "is_tpms": "No",
361
+ "is_parking_sensors": "Yes",
362
+ "is_parking_camera": "No",
363
+ "rear_brakes_type": "Drum",
364
+ "displacement": "796",
365
+ "cylinder": "3",
366
+ "transmission_type": "Manual",
367
+ "gear_box": "5",
368
+ "steering_type": "Power",
369
+ "turning_radius": "4.6",
370
+ "length": "3445",
371
+ "width": "1515",
372
+ "height": "1475",
373
+ "gross_weight": "1185",
374
+ "is_front_fog_lights": "No",
375
+ "is_rear_window_wiper": "No",
376
+ "is_rear_window_washer": "No",
377
+ "is_rear_window_defogger": "No",
378
+ "is_brake_assist": "No",
379
+ "is_power_door_locks": "No",
380
+ "is_central_locking": "No",
381
+ "is_power_steering": "Yes",
382
+ "is_driver_seat_height_adjustable": "No",
383
+ "is_day_night_rear_view_mirror": "No",
384
+ "is_ecw": "No",
385
+ "is_speed_alert": "Yes",
386
+ "ncap_rating": "0",
387
+ "is_claim": "0"
388
+ },
389
+ {
390
+ "policy_id": "ID00002",
391
+ "policy_tenure": "0.672618513547733",
392
+ "age_of_car": "0.02",
393
+ "age_of_policyholder": "0.375",
394
+ "area_cluster": "C2",
395
+ "population_density": "27003",
396
+ "make": "1",
397
+ "segment": "A",
398
+ "model": "M1",
399
+ "fuel_type": "CNG",
400
+ "max_torque": "60Nm@3500rpm",
401
+ "max_power": "40.36bhp@6000rpm",
402
+ "engine_type": "F8D Petrol Engine",
403
+ "airbags": "2",
404
+ "is_esc": "No",
405
+ "is_adjustable_steering": "No",
406
+ "is_tpms": "No",
407
+ "is_parking_sensors": "Yes",
408
+ "is_parking_camera": "No",
409
+ "rear_brakes_type": "Drum",
410
+ "displacement": "796",
411
+ "cylinder": "3",
412
+ "transmission_type": "Manual",
413
+ "gear_box": "5",
414
+ "steering_type": "Power",
415
+ "turning_radius": "4.6",
416
+ "length": "3445",
417
+ "width": "1515",
418
+ "height": "1475",
419
+ "gross_weight": "1185",
420
+ "is_front_fog_lights": "No",
421
+ "is_rear_window_wiper": "No",
422
+ "is_rear_window_washer": "No",
423
+ "is_rear_window_defogger": "No",
424
+ "is_brake_assist": "No",
425
+ "is_power_door_locks": "No",
426
+ "is_central_locking": "No",
427
+ "is_power_steering": "Yes",
428
+ "is_driver_seat_height_adjustable": "No",
429
+ "is_day_night_rear_view_mirror": "No",
430
+ "is_ecw": "No",
431
+ "is_speed_alert": "Yes",
432
+ "ncap_rating": "0",
433
+ "is_claim": "0"
434
+ },
435
+ {
436
+ "policy_id": "ID00003",
437
+ "policy_tenure": "0.841110255796233",
438
+ "age_of_car": "0.02",
439
+ "age_of_policyholder": "0.384615384615385",
440
+ "area_cluster": "C3",
441
+ "population_density": "4076",
442
+ "make": "1",
443
+ "segment": "A",
444
+ "model": "M1",
445
+ "fuel_type": "CNG",
446
+ "max_torque": "60Nm@3500rpm",
447
+ "max_power": "40.36bhp@6000rpm",
448
+ "engine_type": "F8D Petrol Engine",
449
+ "airbags": "2",
450
+ "is_esc": "No",
451
+ "is_adjustable_steering": "No",
452
+ "is_tpms": "No",
453
+ "is_parking_sensors": "Yes",
454
+ "is_parking_camera": "No",
455
+ "rear_brakes_type": "Drum",
456
+ "displacement": "796",
457
+ "cylinder": "3",
458
+ "transmission_type": "Manual",
459
+ "gear_box": "5",
460
+ "steering_type": "Power",
461
+ "turning_radius": "4.6",
462
+ "length": "3445",
463
+ "width": "1515",
464
+ "height": "1475",
465
+ "gross_weight": "1185",
466
+ "is_front_fog_lights": "No",
467
+ "is_rear_window_wiper": "No",
468
+ "is_rear_window_washer": "No",
469
+ "is_rear_window_defogger": "No",
470
+ "is_brake_assist": "No",
471
+ "is_power_door_locks": "No",
472
+ "is_central_locking": "No",
473
+ "is_power_steering": "Yes",
474
+ "is_driver_seat_height_adjustable": "No",
475
+ "is_day_night_rear_view_mirror": "No",
476
+ "is_ecw": "No",
477
+ "is_speed_alert": "Yes",
478
+ "ncap_rating": "0",
479
+ "is_claim": "0"
480
+ },
481
+ {
482
+ "policy_id": "ID00004",
483
+ "policy_tenure": "0.900276558749967",
484
+ "age_of_car": "0.11",
485
+ "age_of_policyholder": "0.432692307692308",
486
+ "area_cluster": "C4",
487
+ "population_density": "21622",
488
+ "make": "1",
489
+ "segment": "C1",
490
+ "model": "M2",
491
+ "fuel_type": "Petrol",
492
+ "max_torque": "113Nm@4400rpm",
493
+ "max_power": "88.50bhp@6000rpm",
494
+ "engine_type": "1.2 L K12N Dualjet",
495
+ "airbags": "2",
496
+ "is_esc": "Yes",
497
+ "is_adjustable_steering": "Yes",
498
+ "is_tpms": "No",
499
+ "is_parking_sensors": "Yes",
500
+ "is_parking_camera": "Yes",
501
+ "rear_brakes_type": "Drum",
502
+ "displacement": "1197",
503
+ "cylinder": "4",
504
+ "transmission_type": "Automatic",
505
+ "gear_box": "5",
506
+ "steering_type": "Electric",
507
+ "turning_radius": "4.8",
508
+ "length": "3995",
509
+ "width": "1735",
510
+ "height": "1515",
511
+ "gross_weight": "1335",
512
+ "is_front_fog_lights": "Yes",
513
+ "is_rear_window_wiper": "No",
514
+ "is_rear_window_washer": "No",
515
+ "is_rear_window_defogger": "Yes",
516
+ "is_brake_assist": "Yes",
517
+ "is_power_door_locks": "Yes",
518
+ "is_central_locking": "Yes",
519
+ "is_power_steering": "Yes",
520
+ "is_driver_seat_height_adjustable": "Yes",
521
+ "is_day_night_rear_view_mirror": "Yes",
522
+ "is_ecw": "Yes",
523
+ "is_speed_alert": "Yes",
524
+ "ncap_rating": "2",
525
+ "is_claim": "0"
526
+ },
527
+ {
528
+ "policy_id": "ID00005",
529
+ "policy_tenure": "0.596402813108729",
530
+ "age_of_car": "0.11",
531
+ "age_of_policyholder": "0.634615384615385",
532
+ "area_cluster": "C5",
533
+ "population_density": "34738",
534
+ "make": "2",
535
+ "segment": "A",
536
+ "model": "M3",
537
+ "fuel_type": "Petrol",
538
+ "max_torque": "91Nm@4250rpm",
539
+ "max_power": "67.06bhp@5500rpm",
540
+ "engine_type": "1.0 SCe",
541
+ "airbags": "2",
542
+ "is_esc": "No",
543
+ "is_adjustable_steering": "No",
544
+ "is_tpms": "No",
545
+ "is_parking_sensors": "No",
546
+ "is_parking_camera": "Yes",
547
+ "rear_brakes_type": "Drum",
548
+ "displacement": "999",
549
+ "cylinder": "3",
550
+ "transmission_type": "Automatic",
551
+ "gear_box": "5",
552
+ "steering_type": "Electric",
553
+ "turning_radius": "5",
554
+ "length": "3731",
555
+ "width": "1579",
556
+ "height": "1490",
557
+ "gross_weight": "1155",
558
+ "is_front_fog_lights": "No",
559
+ "is_rear_window_wiper": "No",
560
+ "is_rear_window_washer": "No",
561
+ "is_rear_window_defogger": "No",
562
+ "is_brake_assist": "No",
563
+ "is_power_door_locks": "Yes",
564
+ "is_central_locking": "Yes",
565
+ "is_power_steering": "Yes",
566
+ "is_driver_seat_height_adjustable": "No",
567
+ "is_day_night_rear_view_mirror": "Yes",
568
+ "is_ecw": "Yes",
569
+ "is_speed_alert": "Yes",
570
+ "ncap_rating": "2",
571
+ "is_claim": "0"
572
+ }
573
+ ]
574
+ }
575
+
576
+ Shortlisted templates:
577
+ [
578
+ {
579
+ "template_id": "tpl_m4_window_partition_avg",
580
+ "template_name": "Window Partition Average",
581
+ "primary_family": "conditional_dependency_structure",
582
+ "portability": "partial",
583
+ "sql_skeleton": "SELECT DISTINCT {group_col},\n AVG({measure_col}) OVER (PARTITION BY {group_col}) AS avg_measure\nFROM {table}\nORDER BY avg_measure DESC;",
584
+ "required_roles": [
585
+ "group_col",
586
+ "measure_col"
587
+ ]
588
+ }
589
+ ]
590
+
591
+ Problem instance:
592
+ {
593
+ "dataset_id": "m2",
594
+ "question": "Use template Window Partition Average to probe slice_level_consistency with semantic role filtered_stable_view. Focus on group_col=max_torque, measure_col=ncap_rating.",
595
+ "planned_template_id": "tpl_m4_window_partition_avg",
596
+ "bindings": {
597
+ "group_col": "max_torque",
598
+ "measure_col": "ncap_rating",
599
+ "top_k": 14,
600
+ "top_n": 5,
601
+ "num_tiles": 10,
602
+ "percentile_value": 0.95,
603
+ "z_threshold": 2.0,
604
+ "fraction_threshold": 0.1,
605
+ "baseline_multiplier": 1.5,
606
+ "baseline_fraction": 0.1,
607
+ "min_group_size": 5,
608
+ "min_support": 5,
609
+ "measure_threshold": 3.0,
610
+ "time_grain": "month",
611
+ "lookback_rows": 3,
612
+ "current_period_start": "'2024-01-01'",
613
+ "current_period_end": "'2024-04-01'",
614
+ "previous_period_start": "'2023-10-01'",
615
+ "previous_period_end": "'2024-01-01'",
616
+ "drift_ratio_threshold": 0.8
617
+ },
618
+ "can_vary": [],
619
+ "must_fix": [],
620
+ "runtime_sql_skeleton": "SELECT DISTINCT {group_col},\n AVG({measure_col}) OVER (PARTITION BY {group_col}) AS avg_measure\nFROM {table}\nORDER BY avg_measure DESC;"
621
+ }
622
+
623
+ Repair context:
624
+ {}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_response_attempt_1.raw.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e4112-5653-73f3-bbdb-6ec849768bac"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_response_attempt_1.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e4112-5653-73f3-bbdb-6ec849768bac"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_response_attempt_2.raw.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e4112-674c-75f0-9373-b0fb8ff8d9e6"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_response_attempt_2.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"type":"thread.started","thread_id":"019e4112-674c-75f0-9373-b0fb8ff8d9e6"}
2
+ {"type":"turn.started"}
3
+ {"type":"error","message":"Quota exceeded. Check your plan and billing details."}
4
+ {"type":"turn.failed","error":{"message":"Quota exceeded. Check your plan and billing details."}}
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_stderr_attempt_1.txt ADDED
File without changes
Query/sql/v2/runs/v2_cli_20260502_081223_f/m2/artifacts/v2q_m2_1f48397650934b1e/cli/sql_stderr_attempt_2.txt ADDED
File without changes