协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
algo-hr-turnover【开发与工程】Build employee turnover prediction models to identify flight risk and retention drivers. Use this skill when the user needs to predict which employees are likely to leave, identify retention risk factors, or prioritize HR interventions — even if they say 'attrition prediction', 'who is going to quit', or 'employee retention model'.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Turnover prediction uses classification models (logistic regression, random forest, XGBoost) to estimate the probability an employee will leave within a defined period (typically 6-12 months). Features include tenure, compensation, performance, promotion history, and engagement signals.
Trigger conditions:
When NOT to use:
IRON LAW: Turnover Models Predict RISK, Not Certainty
A predicted 80% turnover probability means "employees with similar
profiles historically left 80% of the time." It does NOT mean this
specific employee WILL leave. Never use model outputs as sole basis
for employment decisions — that creates legal and ethical liability.
Collect: employee demographics, tenure, compensation (relative to market), last promotion date, performance ratings, manager change history, engagement survey scores, commute distance. Outcome: voluntary departure within N months. Gate: Minimum 200 turnover events, features available before departure date.
Evaluate: AUC, precision-recall (at actionable thresholds). Backtest: did the model correctly flag employees who left in the past 6 months? Gate: AUC > 0.70, precision > 50% at top decile.
Return risk scores with driver analysis.
{
"risk_scores": [{"employee_id": "E123", "turnover_prob": 0.72, "risk_tier": "high", "top_drivers": ["low_comp_ratio", "no_promotion_3yr"]}],
"metadata": {"model": "xgboost", "auc": 0.78, "prediction_window_months": 12}
}
Input: Employee: 4yr tenure, comp ratio 0.85, no promotion in 3yr, engagement score declining Expected: High risk (>0.6). Top drivers: below-market compensation, stalled career progression.
| Input | Expected | Why |
|---|---|---|
| New hire (< 6 months) | Unreliable prediction | Insufficient behavioral data |
| Top performer, high comp | Still could leave | Non-financial factors (manager, culture) matter |
| Post-reorg period | Model drift likely | Unusual conditions distort patterns |
references/hr-features.mdreferences/ethical-hr-ai.md