ModelHub XC af10629f89 初始化项目,由ModelHub XC社区提供模型
Model: jastorj/couchmind-v5.7.8.1_arctic_stage_3-cw-24K-16bit
Source: Original Platform
2026-08-22 15:29:16 +08:00

license, language, tags, base_model
license language tags base_model
apache-2.0
en
text-to-sql
code
sql
fine-tuned
unsloth
lora
Snowflake/Arctic-Text2SQL-R1-7B

Snowflake/Arctic-Text2SQL-R1-7B Fine-tuned for NL2SQL++ v5.7.8.1_arctic_stage_3

This model is a fine-tuned version of Snowflake/Arctic-Text2SQL-R1-7B on the NL2SQL++ v5.7.8.1_arctic_stage_3 dataset with code-with-thought reasoning.

Model Details

  • Base Model: Snowflake/Arctic-Text2SQL-R1-7B
  • Task: Text-to-SQL generation
  • Dataset: NL2SQL++ v5.7.8.1_arctic_stage_3 with code-with-thought reasoning
  • Fine-tuning Method: LoRA (Low-Rank Adaptation) with Unsloth
  • Quantization: 16-bit merged weights
  • Training Dataset Size: 13655 examples
  • Validation Dataset Size: 0 examples

Training Configuration

  • output_dir: saved_models/stage_3
  • per_device_train_batch_size: 8
  • num_train_epochs: 3
  • max_steps: -1
  • learning_rate: 1e-06
  • lr_scheduler_type: SchedulerType.COSINE
  • lr_scheduler_kwargs: None
  • warmup_steps: 0.1
  • optim: OptimizerNames.ADAMW_TORCH_FUSED
  • optim_args: None
  • weight_decay: 0.01
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • optim_target_modules: None
  • gradient_accumulation_steps: 2
  • average_tokens_across_devices: True
  • max_grad_norm: 1.0
  • label_smoothing_factor: 0.0
  • bf16: True
  • fp16: False
  • bf16_full_eval: True
  • fp16_full_eval: False
  • tf32: None
  • gradient_checkpointing: True
  • gradient_checkpointing_kwargs: None
  • torch_compile: False
  • torch_compile_backend: None
  • torch_compile_mode: None
  • use_liger_kernel: False
  • liger_kernel_config: None
  • use_cache: False
  • neftune_noise_alpha: None
  • torch_empty_cache_steps: None
  • auto_find_batch_size: False
  • logging_strategy: IntervalStrategy.STEPS
  • logging_steps: 3
  • logging_first_step: False
  • log_on_each_node: True
  • logging_nan_inf_filter: True
  • include_num_input_tokens_seen: no
  • log_level: passive
  • log_level_replica: warning
  • disable_tqdm: False
  • report_to: ['wandb']
  • run_name: None
  • project: huggingface
  • trackio_space_id: trackio
  • eval_strategy: IntervalStrategy.STEPS
  • eval_steps: 50
  • eval_delay: 0
  • per_device_eval_batch_size: 5
  • prediction_loss_only: False
  • eval_on_start: False
  • eval_do_concat_batches: True
  • eval_use_gather_object: False
  • eval_accumulation_steps: 10
  • include_for_metrics: []
  • batch_eval_metrics: False
  • save_only_model: False
  • save_strategy: SaveStrategy.BEST
  • save_steps: 50
  • save_on_each_node: False
  • save_total_limit: 1
  • enable_jit_checkpoint: False
  • push_to_hub: False
  • hub_token: None
  • hub_private_repo: None
  • hub_model_id: None
  • hub_strategy: HubStrategy.EVERY_SAVE
  • hub_always_push: False
  • hub_revision: None
  • load_best_model_at_end: True
  • metric_for_best_model: eval_exec_accuracy
  • greater_is_better: True
  • ignore_data_skip: False
  • restore_callback_states_from_checkpoint: False
  • full_determinism: False
  • seed: 42
  • data_seed: None
  • use_cpu: False
  • accelerator_config: AcceleratorConfig(split_batches=False, dispatch_batches=None, even_batches=True, use_seedable_sampler=True, non_blocking=False, gradient_accumulation_kwargs=None, use_configured_state=False)
  • parallelism_config: None
  • dataloader_drop_last: False
  • dataloader_num_workers: 0
  • dataloader_pin_memory: True
  • dataloader_persistent_workers: False
  • dataloader_prefetch_factor: None
  • remove_unused_columns: True
  • label_names: None
  • train_sampling_strategy: random
  • length_column_name: length
  • ddp_find_unused_parameters: None
  • ddp_bucket_cap_mb: None
  • ddp_broadcast_buffers: None
  • ddp_backend: None
  • ddp_timeout: 1800
  • fsdp: []
  • fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
  • deepspeed: None
  • debug: []
  • skip_memory_metrics: True
  • do_train: False
  • do_eval: True
  • do_predict: False
  • resume_from_checkpoint: None
  • warmup_ratio: 0.1
  • logging_dir: None
  • local_rank: -1
  • model_init_kwargs: None
  • chat_template_path: None
  • dataset_text_field: text
  • dataset_kwargs: None
  • dataset_num_proc: None
  • eos_token: None
  • pad_token: None
  • max_length: 24000
  • packing: False
  • packing_strategy: bfd
  • padding_free: False
  • pad_to_multiple_of: None
  • eval_packing: None
  • completion_only_loss: None
  • assistant_only_loss: False
  • loss_type: nll
  • activation_offloading: False
  • vllm_sampling_params: None
  • unsloth_num_chunks: -1
  • unsloth_logit_chunk_multiplier: None
  • unsloth_grpo_mini_batch: None
  • max_seq_length: 24000
  • model_name: Snowflake/Arctic-Text2SQL-R1-7B
  • model_specs: ModelSpecs(instruction_part='<|im_start|>user', response_part='<|im_start|>assistant', target_modules=['q_proj', 'k_proj', 'v_proj', 'o_proj', 'gate_proj', 'up_proj', 'down_proj'], chat_template=None)
  • lora_use_rslora: True
  • lora_r: 128
  • lora_alpha: 256
  • lora_dropout: 0.1
  • early_stopping_patience: 5

