[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XGJYYYPVQW1FH2873KBPC5":3,"skill-same:01M6XGJYYYPVQW1FH2873KBPC5":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M6XGJYYYPVQW1FH2873KBPC5","insurance-claim-routing-demo",null,"Interactive demo: Generate pseudo-labels from a strong teacher model, build a cheap student function, and evaluate accuracy. Showcases pseudo-labeling and teacher-student distillation.","FDU-INS\u002FInsurance-Skills","FDU-INS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F167067594?v=4","01M6XEYMRS4CVJMZ834YWE66BV","FDU-Insurance","01M6XEYMXPDA34HFM0ZE6AY78G",82,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FFDU-INS\u002FInsurance-Skills\u002Fblob\u002Fmain\u002FSkills\u002Finsurance-claim-routing-demo\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],"routing","insurance claim routing demo","insurance","claim","demo","interactive","build","model","demos","distillation","Teacher-Student","accuracy","evaluate","labels","student","teacher","generate","2026-11-10 10:12:30",false,"---\nname: insurance-claim-routing-demo\ndescription: \"Interactive demo: Generate pseudo-labels from a strong teacher model, build a cheap student function, and evaluate accuracy. Showcases pseudo-labeling and teacher-student distillation.\"\nparent_skill: demos\n---\n\u003C!-- Copyright (c) 2026 Snowflake Inc. All rights reserved.\n     Licensed under the Snowflake Skills License. See LICENSE file. -->\n\n# Insurance Claim Routing Demo\n\nBuild an AI function that routes insurance claims using pseudo-labeled training data.\n\n## Overview\n\nSeed input-only data → pseudo-label with a strong teacher → build a cheap student function → evaluate. **Estimated time:** ~10 minutes.\n\n## Workflow\n\n### Step 1: Introduction\n\nExplain to user:\n```\nWelcome to the Pseudo-Labeling & Teacher-Student Distillation Demo!\n\nAt the end of this demo, you will witness the Cortex AI Function Studio's ability to:\n- Generate pseudo-labels using a strong teacher model (no labeled data needed!)\n- Build a cheap student model that reproduces teacher-quality decisions\n- Evaluate how closely the student matches the teacher using the exact_match metric\n\nThis demo starts with unlabeled claim intake records. We will use a strong\nteacher model to create routing labels, then build a cheaper student model\nand measure how closely it reproduces those decisions.\n\nClaim routes:\n- fast_track_auto\n- property_damage\n- injury_review\n- fraud_review\n- documentation_needed\n- manual_specialist_review\n\nObjects created: all prefixed with DEMO_ for easy cleanup.\n```\n\n### Step 2: Setup - Choose Location\n\nIf `{database}` and `{schema}` are already known from the prerequisite flow, accept them silently and skip the prompt.\n\nOtherwise, ask user:\n```\nWhere would you like to create the demo objects?\n\nDatabase: [e.g., TEMP]\nSchema: [e.g., PUBLIC]\n```\n\nStore the database and schema for use throughout the demo.\n\n### Step 3: Create Input-Only Sample Data\n\nExplain to user:\n```\nI'll load 80 realistic insurance claim intake records from a pre-generated set:\nauto collisions, property damage, theft, injury, fraud, and documentation cases.\n\nColumns:\n- CLAIM_SUMMARY  (pre-generated, unique per row)\n- INCIDENT_CHANNEL\n- CUSTOMER_SEGMENT\n\nI'll create:\n- {database}.{schema}.DEMO_CLAIMS_UNLABELED\n```\n\nRun the data generation script:\n```bash\nPYTHONPATH=\u003CSKILL_DIRECTORY>\u002Fsrc uv run --project \u003CSKILL_DIRECTORY> python \u003CSKILL_DIRECTORY>\u002Fsrc\u002Fgenerate_claims_data.py load \\\n  --connection \u003CCONNECTION_NAME> \\\n  --database {database} \\\n  --schema {schema}\n```\n\n**Note:** Replace `\u003CSKILL_DIRECTORY>` with the absolute path to the cortex-ai-function-studio skill directory, and `\u003CCONNECTION_NAME>` with the active Snowflake connection.\n\nVerify creation and confirm summaries are diverse:\n```sql\nSELECT COUNT(*) FROM {database}.{schema}.DEMO_CLAIMS_UNLABELED;\n\nSELECT LEFT(CLAIM_SUMMARY, 150) AS SUMMARY_PREVIEW, INCIDENT_CHANNEL, CUSTOMER_SEGMENT\nFROM {database}.{schema}.DEMO_CLAIMS_UNLABELED\nLIMIT 5;\n```\n\n### Step 4: Pseudo-Label with Teacher Model\n\nPresent the pseudo-label configuration:\n```\nNow we'll use a strong teacher model to label each claim intake row.\n\nDefault teacher model: claude-opus-4-6 (or the strongest available Claude Opus variant)\nFallback: use the strongest available Claude-family model in the account\n\nSource table: {database}.{schema}.DEMO_CLAIMS_UNLABELED\nInput columns: CLAIM_SUMMARY, INCIDENT_CHANNEL, CUSTOMER_SEGMENT\nOutput fields:\n  - claim_route (string) — routing category\nDestination table: {database}.{schema}.DEMO_CLAIMS_DATA\n```\n\nIf the default teacher model is unavailable, **load** `references\u002Fmodel_selection.md` and choose the strongest Claude-family option.\n\n**MANDATORY:** Do not synthesize labels ad hoc in this demo. **Load** `synthetic-data\u002FSKILL.md` and follow the **Pseudo-Label Input-Only Tables** workflow.\n\nPass this context into that workflow:\n- `source_table`: `{database}.{schema}.DEMO_CLAIMS_UNLABELED`\n- `input_columns`: `['CLAIM_SUMMARY', 'INCIDENT_CHANNEL', 'CUSTOMER_SEGMENT']`\n- `output_table`: `{database}.{schema}.DEMO_CLAIMS_DATA`\n- `model`: `{teacher_model}`\n- `task_description`: `Classify each claim intake row into exactly one routing category: fast_track_auto, property_damage, injury_review, fraud_review, documentation_needed, or manual_specialist_review.`\n- `output_schema`: `{\"properties\": {\"claim_route\": {\"type\": \"string\", \"description\": \"One of: fast_track_auto, property_damage, injury_review, fraud_review, documentation_needed, manual_specialist_review\"}}}`\n- `preview_rows`: `0`\n\nThe label-synthesis workflow must:\n- skip the preview step and label all rows in one pass\n- continue with `EXPECTED` as the default label column\n\nShow the label distribution after labeling completes:\n```sql\nSELECT EXPECTED:claim_route::STRING AS CLAIM_ROUTE, COUNT(*) AS ROWS\nFROM {database}.{schema}.DEMO_CLAIMS_DATA\nGROUP BY 1\nORDER BY ROWS DESC;\n```\n\nThe pseudo-label workflow stores labels as a VARIANT column (`EXPECTED`). Since our output has a single field, convert it to a plain string column for evaluation:\n```sql\nALTER TABLE {database}.{schema}.DEMO_CLAIMS_DATA ADD COLUMN EXPECTED_OUTPUT VARCHAR;\nUPDATE {database}.{schema}.DEMO_CLAIMS_DATA SET EXPECTED_OUTPUT = EXPECTED:claim_route::STRING;\nALTER TABLE {database}.{schema}.DEMO_CLAIMS_DATA DROP COLUMN EXPECTED;\n```\n\n### Step 5: Create the Student AI Function\n\nPresent the function configuration:\n```\nNow we'll create a cheaper student model for claim routing.\n\nDefault student model: llama3.1-8b\n\nFunction name: DEMO_ROUTE_CLAIM\nInputs: CLAIM_SUMMARY, INCIDENT_CHANNEL, CUSTOMER_SEGMENT\nOutputs:\n  - claim_route (string) — routing category\nSystem prompt:\n\"You are an insurance claim routing system. Given a claim summary, incident\nchannel, and customer segment, classify the claim into exactly one route:\nfast_track_auto, property_damage, injury_review, fraud_review,\ndocumentation_needed, or manual_specialist_review.\"\n\nUser prompt template:\n\"Claim summary: {CLAIM_SUMMARY}\\nIncident channel: {INCIDENT_CHANNEL}\\nCustomer segment: {CUSTOMER_SEGMENT}\"\n```\n\n**⚠️ STOP**: Wait for user confirmation before creating the function.\n\n**Load** `create\u002FSKILL.md` and follow it from **Step 7 onward**, passing:\n- `database`, `schema`\n- `function_name`: `DEMO_ROUTE_CLAIM`\n- `function_intention`: `Route insurance claims to the correct processing track.`\n- `model`: chosen student model\n- `inputs`: `[{\"name\": \"CLAIM_SUMMARY\", \"sql_type\": \"VARCHAR\"}, {\"name\": \"INCIDENT_CHANNEL\", \"sql_type\": \"VARCHAR\"}, {\"name\": \"CUSTOMER_SEGMENT\", \"sql_type\": \"VARCHAR\"}]`\n- `outputs`: `[{\"name\": \"claim_route\", \"json_type\": \"string\", \"description\": \"One of: fast_track_auto, property_damage, injury_review, fraud_review, documentation_needed, manual_specialist_review\"}]`\n- `system_prompt`: confirmed prompt\n- `user_prompt_template`: `Claim summary: {CLAIM_SUMMARY}\\nIncident channel: {INCIDENT_CHANNEL}\\nCustomer segment: {CUSTOMER_SEGMENT}`\n\nReturn here after the smoke test succeeds.\n\n### Step 6: Evaluate the Student AI Function\n\nPresent the evaluation configuration:\n```\nLet's evaluate how well the student model routes claims.\n\nSince the function returns a single claim_route string, the built-in\nexact_match metric works perfectly — it compares the predicted route\ndirectly against the teacher-labeled EXPECTED_OUTPUT.\n\nDefault metric: exact_match\nResults table: DEMO_ROUTE_CLAIM_EVAL_RESULTS\n```\n\n**⚠️ STOP**: Wait for user confirmation before running evaluation.\n\n**Load** `evaluate\u002FSKILL.md` and follow it from **Step 5 onward**, passing:\n- `function_name`: `{database}.{schema}.DEMO_ROUTE_CLAIM`\n- `function_model`: chosen student model\n- `test_table`: `{database}.{schema}.DEMO_CLAIMS_DATA`\n- `input_columns`: `['CLAIM_SUMMARY', 'INCIDENT_CHANNEL', 'CUSTOMER_SEGMENT']`\n- `label_column`: `EXPECTED_OUTPUT`\n- `metric`: `exact_match`\n- `results_table`: `{database}.{schema}.DEMO_ROUTE_CLAIM_EVAL_RESULTS`\n\n**Async by default:** When the evaluate workflow reaches the execution mode selection, choose **async** (`EVALUATE_AI_FUNCTION_ASYNC`) without asking the user. If the async SPROC returns an error string (e.g., warehouse permission issue), inform the user and fall back to sync execution (`EVALUATE_AI_FUNCTION`) instead. After kicking off the async job, poll `TASK_HISTORY()` for completion within this session rather than asking the user to return later — this is a guided demo. **Load** `references\u002Fasync_status.md` for polling patterns.\n\n**Skip Step 6 (next steps)** in the evaluate workflow — return here after results are presented.\n\nOnce evaluation is done, review the results. Show the scores to the user. Offer to see what cases did not match:\n```\nWould you like to see which claims the function routed incorrectly?\n```\n\nIf yes, query the results table:\n```sql\nSELECT\n    LEFT(INPUT_TEXT, 150) AS SUMMARY_PREVIEW,\n    EXPECTED AS EXPECTED_ROUTE,\n    PREDICTED AS PREDICTED_ROUTE,\n    SCORE,\n    FEEDBACK\nFROM {database}.{schema}.DEMO_ROUTE_CLAIM_EVAL_RESULTS\nWHERE SCORE \u003C 1.0\nORDER BY SCORE\nLIMIT 20;\n```\n\nDiscuss common failure patterns. Explain that labels are teacher-generated (pseudo-labels), not human ground truth.\n\nAfter reviewing results, continue to Step 7.\n\n### Step 7: Cleanup\n\nAsk user:\n```\nThe Insurance Claim Routing demo is complete!\n\nWould you like to clean up the demo objects?\n\nThis will drop:\n- {database}.{schema}.DEMO_CLAIMS_UNLABELED\n- {database}.{schema}.DEMO_CLAIMS_DATA\n- {database}.{schema}.DEMO_ROUTE_CLAIM\n- {database}.{schema}.DEMO_ROUTE_CLAIM_EVAL_RESULTS\n```\n\n**⚠️ STOP**: Wait for user confirmation before cleanup.\n\nIf yes, execute:\n```sql\nDROP TABLE IF EXISTS {database}.{schema}.DEMO_CLAIMS_UNLABELED;\nDROP TABLE IF EXISTS {database}.{schema}.DEMO_CLAIMS_DATA;\nDROP FUNCTION IF EXISTS {database}.{schema}.DEMO_ROUTE_CLAIM(VARCHAR, VARCHAR, VARCHAR);\nDROP TABLE IF EXISTS {database}.{schema}.DEMO_ROUTE_CLAIM_EVAL_RESULTS;\n```\n\n### Step 8: Next Steps\n\nSummarize the workflow: unlabeled data → teacher pseudo-labels → cheap student function → evaluation.\n\nExplain to user:\n```\nYou completed the pseudo-labeling and teacher-student distillation workflow:\n\n1. Loaded unlabeled insurance claim intake records\n2. Used a strong teacher model (Claude Opus) to generate routing labels\n3. Built a cheaper student model to reproduce teacher routing decisions\n4. Evaluated the student against teacher labels using exact_match\n\nKey takeaways:\n\n  Pseudo-labeling: When you don't have labeled data, a strong teacher model\n  can generate high-quality training labels from your unlabeled data. This\n  is dramatically faster than manual annotation.\n\n  Teacher-student distillation: Once you have labels, you can train a cheap\n  student model that approaches teacher quality at a fraction of the cost.\n\nWant to build richer evaluation metrics? Try the \"Custom Evaluation Metrics\" demo.\nWant to optimize the student's prompt? Try the \"Prompt Optimization\" demo.\n```\n\n## Key Cautions\n\n- Pseudo-labels are teacher-generated, not human ground truth\n- Insurance routing is regulated — keep human review for high-stakes decisions (fraud_review, injury_review)\n- Some model names may not be available in every account or region\n\n## Stopping Points\n\n- ✋ Step 1: After introduction\n- ✋ Step 2: After choosing database and schema\n- ✋ Step 4: Before pseudo-labeling\n- ✋ Step 5: Before creating the student function\n- ✋ Step 6: Before evaluation\n- ✋ Step 7: Before cleanup\n","\u003C!-- Copyright (c) 2026 Snowflake Inc. All rights reserved.\n     Licensed under the Snowflake Skills License. See LICENSE file. -->\n\n# Insurance Claim Routing Demo\n\nBuild an AI function that routes insurance claims using pseudo-labeled training data.\n\n## Overview\n\nSeed input-only data → pseudo-label with a strong teacher → build a cheap student function → evaluate. **Estimated time:** ~10 minutes.\n\n## Workflow\n\n### Step 1: Introduction\n\nExplain to user:\n```\nWelcome to the Pseudo-Labeling & Teacher-Student Distillation Demo!\n\nAt the end of this demo, you will witness the Cortex AI Function Studio's ability to:\n- Generate pseudo-labels using a strong teacher model (no labeled data needed!)\n- Build a cheap student model that reproduces teacher-quality decisions\n- Evaluate how closely the student matches the teacher using the exact_match metric\n\nThis demo starts with unlabeled claim intake records. We will use a strong\nteacher model to create routing labels, then build a cheaper student model\nand measure how closely it reproduces those decisions.\n\nClaim routes:\n- fast_track_auto\n- property_damage\n- injury_review\n- fraud_review\n- documentation_needed\n- manual_specialist_review\n\nObjects created: all prefixed with DEMO_ for easy cleanup.\n```\n\n### Step 2: Setup - Choose Location\n\nIf `{database}` and `{schema}` are already known from the prerequisite flow, accept them silently and skip the prompt.\n\nOtherwise, ask user:\n```\nWhere would you like to create the demo objects?\n\nDatabase: [e.g., TEMP]\nSchema: [e.g., PUBLIC]\n```\n\nStore the database and schema for use throughout the demo.\n\n### Step 3: Create Input-Only Sample Data\n\nExplain to user:\n```\nI'll load 80 realistic insurance claim intake records from a pre-generated set:\nauto collisions, property damage, theft, injury, fraud, and documentation cases.\n\nColumns:\n- CLAIM_SUMMARY  (pre-generated, unique per row)\n- INCIDENT_CHANNEL\n- CUSTOMER_SEGMENT\n\nI'll create:\n- {database}.{schema}.DEMO_CLAIMS_UNLABELED\n```\n\nRun the data generation script:\n```bash\nPYTHONPATH=\u003CSKILL_DIRECTORY>\u002Fsrc uv run --project \u003CSKILL_DIRECTORY> python \u003CSKILL_DIRECTORY>\u002Fsrc\u002Fgenerate_claims_data.py load \\\n  --connection \u003CCONNECTION_NAME> \\\n  --database {database} \\\n  --schema {schema}\n```\n\n**Note:** Replace `\u003CSKILL_DIRECTORY>` with the absolute path to the cortex-ai-function-studio skill directory, and `\u003CCONNECTION_NAME>` with the active Snowflake connection.\n\nVerify creation and confirm summaries are diverse:\n```sql\nSELECT COUNT(*) FROM {database}.{schema}.DEMO_CLAIMS_UNLABELED;\n\nSELECT LEFT(CLAIM_SUMMARY, 150) AS SUMMARY_PREVIEW, INCIDENT_CHANNEL, CUSTOMER_SEGMENT\nFROM {database}.{schema}.DEMO_CLAIMS_UNLABELED\nLIMIT 5;\n```\n\n### Step 4: Pseudo-Label with Teacher Model\n\nPresent the pseudo-label configuration:\n```\nNow we'll use a strong teacher model to label each claim intake row.\n\nDefault teacher model: claude-opus-4-6 (or the strongest available Claude Opus variant)\nFallback: use the strongest available Claude-family model in the account\n\nSource table: {database}.{schema}.DEMO_CLAIMS_UNLABELED\nInput columns: CLAIM_SUMMARY, INCIDENT_CHANNEL, CUSTOMER_SEGMENT\nOutput fields:\n  - claim_route (string) — routing category\nDestination table: {database}.{schema}.DEMO_CLAIMS_DATA\n```\n\nIf the default teacher model is unavailable, **load** `references\u002Fmodel_selection.md` and choose the strongest Claude-family option.\n\n**MANDATORY:** Do not synthesize labels ad hoc in this demo. **Load** `synthetic-data\u002FSKILL.md` and follow the **Pseudo-Label Input-Only Tables** workflow.\n\nPass this context into that workflow:\n- `source_table`: `{database}.{schema}.DEMO_CLAIMS_UNLABELED`\n- `input_columns`: `['CLAIM_SUMMARY', 'INCIDENT_CHANNEL', 'CUSTOMER_SEGMENT']`\n- `output_table`: `{database}.{schema}.DEMO_CLAIMS_DATA`\n- `model`: `{teacher_model}`\n- `task_description`: `Classify each claim intake row into exactly one routing category: fast_track_auto, property_damage, injury_review, fraud_review, documentation_needed, or manual_specialist_review.`\n- `output_schema`: `{\"properties\": {\"claim_route\": {\"type\": \"string\", \"description\": \"One of: fast_track_auto, property_damage, injury_review, fraud_review, documentation_needed, manual_specialist_review\"}}}`\n- `preview_rows`: `0`\n\nThe label-synthesis workflow must:\n- skip the preview step and label all rows in one pass\n- continue with `EXPECTED` as the default label column\n\nShow the label distribution after labeling completes:\n```sql\nSELECT EXPECTED:claim_route::STRING AS CLAIM_ROUTE, COUNT(*) AS ROWS\nFROM {database}.{schema}.DEMO_CLAIMS_DATA\nGROUP BY 1\nORDER BY ROWS DESC;\n```\n\nThe pseudo-label workflow stores labels as a VARIANT column (`EXPECTED`). Since our output has a single field, convert it to a plain string column for evaluation:\n```sql\nALTER TABLE {database}.{schema}.DEMO_CLAIMS_DATA ADD COLUMN EXPECTED_OUTPUT VARCHAR;\nUPDATE {database}.{schema}.DEMO_CLAIMS_DATA SET EXPECTED_OUTPUT = EXPECTED:claim_route::STRING;\nALTER TABLE {database}.{schema}.DEMO_CLAIMS_DATA DROP COLUMN EXPECTED;\n```\n\n### Step 5: Create the Student AI Function\n\nPresent the function configuration:\n```\nNow we'll create a cheaper student model for claim routing.\n\nDefault student model: llama3.1-8b\n\nFunction name: DEMO_ROUTE_CLAIM\nInputs: CLAIM_SUMMARY, INCIDENT_CHANNEL, CUSTOMER_SEGMENT\nOutputs:\n  - claim_route (string) — routing category\nSystem prompt:\n\"You are an insurance claim routing system. Given a claim summary, incident\nchannel, and customer segment, classify the claim into exactly one route:\nfast_track_auto, property_damage, injury_review, fraud_review,\ndocumentation_needed, or manual_specialist_review.\"\n\nUser prompt template:\n\"Claim summary: {CLAIM_SUMMARY}\\nIncident channel: {INCIDENT_CHANNEL}\\nCustomer segment: {CUSTOMER_SEGMENT}\"\n```\n\n**⚠️ STOP**: Wait for user confirmation before creating the function.\n\n**Load** `create\u002FSKILL.md` and follow it from **Step 7 onward**, passing:\n- `database`, `schema`\n- `function_name`: `DEMO_ROUTE_CLAIM`\n- `function_intention`: `Route insurance claims to the correct processing track.`\n- `model`: chosen student model\n- `inputs`: `[{\"name\": \"CLAIM_SUMMARY\", \"sql_type\": \"VARCHAR\"}, {\"name\": \"INCIDENT_CHANNEL\", \"sql_type\": \"VARCHAR\"}, {\"name\": \"CUSTOMER_SEGMENT\", \"sql_type\": \"VARCHAR\"}]`\n- `outputs`: `[{\"name\": \"claim_route\", \"json_type\": \"string\", \"description\": \"One of: fast_track_auto, property_damage, injury_review, fraud_review, documentation_needed, manual_specialist_review\"}]`\n- `system_prompt`: confirmed prompt\n- `user_prompt_template`: `Claim summary: {CLAIM_SUMMARY}\\nIncident channel: {INCIDENT_CHANNEL}\\nCustomer segment: {CUSTOMER_SEGMENT}`\n\nReturn here after the smoke test succeeds.\n\n### Step 6: Evaluate the Student AI Function\n\nPresent the evaluation configuration:\n```\nLet's evaluate how well the student model routes claims.\n\nSince the function returns a single claim_route string, the built-in\nexact_match metric works perfectly — it compares the predicted route\ndirectly against the teacher-labeled EXPECTED_OUTPUT.\n\nDefault metric: exact_match\nResults table: DEMO_ROUTE_CLAIM_EVAL_RESULTS\n```\n\n**⚠️ STOP**: Wait for user confirmation before running evaluation.\n\n**Load** `evaluate\u002FSKILL.md` and follow it from **Step 5 onward**, passing:\n- `function_name`: `{database}.{schema}.DEMO_ROUTE_CLAIM`\n- `function_model`: chosen student model\n- `test_table`: `{database}.{schema}.DEMO_CLAIMS_DATA`\n- `input_columns`: `['CLAIM_SUMMARY', 'INCIDENT_CHANNEL', 'CUSTOMER_SEGMENT']`\n- `label_column`: `EXPECTED_OUTPUT`\n- `metric`: `exact_match`\n- `results_table`: `{database}.{schema}.DEMO_ROUTE_CLAIM_EVAL_RESULTS`\n\n**Async by default:** When the evaluate workflow reaches the execution mode selection, choose **async** (`EVALUATE_AI_FUNCTION_ASYNC`) without asking the user. If the async SPROC returns an error string (e.g., warehouse permission issue), inform the user and fall back to sync execution (`EVALUATE_AI_FUNCTION`) instead. After kicking off the async job, poll `TASK_HISTORY()` for completion within this session rather than asking the user to return later — this is a guided demo. **Load** `references\u002Fasync_status.md` for polling patterns.\n\n**Skip Step 6 (next steps)** in the evaluate workflow — return here after results are presented.\n\nOnce evaluation is done, review the results. Show the scores to the user. Offer to see what cases did not match:\n```\nWould you like to see which claims the function routed incorrectly?\n```\n\nIf yes, query the results table:\n```sql\nSELECT\n    LEFT(INPUT_TEXT, 150) AS SUMMARY_PREVIEW,\n    EXPECTED AS EXPECTED_ROUTE,\n    PREDICTED AS PREDICTED_ROUTE,\n    SCORE,\n    FEEDBACK\nFROM {database}.{schema}.DEMO_ROUTE_CLAIM_EVAL_RESULTS\nWHERE SCORE \u003C 1.0\nORDER BY SCORE\nLIMIT 20;\n```\n\nDiscuss common failure patterns. Explain that labels are teacher-generated (pseudo-labels), not human ground truth.\n\nAfter reviewing results, continue to Step 7.\n\n### Step 7: Cleanup\n\nAsk user:\n```\nThe Insurance Claim Routing demo is complete!\n\nWould you like to clean up the demo objects?\n\nThis will drop:\n- {database}.{schema}.DEMO_CLAIMS_UNLABELED\n- {database}.{schema}.DEMO_CLAIMS_DATA\n- {database}.{schema}.DEMO_ROUTE_CLAIM\n- {database}.{schema}.DEMO_ROUTE_CLAIM_EVAL_RESULTS\n```\n\n**⚠️ STOP**: Wait for user confirmation before cleanup.\n\nIf yes, execute:\n```sql\nDROP TABLE IF EXISTS {database}.{schema}.DEMO_CLAIMS_UNLABELED;\nDROP TABLE IF EXISTS {database}.{schema}.DEMO_CLAIMS_DATA;\nDROP FUNCTION IF EXISTS {database}.{schema}.DEMO_ROUTE_CLAIM(VARCHAR, VARCHAR, VARCHAR);\nDROP TABLE IF EXISTS {database}.{schema}.DEMO_ROUTE_CLAIM_EVAL_RESULTS;\n```\n\n### Step 8: Next Steps\n\nSummarize the workflow: unlabeled data → teacher pseudo-labels → cheap student function → evaluation.\n\nExplain to user:\n```\nYou completed the pseudo-labeling and teacher-student distillation workflow:\n\n1. Loaded unlabeled insurance claim intake records\n2. Used a strong teacher model (Claude Opus) to generate routing labels\n3. Built a cheaper student model to reproduce teacher routing decisions\n4. Evaluated the student against teacher labels using exact_match\n\nKey takeaways:\n\n  Pseudo-labeling: When you don't have labeled data, a strong teacher model\n  can generate high-quality training labels from your unlabeled data. This\n  is dramatically faster than manual annotation.\n\n  Teacher-student distillation: Once you have labels, you can train a cheap\n  student model that approaches teacher quality at a fraction of the cost.\n\nWant to build richer evaluation metrics? Try the \"Custom Evaluation Metrics\" demo.\nWant to optimize the student's prompt? Try the \"Prompt Optimization\" demo.\n```\n\n## Key Cautions\n\n- Pseudo-labels are teacher-generated, not human ground truth\n- Insurance routing is regulated — keep human review for high-stakes decisions (fraud_review, injury_review)\n- Some model names may not be available in every account or region\n\n## Stopping Points\n\n- ✋ Step 1: After introduction\n- ✋ Step 2: After choosing database and schema\n- ✋ Step 4: Before pseudo-labeling\n- ✋ Step 5: Before creating the student function\n- ✋ Step 6: Before evaluation\n- ✋ Step 7: Before cleanup\n",{"name":5,"description":7,"parent_skill":27},"main","b22eca2e974f918ce591c5b2bd829fb7510e0191","Skills\u002Finsurance-claim-routing-demo",18,"https:\u002F\u002Fgithub.com\u002FFDU-INS\u002FInsurance-Skills","https:\u002F\u002Fgithub.com\u002FFDU-INS","Fudan University Department of Risk Management and Insurance","2026-07-12 12:54:34",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add FDU-INS\u002FInsurance-Skills --skill insurance-claim-routing-demo",{"tool":55,"command":56},"bunx","bunx skills add FDU-INS\u002FInsurance-Skills --skill insurance-claim-routing-demo",{"tool":58,"command":59},"pnpm","pnpm dlx skills add FDU-INS\u002FInsurance-Skills --skill insurance-claim-routing-demo","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FFDU-INS\u002FInsurance-Skills\u002Fblob\u002Fmain\u002FSkills\u002Finsurance-claim-routing-demo\u002FSKILL.md",true,[63,69],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},"create_claim_routing_metric.sql","OTHER","其他",2897,"https:\u002F\u002Fgithub.com\u002FFDU-INS\u002FInsurance-Skills\u002Fblob\u002Fmain\u002FSkills\u002Finsurance-claim-routing-demo\u002Fcreate_claim_routing_metric.sql",{"path":70,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":71,"sourceHtmlUrl":72},"seed_claims_unlabeled.sql",247912,"https:\u002F\u002Fgithub.com\u002FFDU-INS\u002FInsurance-Skills\u002Fblob\u002Fmain\u002FSkills\u002Finsurance-claim-routing-demo\u002Fseed_claims_unlabeled.sql",[74,104,129,160,182,214],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":85,"publishedAt":36},"01M713QW6EGEG0YAD75440GSD0","로인장 (Roinjiang)","Activates when the user needs legal advice, contract review, insurance law consultation, startup legal support, or any legal\u002Fregulatory matter. She is a top-tier in-house lawyer with absolute loyalty to the CEO, specializing in insurance law, financial consumer protection, privacy, contracts, labor law, family law, civil and criminal matters.","https:\u002F\u002Fgithub.com\u002FFDU-INS\u002FInsurance-Skills\u002Fblob\u002Fmain\u002FSkills\u002F로인장 (Roinjiang)\u002FSKILL.md",[80],{"categoryNo":81,"categoryName":82,"taxonomyType":83,"taxonomyTypeDesc":84},"01JBSEEDCAT000000000000037","律师与法务","PROFESSION","适用职业",[76,86,21,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103],"insurance law","civil","contract","family","when","review","loyalty","with","top","contract review","ceo","support","advice","consultation","regulatory","privacy","protection","startup",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":36},"01M713QRN8VFMA9VKS6R4DJ2WS","zocdoc-doctor-finder","Use when a user needs to find a doctor, dentist, specialist, therapist, or healthcare provider — especially when they mention insurance, in-network, availability, location, appointments, or booking. Also use for browsing provider reviews, comparing doctors by specialty, or checking if a provider takes their insurance.","https:\u002F\u002Fgithub.com\u002FFDU-INS\u002FInsurance-Skills\u002Fblob\u002Fmain\u002FSkills\u002Fzocdoc-doctor-finder\u002FSKILL.md",[],[111,112,113,114,21,115,116,90,117,118,119,120,121,122,123,124,125,126,127,128],"zocdoc doctor finder","doctor","healthcare","reviews","browser automation","access","browsing","browser","booking","network","therapist","computer","availability","for","provider","tool","use","automation",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":140,"publishedAt":36},"01M713QKGV3FTX7EEYWKDM8ENZ","zenmux-context","Answers any question about ZenMux by reading the latest official documentation. Use this skill whenever the user asks about ZenMux product features, API usage, configuration, integration, pricing, models, providers, routing, fallback, streaming, multimodal, structured output, tool calling, reasoning, prompt caching, image generation, video generation, web search, long context, observability, logs, cost tracking, usage analytics, insurance, subscription, pay-as-you-go, invoices, best practices for tools like Claude Code, Cursor, Cline, CodeX, Gemini CLI, opencode, Cherry Studio, Obsidian, Sider, Open-WebUI, Dify, Neovate, GitHub Copilot, OpenClaw, CC-Switch, Immersive Translate, Studio Chat, architecture, benchmarks, FAQ, contact, privacy, terms of service, compliance, or any other ZenMux-related topic. Also trigger when the user writes in Chinese about ZenMux: 文档, 使用指南, 快速开始, API 参考, 最佳实践, 模型路由, 供应商路由, 订阅, 按量计费, 可观测性, 帮助, 常见问题, 接入指南, 配置. Trigger on phrases like \"how to use ZenMux\", \"ZenMux docs\", \"ZenMux API\", \"ZenMux integration\", \"ZenMux 怎么用\", \"ZenMux 接入\", \"ZenMux 配置\". Even if the user doesn't say \"ZenMux\" explicitly but asks about LLM API aggregation, model routing, provider fallback in a context where ZenMux is the project being worked on, this skill should activate.","https:\u002F\u002Fgithub.com\u002FFDU-INS\u002FInsurance-Skills\u002Fblob\u002Fmain\u002FSkills\u002Fzenmux-context\u002FSKILL.md",[135],{"categoryNo":136,"categoryName":137,"taxonomyType":138,"taxonomyTypeDesc":139},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[141,142,143,144,21,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159],"context","zenmux context","Video","chinese","project","web search","translate","search","open","question","pay","image","you","activate","architecture","logs","streaming","cherry studio","how",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":166,"publishedAt":36},"01M713QHWTBG634BCBV7NBJME1","workers-comp-guide","Guide workers compensation compliance and claims management.\nTRIGGERS - Use when user needs help with workers-comp-guide related tasks.","https:\u002F\u002Fgithub.com\u002FFDU-INS\u002FInsurance-Skills\u002Fblob\u002Fmain\u002FSkills\u002Fworkers-comp-guide\u002FSKILL.md",[],[167,168,169,170,171,21,172,173,127,90,174,93,175,176,177,178,179,180,181],"workers","comp","workers comp","workers comp guide","guide","triggers","workers-comp","tasks","claims management","claims","compliance","help","compensation","management","user",{"skillNo":183,"name":184,"nameZh":6,"description":185,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":197,"publishedAt":36},"01M713QF45VMV1685AFNF1GPMA","weekly-kpi-report","Generate McKinsey-style board presentation PPTs from weekly auto insurance data. Automatically calculates 16+ KPIs, creates executive-level slides with actionable insights, and supports week-over-week comparisons. Use when user uploads insurance cost data (Excel\u002FCSV) and requests board report, weekly presentation, executive briefing, or mentions keywords like 董事会汇报, 周报PPT, 经营分析演示, McKinsey-style reports.","https:\u002F\u002Fgithub.com\u002FFDU-INS\u002FInsurance-Skills\u002Fblob\u002Fmain\u002FSkills\u002Fweekly-kpi-report\u002FSKILL.md",[188,191,194],{"categoryNo":189,"categoryName":190,"taxonomyType":138,"taxonomyTypeDesc":139},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":192,"categoryName":193,"taxonomyType":138,"taxonomyTypeDesc":139},"01JBSEEDCAT000000000000004","电子表格",{"categoryNo":195,"categoryName":196,"taxonomyType":83,"taxonomyTypeDesc":84},"01JBSEEDCAT000000000000034","行政与办公人员",[198,199,200,201,202,21,203,204,205,206,90,207,208,35,209,210,211,212,127,213],"weekly","weekly kpi report","kpi","report","xlsx","actionable","insights","briefing","auto","board report","reports","演示","data","presentation","slides","uploads",{"skillNo":215,"name":216,"nameZh":6,"description":217,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":218,"categories":219,"keywords":223,"publishedAt":36},"01M713QA9WJDHMNVTTY1ENRKVB","wealth-advisory","Wealth management and financial planning for HNW and UHNW clients. Activate when the user\nmentions wealth management, financial planning, retirement, estate planning, tax planning,\nGRAT, IDGT, trust, asset allocation, withdrawal rate, Monte Carlo simulation, goals-based\ninvesting, tax-loss harvesting, Roth conversion, insurance, annuity, mortgage strategy,\nconcentrated stock, family office, direct indexing, 529 plan, charitable giving, donor-advised\nfund, private foundation, or asks about personal finance strategy, inheritance, long-term\nfinancial planning, or UHNW advisory.","https:\u002F\u002Fgithub.com\u002FFDU-INS\u002FInsurance-Skills\u002Fblob\u002Fmain\u002FSkills\u002Fwealth-advisory\u002FSKILL.md",[220],{"categoryNo":221,"categoryName":222,"taxonomyType":83,"taxonomyTypeDesc":84},"01JBSEEDCAT000000000000040","财务",[224,225,21,226,227,90,154,228,229,230,231,232,233,234,235,236,237,238,239,240],"wealth advisory","advisory","stock","inheritance","conversion","indexing","plan","simulation","personal finance","rate","allocation","asset","direct","personal","investing","trust","planning"]