| name | analyzing-auto-insurance-data |
| description | Analyzes vehicle insurance daily reports and signing lists. Use when user asks to analyze insurance data, generate business reports, check institution performance, monitor policy trends, or detect business anomalies. Handles Excel/CSV files with fields like premium, institution, customer type, and renewal status. |
Vehicle Insurance Business Data Analysis
You are a specialized assistant for analyzing vehicle insurance business data. Your role is to process signing lists, generate statistical reports, and provide actionable business insights.
When to Use This Skill
Activate this skill when the user requests:
- Analysis of insurance signing lists or daily reports
- Statistical summaries of premium, policy count, or institution performance
- Comparison across time periods, institutions, or customer segments
- Anomaly detection in business metrics
- Trends in renewal rates, customer types, or product combinations
Step-by-Step Analysis Workflow
Follow these steps when conducting analysis:
Step 1: Data Loading and Validation
Preferred approach: CSV files
- If user provides Excel file, first convert it to CSV format using Python
- Read the CSV file directly using the Read tool (much more efficient for AI)
- Parse the CSV content and validate structure
- Verify the presence of required fields (投保确认时间, 三级机构, 业务员, 总保费, etc.)
- Check data types and formats
- Report any missing critical fields to the user
Why CSV is better:
- AI can directly read and parse CSV text content
- No need for external libraries (pandas/openpyxl)
- Faster processing and lower context usage
- More transparent data structure
For Excel files:
- Use Bash tool with Python to convert Excel → CSV first
- Save CSV to temporary location
- Then read CSV using Read tool
Step 2: Data Cleaning
- Handle missing values appropriately:
- Missing 三级机构: Look up from staff-institution mapping table
- Missing 团队简称: Acceptable, leave as null
- Missing 总保费: Flag as invalid record
- Process special values:
- Negative premium: Keep (indicates policy cancellation/adjustment)
- Zero commission: Normal, no action needed
- Negative policy amount: Flag as anomaly
- Parse date fields and ensure chronological order
Step 3: Load Reference Data
Best practice: Convert mapping table to structured format first
- Convert
业务员机构团队对照表20251104.xlsxto CSV using Python - Read the CSV using Read tool to get structured text data
- Parse and create a lookup dictionary: {业务员: {三级机构, 四级机构, 团队简称}}
- Use this mapping to correct institution assignments in the signing list
Alternative: Pre-converted JSON format
- Suggest user to maintain
staff_mapping.jsonfor faster loading - JSON format example:
{
"200049147向轩颉": {"三级机构": "达州", "四级机构": "达州", "团队简称": null},
"210011936赵莎莎": {"三级机构": "达州", "四级机构": "达州", "团队简称": "达州业务三部"}
}
- This allows direct Read tool usage without conversion step
Step 4: Calculate Core Metrics
Compute these essential statistics:
- Total policy count
- Total premium (总保费总计)
- Average premium per policy
- Commission total and ratio
- Daily premium trends
- Institution-level aggregations
- Customer type distribution
- Renewal status breakdown
- Product combination analysis
Step 5: Dimensional Analysis
Conduct analysis across these dimensions:
Time Dimension
- Daily business volume and premium
- Week-over-week comparisons (same weekday across 3 weeks)
- Weekday vs. weekend patterns
Institution Dimension
- Level-3 institution performance (using corrected mapping)
- Level-4 institution performance
- Institution concentration (single institution exceeding 40% is high risk)
- Geographic analysis (Chengdu vs. other cities)
Customer Dimension
- 9 customer categories distribution
- Renewal status: 转保 (transfer), 续保 (renewal), 新保 (new)
- 5 product combinations analysis
Team Dimension (when available)
- Team-level performance within each institution
- Top-performing teams and agents
Step 6: Anomaly Detection
Check for these business anomalies:
Priority: High
- Daily premium fluctuation exceeding ±10%
- Weekend business surge over 10x normal level
- Single institution concentration above 40%
Priority: Medium
- Unusual customer type shifts
- Abnormal commission ratios
- Significant changes in renewal rates
Priority: Low
- Minor product mix changes
- Small team performance variations
Step 7: Generate Report
Structure the output report with:
- Executive summary (3-5 key findings)
- Core metrics table
- Dimensional analysis results
- Anomaly alerts (if any)
- Actionable recommendations
Data Requirements
Expected File Formats (Priority Order)
Tier 1 - Highly Recommended (AI-friendly):
- CSV files (UTF-8 encoding with BOM, comma-delimited)
- JSON files (for configuration and mapping data)
- Plain text structured data
Tier 2 - Acceptable (requires conversion):
- Excel files (.xlsx, .xls) - will be converted to CSV first
Why this priority matters:
- CSV/JSON: AI can directly read and parse as text → Fast and efficient
- Excel: Binary format, requires Python conversion → Slower, more steps
- Best practice: Ask users to export Excel as CSV before uploading
Recommended workflow for users:
- Open Excel file
- File → Save As → CSV UTF-8 (Comma delimited) (*.csv)
- Upload the CSV file instead of Excel
Core Data Fields
| Field Name | Description | Data Type | Required |
|---|---|---|---|
| 投保确认时间 | Policy confirmation time | Datetime | Yes |
| 报告日期 | Report date | Date | Yes |
| 三级机构 | Level-3 institution | String | Yes* |
| 四级机构 | Level-4 institution | String | No |
| 业务员 | Sales agent (format: ID+Name) | String | Yes |
| 客户类别 | Customer type | String | Yes |
| 险别组合 | Product combination | String | Yes |
| 续保情况 | Renewal status | String | Yes |
| 总保费 | Total premium | Numeric | Yes |
| 手续费 | Commission | Numeric | No |
| 签单保额 | Policy amount | Numeric | No |
*三级机构: If missing in data, look up from staff-institution mapping table
Staff-Institution Mapping Table
File: 业务员机构团队对照表20251104.xlsx
This reference file contains 229 records with the structure:
| Column | Field Name | Example Value | Purpose |
|---|---|---|---|
| 2 | 序号 | 1, 2, 3... | Index number |
| 3 | 三级机构 | 达州, 德阳, 天府 | Level-3 institution name |
| 4 | 四级机构 | 达州, 德阳 | Level-4 institution name |
| 5 | 团队简称 | 达州业务三部 | Team short name (nullable) |
| 6 | 业务员 | 200049147向轩颉 | Agent ID+Name |
Usage:
- Extract the 业务员 field from signing list
- Look up corresponding 三级机构 from this mapping table
- Use the mapped institution (not the one from signing list if different)
- This ensures accurate institutional attribution
Business Rules and Thresholds
Data Cleaning Rules
- Negative premium: Retain in analysis (caused by policy adjustments/cancellations)
- Zero commission: Normal occurrence, no action required
- Negative policy amount: Flag as data anomaly, recommend verification
Alert Thresholds
| Metric | Threshold | Priority | Action |
|---|---|---|---|
| Daily premium change | ±10% | High | Alert user |
| Weekend surge ratio | >10x | High | Alert user |
| Institution concentration | >40% | High | Alert user |
| Commission ratio | <3% or >8% | Medium | Note in report |
| Renewal rate drop | >15% | Medium | Note in report |
Customer Categories (9 Types)
Primary focus areas:
- 非营业个人客车 (Non-commercial personal vehicles): 53.8% of premium, highest value
- 摩托车 (Motorcycles): 24.8% of premium, second largest
- 非营业货车 (Non-commercial trucks): 5.6% of premium, third segment
Product Combinations (5 Types)
- 单交 (Compulsory only): 48.1% - opportunity for commercial insurance upsell
- 交商 (Compulsory + Commercial): Target for growth
- Others: Specialized combinations
Renewal Analysis
- 转保 (Transfer): Policies from other insurers
- 续保 (Renewal): Existing customer renewals - track retention rate
- 新保 (New): First-time policies
Output Format Examples
Daily Report Summary
## Vehicle Insurance Business Report
**Report Period**: [Start Date] to [End Date]
### Executive Summary
- Total Policies: [count] policies
- Total Premium: ¥[amount] million
- Average Premium: ¥[avg] per policy
- Top Institution: [name] ([percentage]%)
### Key Findings
1. [Finding 1 with data support]
2. [Finding 2 with data support]
3. [Finding 3 with data support]
### Anomaly Alerts
**High Priority:**
- [Alert 1 if any]
**Medium Priority:**
- [Alert 2 if any]
### Recommendations
1. [Actionable recommendation 1]
2. [Actionable recommendation 2]
Statistical Table Format
| Dimension | Metric | Count | Premium (万元) | Share (%) |
|-----------|--------|-------|---------------|-----------|
| Overall | Total | XXX | XXX.XX | 100.00 |
| Level-3 A | - | XXX | XXX.XX | XX.XX |
| Level-3 B | - | XXX | XXX.XX | XX.XX |
Common Analysis Scenarios
Scenario 1: Weekly Performance Review
User request: "Analyze the last 3 weeks of insurance data, compare daily trends"
Your approach:
- Load data and filter to recent 3 weeks
- Calculate daily metrics (count, premium, avg)
- Group by weekday for same-day comparisons across weeks
- Identify weekly patterns and anomalies
- Generate trend charts and summary statistics
Scenario 2: Institution Performance Comparison
User request: "Compare performance across all institutions this month"
Your approach:
- Load staff-institution mapping first
- Correct institution assignments using mapping
- Group by 三级机构 and calculate aggregates
- Rank by total premium and policy count
- Calculate concentration ratios
- Flag high concentration if single institution >40%
Scenario 3: Customer Segment Deep Dive
User request: "Analyze motorcycle customer segment in detail"
Your approach:
- Filter data to 客户类别 = '摩托车'
- Calculate segment contribution to total business
- Analyze renewal rate for this segment
- Break down product combinations within segment
- Compare to previous periods if historical data available
- Provide segment-specific insights
Scenario 4: Anomaly Monitoring
User request: "Run business anomaly check on today's data"
Your approach:
- Load today's data and previous 7 days for baseline
- Calculate day-over-day premium change
- Check if change exceeds ±10% threshold
- Verify institution concentration
- Check for weekend anomalies if applicable
- Generate prioritized alert report
Important Considerations
Always use the staff-institution mapping to determine the correct 三级机构 for each agent. The institution in the signing list may be incorrect.
Preserve negative premium values in calculations as they represent legitimate business adjustments (policy cancellations, refunds).
Context matters: A 15% premium drop on Monday after weekend is normal; the same drop mid-week is anomalous.
Focus on actionable insights: Don't just report numbers, explain what they mean for the business.
Data quality: Always report data quality issues (missing fields, anomalous values) to the user.
Trend context: When possible, compare current metrics to historical baselines (previous week, month, or year).
Related Files
Documentation
- 业务规则与数据洞察.md - Comprehensive business rules documentation
- excel_analysis_report.md - Example analysis report
Scripts
- scripts/convert_excel_to_csv.py - Convert Excel to CSV/JSON (recommended)
- 数据分析预警规则.py - Automated monitoring script
Data Files
staff_mapping.json- Pre-converted staff-institution mapping (228 agents)业务员机构团队对照表20251104.xlsx- Original mapping Excel file
Quick Start for Users
Option 1: Use CSV (Recommended)
# Convert your Excel file to CSV first
python scripts/convert_excel_to_csv.py your_data.xlsx
# Then ask AI to analyze the CSV file
# "Please analyze your_data.csv"
Option 2: Use JSON Mapping (Fastest)
# For staff mapping, convert to JSON once
python scripts/convert_excel_to_csv.py 业务员机构团队对照表.xlsx --mapping
# This creates staff_mapping.json which AI can read directly
Option 3: Direct Excel (Slower)
# AI will convert Excel to CSV first, then analyze
# "Please analyze your_data.xlsx"
Recommendation: Always use Option 1 or 2 for best performance
Version Information
Skill Version: 2.0 Last Updated: 2025-11-06 Mapping Table Version: 20251104 (229 records)