Train Dataset Example

<|im_start|>system
You are a Couchbase SQL++ query expert. Given a database schema and a natural language question, generate a syntactically valid SQL++ query that precisely answers the question.

Rules:
- SELECT only the columns explicitly asked for — nothing more, nothing less
- Use the exact bucket, scope, and collection names provided in the schema

Output Format:
In your answer, please enclose the generated SQL++ query in a code block:

-- Your SQL query

<|im_end|>
<|im_start|>user
Bucket Name:
`training_bucket`

Scope Name:
`Claims_Processing_and_Risk_Assessment_scope`

Database Schema:
{"`training_bucket`.`Claims_Processing_and_Risk_Assessment_scope`.`parties`": {"Flavor": "", "properties": {"address": {"properties": {"city": {"samples": [["Heatherberg"]], "type": "string"}, "country": {"samples": [["US"]], "type": "string"}, "line1": {"samples": [["4180 Lisa Meadow Suite 968"]], "type": "string"}, "line2": {"samples": [["Apt. 022"]], "type": "string"}, "postal_code": {"samples": [["18424"]], "type": "string"}, "state": {"samples": [["AK"]], "type": "string"}}, "type": "object"}, "contacts": {"items": {"properties": {"primary": {"samples": [true], "type": "boolean"}, "type": {"samples": ["email"], "type": "string"}, "value": {"samples": ["508.575.9957x96239"], "type": "string"}}, "type": "object"}, "samples": [[{"primary": true, "type": "email", "value": "ashley26@example.com"}]], "type": "array"}, "created_at": {"samples": ["2023-10-07T15:12:03.431749Z"], "type": "string"}, "display_name": {"samples": ["James Smith"], "type": "string"}, "identifiers": {"items": {"properties": {"id_type": {"samples": ["DL"], "type": "string"}, "id_value": {"samples": ["065-25-4189"], "type": "string"}, "issuing_country": {"samples": ["US"], "type": "string"}}, "type": "object"}, "samples": [[{"id_type": "SSN", "id_value": "267-31-2494", "issuing_country": "US"}]], "type": "array"}, "legal_name": {"samples": [["Hull PLC Ltd"]], "type": "string"}, "party_type": {"samples": ["organization"], "type": "string"}, "role_flags": {"properties": {"is_employee": {"samples": [false], "type": "boolean"}, "is_vendor": {"samples": [false], "type": "boolean"}, "is_witness": {"samples": [false], "type": "boolean"}}, "type": "object"}, "updated_at": {"samples": ["2023-11-10T05:12:03.431749Z"], "type": "string"}}, "type": "object"}, "`training_bucket`.`Claims_Processing_and_Risk_Assessment_scope`.`fraud_cases`": {"Flavor": "", "properties": {"case_number": {"samples": ["FC-2025-209913"], "type": "string"}, "claim_id": {"samples": ["claim_2608af7c-dcc4-4656-8343-..."], "type": "string"}, "closed_at": {"samples": [["2025-04-28T20:40:39.431749Z"]], "type": "string"}, "created_at": {"samples": ["2025-07-10T04:01:03.431749Z"], "type": "string"}, "investigation": {"properties": {"assigned_investigator_id": {"samples": [["party_42ada57b-3bbb-4967-acff-..."]], "type": "string"}, "next_actions": {"items": {"type": "string"}, "samples": [["Contact employer"]], "type": "array"}, "summary": {"samples": [["Computer other three agent bil..."]], "type": "string"}}, "type": "object"}, "opened_at": {"samples": ["2025-07-10T04:01:03.431749Z"], "type": "string"}, "referrals": {"items": {"Flavor": "", "properties": {"outcome": {"samples": [["accepted"]], "type": "string"}, "reference_id": {"samples": [["REF-49221592"]], "type": "string"}, "referred_at": {"samples": ["2025-03-21T19:34:52.431749Z"], "type": "string"}, "referred_to": {"samples": ["LawEnforcement"], "type": "string"}}, "type": "object"}, "samples": [[{"outcome": null, "reference_id": "REF-18597257", "referred_at": "2025-11-20T19:42:21.431749Z", "referred_to": "LawEnforcement"}]], "type": "array"}, "risk_assessment_id": {"samples": [["risk_78bf7fe0-71d8-4db2-9727-4..."]], "type": "string"}, "severity": {"samples": ["critical"], "type": "string"}, "signals": {"items": {"Flavor": "", "properties": {"description": {"samples": [["Deep push with few blue standa..."]], "type": "string"}, "observed_at": {"samples": [["2025-03-11T19:38:16.431749Z"]], "type": "string"}, "score_impact": {"samples": [[6.31]], "type": "number"}, "signal_type": {"samples": ["duplicate_document"], "type": "string"}, "source": {"samples": [["adjuster"]], "type": "string"}}, "type": "object"}, "samples": [[{"description": null, "observed_at": "2025-12-11T19:42:21.431749Z", "score_impact": 14.94, "signal_type": "velocity", "source": "adjuster"}]], "type": "array"}, "status": {"samples": ["closed"], "type": "string"}, "suspected_fraud_types": {"items": {"type": "string"}, "samples": [["identity_theft"]], "type": "array"}, "updated_at": {"samples": ["2025-12-15T15:12:03.431749Z"], "type": "string"}}, "type": "object"}, "`training_bucket`.`Claims_Processing_and_Risk_Assessment_scope`.`risk_assessments`": {"Flavor": "", "properties": {"assessed_at": {"samples": ["2025-10-17T15:12:03.431749Z"], "type": "string"}, "assessment_type": {"samples": ["coverage_risk"], "type": "string"}, "claim_id": {"samples": ["claim_03dabfd9-22b9-48af-8d31-..."], "type": "string"}, "created_at": {"samples": ["2025-10-17T15:12:03.431749Z"], "type": "string"}, "decision": {"properties": {"decided_at": {"samples": [["2025-11-08T15:12:03.431749Z"]], "type": "string"}, "decided_by_id": {"samples": [["party_83738baa-a72e-4825-b88f-..."]], "type": "string"}, "decision_status": {"samples": ["approved"], "type": "string"}, "notes": {"samples": [["Listen could year reach start."]], "type": "string"}}, "type": "object"}, "exposure_id": {"samples": [["exposure_376f9502-be93-4a94-ba..."]], "type": "string"}, "inputs": {"properties": {"incurred_amount": {"samples": [8331.91], "type": "number"}, "jurisdiction_state": {"samples": [["AZ"]], "type": "string"}, "loss_type": {"samples": ["collision"], "type": "string"}}, "type": "object"}, "model": {"properties": {"name": {"samples": ["claims-risk-model"], "type": "string"}, "provider": {"samples": [["acme_ai"]], "type": "string"}, "version": {"samples": ["1.0"], "type": "string"}}, "type": "object"}, "reasons": {"items": {"Flavor": "", "properties": {"code": {"samples": ["HIGH_AMOUNT"], "type": "string"}, "description": {"samples": [["Kitchen local edge environment..."]], "type": "string"}, "weight": {"samples": [[0.21]], "type": "number"}}, "type": "object"}, "samples": [[{"code": "HIGH_AMOUNT", "description": null, "weight": 0.45}]], "type": "array"}, "recommendation": {"samples": ["auto_approve"], "type": "string"}, "score": {"samples": [9.95], "type": "number"}, "score_band": {"samples": ["high"], "type": "string"}, "triggered_rules": {"items": {"Flavor": "", "properties": {"details": {"properties": {"value": {"samples": ["as"], "type": "string"}}, "type": "object"}, "outcome": {"samples": ["hit"], "type": "string"}, "rule_id": {"samples": ["R111"], "type": "string"}, "rule_name": {"samples": ["DuplicateInvoice"], "type": "string"}}, "type": "object"}, "samples": [[{"details": null, "outcome": "pass", "rule_id": "R471", "rule_name": "GeoMismatch"}]], "type": "array"}, "updated_at": {"samples": ["2025-10-18T12:12:03.431749Z"], "type": "string"}}, "type": "object"}, "`training_bucket`.`Claims_Processing_and_Risk_Assessment_scope`.`tasks`": {"Flavor": "", "properties": {"assigned_to": {"properties": {"assignee_id": {"samples": ["party_4fa3941e-1ab1-410e-a7b7-..."], "type": "string"}, "assignee_type": {"samples": ["queue"], "type": "string"}}, "type": "object"}, "checklist": {"items": {"Flavor": "", "properties": {"done": {"samples": [false], "type": "boolean"}, "done_at": {"samples": [["2025-09-27T13:12:03.431749Z"]], "type": "string"}, "item": {"samples": ["Call customer"], "type": "string"}}, "type": "object"}, "samples": [[{"done": true, "done_at": "2025-11-29T11:12:03.431749Z", "item": "Call customer"}]], "type": "array"}, "claim_id": {"samples": [["claim_15244e29-f039-40f4-886e-..."]], "type": "string"}, "completed_at": {"samples": [["2025-09-10T20:12:03.431749Z"]], "type": "string"}, "created_at": {"samples": ["2025-11-24T11:12:03.431749Z"], "type": "string"}, "description": {"samples": [["Field avoid commercial the hav..."]], "type": "string"}, "due_at": {"samples": [["2025-09-15T23:12:03.431749Z"]], "type": "string"}, "exposure_id": {"samples": [["exposure_0539f956-f198-4ef5-9e..."]], "type": "string"}, "priority": {"samples": ["high"], "type": "string"}, "status": {"samples": ["blocked"], "type": "string"}, "task_type": {"samples": ["approve_payment"], "type": "string"}, "title": {"samples": ["Approve Payment"], "type": "string"}, "updated_at": {"samples": ["2025-12-20T16:12:03.431749Z"], "type": "string"}}, "type": "object"}, "`training_bucket`.`Claims_Processing_and_Risk_Assessment_scope`.`claim_events`": {"Flavor": "", "properties": {"actor": {"properties": {"actor_id": {"samples": [["party_47123c75-a833-492c-847c-..."]], "type": "string"}, "actor_type": {"samples": ["service"], "type": "string"}, "display_name": {"samples": [["Christopher Reyes"]], "type": "string"}}, "type": "object"}, "channel": {"samples": [["api"]], "type": "string"}, "claim_id": {"samples": ["claim_04b64eae-0ba4-497d-8a55-..."], "type": "string"}, "correlation_id": {"samples": [["0281c299-b3dd-45c5-8bbf-a063e0..."]], "type": "string"}, "created_at": {"samples": ["2025-03-14T02:52:23.431749Z"], "type": "string"}, "event_at": {"samples": ["2025-03-14T02:52:03.431749Z"], "type": "string"}, "event_type": {"samples": ["claim_created"], "type": "string"}, "exposure_id": {"samples": [["exposure_5e9aa322-6db5-4c06-93..."]], "type": "string"}, "payload": {"properties": {"amount": {"samples": [836.32], "type": "number"}, "currency": {"samples": ["USD"], "type": "string"}, "document_type": {"samples": ["estimate"], "type": "string"}, "from": {"samples": ["open"], "type": "string"}, "reason": {"samples": [["claimant_withdrew"]], "type": "string"}, "to": {"samples": ["closed"], "type": "string"}}, "type": "object"}}, "type": "object"}, "`training_bucket`.`Claims_Processing_and_Risk_Assessment_scope`.`payments`": {"Flavor": "`currency` = \"USD\"", "properties": {"amount": {"samples": [10], "type": "number"}, "claim_id": {"samples": ["claim_0f5e162b-4a58-408e-acc2-..."], "type": "string"}, "cleared_at": {"samples": [["2025-04-26T23:56:16.431749Z"]], "type": "string"}, "created_at": {"samples": ["2025-01-18T14:05:55.431749Z"], "type": "string"}, "currency": {"samples": ["USD"], "type": "string"}, "exposure_id": {"samples": [["exposure_2e21cdbf-770a-4b14-b6..."]], "type": "string"}, "issued_at": {"samples": [["2025-02-14T03:28:51.431749Z"]], "type": "string"}, "method": {"samples": ["ach"], "type": "string"}, "notes": {"samples": [["Name artist better religious."]], "type": "string"}, "payee_party_id": {"samples": ["party_01a727ff-0931-4c2c-8564-..."], "type": "string"}, "payment_type": {"samples": ["expense"], "type": "string"}, "reference": {"properties": {"bank_trace_id": {"samples": [["TRC167884663415"]], "type": "string"}, "check_number": {"samples": [["912992"]], "type": "string"}, "external_payment_id": {"samples": [["ext_026e974b-8c12-4515-8865-da..."]], "type": "string"}}, "type": "object"}, "scheduled_at": {"samples": [["2025-05-08T20:58:06.431749Z"]], "type": "string"}, "status": {"samples": ["cleared"], "type": "string"}, "updated_at": {"samples": ["2025-01-19T02:05:55.431749Z"], "type": "string"}}, "type": "object"}, "`training_bucket`.`Claims_Processing_and_Risk_Assessment_scope`.`claim_documents`": {"Flavor": "", "properties": {"claim_id": {"samples": ["claim_0837e3ed-7c5e-4c47-84cb-..."], "type": "string"}, "created_at": {"samples": ["2025-03-05T15:07:01.431749Z"], "type": "string"}, "document_type": {"samples": ["estimate"], "type": "string"}, "exposure_id": {"samples": [["exposure_10365d20-442e-4d4e-b1..."]], "type": "string"}, "extracted_entities": {"items": {"properties": {"confidence": {"samples": [0.65], "type": "number"}, "entity_type": {"samples": ["provider"], "type": "string"}, "value": {"samples": ["Bradley Group"], "type": "string"}}, "type": "object"}, "samples": [[{"confidence": 0.74, "entity_type": "amount", "value": "4912.13"}]], "type": "array"}, "received_at": {"samples": ["2025-03-05T13:31:01.431749Z"], "type": "string"}, "source": {"samples": ["api_ingest"], "type": "string"}, "storage": {"properties": {"bucket": {"samples": [["claims-docs-1"]], "type": "string"}, "content_type": {"samples": [["application/pdf"]], "type": "string"}, "object_key": {"samples": ["claim_0837e3ed-7c5e-4c47-84cb-..."], "type": "string"}, "provider": {"samples": ["azure_blob"], "type": "string"}, "sha256": {"samples": [["3e164b03ce3277f4f85ea5593a9c9c..."]], "type": "string"}, "size_bytes": {"samples": [[266291]], "type": "number"}}, "type": "object"}, "tags": {"items": {"type": "string"}, "samples": [["evidence"]], "type": "array"}, "title": {"samples": ["Invoice - Cup"], "type": "string"}, "updated_at": {"samples": ["2025-03-05T16:33:01.431749Z"], "type": "string"}}, "type": "object"}, "`training_bucket`.`Claims_Processing_and_Risk_Assessment_scope`.`claim_exposures`": {"Flavor": "", "properties": {"claim_id": {"samples": ["claim_01dd7b1a-70b4-438d-af5c-..."], "type": "string"}, "claimant_party_id": {"samples": [["party_6076175a-2329-405a-b2a6-..."]], "type": "string"}, "closed_at": {"samples": [["2025-01-30T12:48:12.431749Z"]], "type": "string"}, "coverage_code": {"samples": [["BI"]], "type": "string"}, "created_at": {"samples": ["2025-01-21T10:48:12.431749Z"], "type": "string"}, "exposure_type": {"samples": ["bodily_injury"], "type": "string"}, "injury_or_damage": {"samples": [["fire_damage"]], "type": "string"}, "loss_details": {"properties": {"estimated_amount": {"samples": [1577.88], "type": "number"}, "narrative": {"samples": ["Alone second back then machine..."], "type": "string"}, "severity": {"samples": ["minor"], "type": "string"}}, "type": "object"}, "opened_at": {"samples": ["2025-01-21T10:48:12.431749Z"], "type": "string"}, "reserves": {"items": {"properties": {"amount": {"samples": [0], "type": "number"}, "reserve_type": {"samples": ["expense"], "type": "string"}, "set_at": {"samples": ["2025-01-29T02:48:12.431749Z"], "type": "string"}, "set_by_id": {"samples": ["party_29498b44-9fea-468b-b073-..."], "type": "string"}}, "type": "object"}, "samples": [[{"amount": 3715.5, "reserve_type": "expense", "set_at": "2025-03-06T10:16:24.431749Z", "set_by_id": "party_7144be9f-86e7-4a7f-b418-8fe08f1432bb"}]], "type": "array"}, "status": {"samples": ["closed"], "type": "string"}, "updated_at": {"samples": ["2025-01-28T12:48:12.431749Z"], "type": "string"}}, "type": "object"}, "`training_bucket`.`Claims_Processing_and_Risk_Assessment_scope`.`claims`": {"Flavor": "", "properties": {"claim_number": {"samples": ["CL-2025-2279474"], "type": "string"}, "claimant_id": {"samples": ["claimant_56e881f4-dcdd-4b60-a6..."], "type": "string"}, "closed_at": {"samples": [["2025-04-02T22:16:14.431749Z"]], "type": "string"}, "created_at": {"samples": ["2024-12-25T06:00:52.431749Z"], "type": "string"}, "description": {"samples": ["Detail believe third ever town..."], "type": "string"}, "financials": {"properties": {"currency": {"samples": ["USD"], "type": "string"}, "incurred_amount": {"samples": [23905.18], "type": "number"}, "paid_amount": {"samples": [4926.12], "type": "number"}, "reserve_amount": {"samples": [11952.59], "type": "number"}}, "type": "object"}, "jurisdiction_state": {"samples": [["CO"]], "type": "string"}, "location": {"properties": {"city": {"samples": [["East Marvinstad"]], "type": "string"}, "country": {"samples": [["US"]], "type": "string"}, "geo": {"properties": {"lat": {"samples": [[30.891814]], "type": "number"}, "lon": {"samples": [[-122.953276]], "type": "number"}}, "type": "object"}, "line1": {"samples": [["18846 Colleen Throughway Suite..."]], "type": "string"}, "postal_code": {"samples": [["20894"]], "type": "string"}, "state": {"samples": [["CO"]], "type": "string"}}, "type": "object"}, "loss_cause_code": {"samples": [["BURGLARY"]], "type": "string"}, "loss_date": {"samples": ["2024-12-24T06:00:52.431749Z"], "type": "string"}, "loss_type": {"samples": ["collision"], "type": "string"}, "opened_at": {"samples": ["2024-12-25T06:00:52.431749Z"], "type": "string"}, "parties": {"items": {"Flavor": "", "properties": {"notes": {"samples": [["Him father matter media indica..."]], "type": "string"}, "party_id": {"samples": ["party_026f24e8-d348-4148-a031-..."], "type": "string"}, "party_role": {"samples": ["adjuster"], "type": "string"}}, "type": "object"}, "samples": [[{"notes": null, "party_id": "party_0d2e6ccf-6645-4c19-9acd-0b86df743342", "party_role": "claimant"}]], "type": "array"}, "policy_id": {"samples": ["policy_9701e37b-30d8-485c-9845..."], "type": "string"}, "reported_at": {"samples": ["2024-12-24T08:00:52.431749Z"], "type": "string"}, "reported_by_id": {"samples": [["claimant_57a14d91-3c98-426f-9b..."]], "type": "string"}, "risk_snapshot": {"properties": {"assessed_at": {"samples": [["2024-12-28T12:00:52.431749Z"]], "type": "string"}, "model_version": {"samples": [["v1.3.2"]], "type": "string"}, "risk_level": {"samples": [["high"]], "type": "string"}, "risk_score": {"samples": [[34.6]], "type": "number"}}, "type": "object"}, "status": {"samples": ["closed"], "type": "string"}, "status_reason": {"samples": [["awaiting_police_report"]], "type": "string"}, "updated_at": {"samples": ["2025-12-17T15:12:03.431749Z"], "type": "string"}}, "type": "object"}, "`training_bucket`.`Claims_Processing_and_Risk_Assessment_scope`.`policies`": {"Flavor": "", "properties": {"coverages": {"items": {"Flavor": "", "properties": {"coverage_code": {"samples": ["CP_BI"], "type": "string"}, "deductible_amount": {"samples": [0], "type": "number"}, "description": {"samples": [["Building"]], "type": "string"}, "limit_amount": {"samples": [50000], "type": "number"}, "waiting_period_days": {"samples": [[3]], "type": "number"}}, "type": "object"}, "samples": [[{"coverage_code": "CP_BLDG", "deductible_amount": 10000, "description": "Building", "limit_amount": 1000000, "waiting_period_days": null}]], "type": "array"}, "created_at": {"samples": ["2023-01-18T15:12:03.431749Z"], "type": "string"}, "effective_date": {"samples": ["2023-02-10T15:12:03.431749Z"], "type": "string"}, "expiration_date": {"samples": ["2024-02-10T15:12:03.431749Z"], "type": "string"}, "insured_objects": {"items": {"Flavor": "", "properties": {"attributes": {"properties": {"address": {"samples": ["3907 Katherine Manor"], "type": "string"}, "annual_revenue": {"samples": [2453475], "type": "number"}, "construction": {"samples": ["frame"], "type": "string"}, "employees": {"samples": [59], "type": "number"}, "industry": {"samples": ["Applications developer"], "type": "string"}, "make": {"samples": ["Ford"], "type": "string"}, "model": {"samples": ["Itself"], "type": "string"}, "naics": {"samples": ["125630"], "type": "string"}, "year": {"samples": [2008], "type": "number"}, "year_built": {"samples": [1962], "type": "number"}}, "type": "object"}, "object_ref": {"samples": [["VIN1781676429960"]], "type": "string"}, "object_type": {"samples": ["business"], "type": "string"}}, "type": "object"}, "samples": [[{"attributes": {"annual_revenue": 3320709, "industry": "Applications developer"}, "object_ref": null, "object_type": "business"}]], "type": "array"}, "insurer_id": {"samples": ["insurer_13"], "type": "string"}, "line_of_business": {"samples": ["auto"], "type": "string"}, "policy_number": {"samples": ["PL-130805-4159"], "type": "string"}, "policyholder_id": {"samples": ["claimant_2ab6c624-52f3-4f7c-87..."], "type": "string"}, "state": {"samples": ["AZ"], "type": "string"}, "status": {"samples": ["active"], "type": "string"}, "underwriting": {"properties": {"initial_risk_score": {"samples": [[1]], "type": "number"}, "notes": {"samples": [["Campaign however culture attor..."]], "type": "string"}, "tier": {"samples": [["non_standard"]], "type": "string"}}, "type": "object"}, "updated_at": {"samples": ["2023-02-13T15:12:03.431749Z"], "type": "string"}}, "type": "object"}, "`training_bucket`.`Claims_Processing_and_Risk_Assessment_scope`.`claimants`": {"Flavor": "", "properties": {"addresses": {"items": {"Flavor": "`country` = \"US\"", "properties": {"city": {"samples": ["Crawfordland"], "type": "string"}, "country": {"samples": ["US"], "type": "string"}, "line1": {"samples": ["047 Jordan Prairie Suite 697"], "type": "string"}, "line2": {"samples": [["Apt. 865"]], "type": "string"}, "postal_code": {"samples": ["11716"], "type": "string"}, "state": {"samples": ["AZ"], "type": "string"}, "type": {"samples": ["business"], "type": "string"}}, "type": "object"}, "samples": [[{"city": "Crawfordland", "country": "US", "line1": "588 Scott Hills", "line2": null, "postal_code": "41658", "state": "NH", "type": "home"}]], "type": "array"}, "claimant_type": {"samples": ["business"], "type": "string"}, "consents": {"items": {"Flavor": "", "properties": {"expires_at": {"samples": [["2024-10-04T15:12:03.431749Z"]], "type": "string"}, "granted": {"samples": [false], "type": "boolean"}, "granted_at": {"samples": [["2024-08-17T15:12:03.431749Z"]], "type": "string"}, "type": {"samples": ["data_processing"], "type": "string"}}, "type": "object"}, "samples": [[{"expires_at": null, "granted": true, "granted_at": "2024-03-24T15:12:03.431749Z", "type": "third_party_sharing"}]], "type": "array"}, "created_at": {"samples": ["2024-03-22T15:12:03.431749Z"], "type": "string"}, "date_of_birth": {"samples": [["1941-09-09"]], "type": "string"}, "email": {"samples": [["chavezbeverly@example.com"]], "type": "string"}, "full_name": {"samples": ["Amanda Perez"], "type": "string"}, "kyc": {"properties": {"status": {"samples": ["failed"], "type": "string"}, "verification_method": {"samples": [["biometric"]], "type": "string"}, "verified_at": {"samples": [["2024-03-20T19:12:03.431749Z"]], "type": "string"}, "watchlist_hit": {"samples": [false], "type": "boolean"}}, "type": "object"}, "phone": {"samples": [["(569)839-9080"]], "type": "string"}, "status": {"samples": ["active"], "type": "string"}, "tax_id": {"samples": [["203-35-2494"]], "type": "string"}, "updated_at": {"samples": ["2024-03-30T07:12:03.431749Z"], "type": "string"}}, "type": "object"}}

This schema describes the structure of the data in the specified bucket and scope. It includes information about the collections, fields, and their data types.

Question:
List organization records (not individuals) that have a phone contact available. Show their display name, official legal name, and the phone number.

The SQL++ query you generated:

SELECT p.display_name, p.legal_name, c.value AS phone_number FROM training_bucket.Claims_Processing_and_Risk_Assessment_scope.parties AS p INNER UNNEST p.contacts AS c WHERE p.party_type = "organization" AND c.type = "phone"


returned an error:

<error>
syntax error - line 1, column 40, near \'...me, p.legal_name, c.\', at: value (reserved word)
</error>

Please analyze the error and provide a refined SQL++ query.
<|im_end|>
<|im_start|>assistant

<feedback>
Error Type: Identifier Error.
Root cause: The message "at: value (reserved word)" indicates `value` cannot be used unescaped as a field identifier, so `c.value` fails to parse.
Fix: Use backticks: c.`value`. Focus keyword compliance: uses INNER UNNEST to ensure only parties that actually have a phone contact are returned, matching the intent.
</feedback>

Refined SQL++ query:

SELECT p.display_name, p.legal_name, c.value AS phone_number FROM training_bucket.Claims_Processing_and_Risk_Assessment_scope.parties AS p INNER UNNEST p.contacts AS c WHERE p.party_type = "organization" AND c.type = "phone";

<|im_end|>

Description
Model synced from source: jastorj/couchmind-v5.7.8.1_arctic_stage_3-cw-24K-16bit
Readme 39 KiB
Languages
Jinja 100%