Employee attrition is costly for organisations, yet HR teams usually learn that someone is leaving only after the resignation. This paper presents AttritionSense AI, a role-based web application that predicts the attrition risk of an employee, explains the likely drivers and recommends concrete retention actions. A Random Forest classifier, trained on the 1,470-record IBM HR Analytics dataset with class-weight balancing, converts the predicted probability into a 0–100 risk score and a Low, Medium or High tier. A transparent rule layer lists the specific risk drivers of each employee, derives a growth-status indicator and raises a Priority Retention alert only when an employee of high growth potential is also at high risk. Prescriptive action plans with an owner and an urgency target are generated for HR, and an executive PDF report can be exported. A separate, private employee portal offers a conversational companion (BuddyBot), a weekly well-being quiz, relaxation games and an eight-dimension feedback form that are deliberately kept out of the risk score. On a stratified 20% hold-out set the model reaches an ROC-AUC of 0.798 and an attrition recall of 0.489 at a precision of 0.479; accuracy is 0.833. We discuss why accuracy alone is misleading for this imbalanced problem and list the limitations and the planned extensions.
Introduction
AttritionSense AI – Employee Attrition Prediction and Retention Management System is a web-based application designed to predict employee turnover and help organizations retain valuable employees. Employee attrition can lead to recruitment costs, loss of experienced staff, reduced productivity, and disruption of teamwork. The proposed system uses Machine Learning to identify employees who may be at risk of leaving by analyzing historical HR data.
The system uses the IBM HR Analytics Employee Attrition Dataset and a Random Forest algorithm to predict employee attrition. Based on employee information, it generates an attrition probability, a risk score between 0 and 100, and a risk category of Low, Medium, or High. It also identifies possible reasons for employee dissatisfaction, such as frequent overtime, low job satisfaction, limited promotion opportunities, poor work–life balance, and compensation issues.
AttritionSense AI provides personalized retention recommendations with assigned responsibilities and deadlines. It also includes a Priority Retention feature to identify high-performing employees who have a high risk of leaving. HR administrators can access dashboards, employee predictions, workforce analytics, feedback reports, and downloadable PDF reports.
The application follows a three-tier architecture using Streamlit, Python, SQLite, and Scikit-learn. It also includes separate portals for HR administrators and employees. The employee portal provides a private chatbot called BuddyBot, well-being quizzes, games, surveys, and feedback forms. Employee chats, quiz results, and well-being activities are kept separate from attrition predictions and performance evaluations to protect employee privacy.
The Random Forest model achieved 83.3% accuracy and a 0.798 ROC-AUC score on the test dataset, demonstrating its ability to identify employee attrition patterns.
Conclusion
We presented AttritionSense AI, a role-based system that combines automatic Random Forest attrition prediction, transparent risk drivers, a growth-aware Priority Retention rule, prescriptive action plans and PDF reporting with a private well-being portal for employees. On the IBM benchmark the model reaches an ROC-AUC of 0.798 and detects 49% of leavers, which supports its use as a screening and decision-support aid under human review. Validation on real organisational data and a fairness audit are the next steps.
References
[1] IBM, “IBM HR Analytics Employee Attrition & Performance,” Kaggle dataset. [Online]. Available: https://www.kaggle.com/datasets/pavansubhasht/ibm-hr-analytics-attrition-dataset
[2] L. Breiman, “Random forests,” Mach. Learn., vol. 45, no. 1, pp. 5–32, 2001.
[3] F. Pedregosa et al., “Scikit-learn: Machine learning in Python,” J. Mach. Learn. Res., vol. 12, pp. 2825–2830, 2011.
[4] T. Chen and C. Guestrin, “XGBoost: A scalable tree boosting system,” in Proc. 22nd ACM SIGKDD Int. Conf. Knowl. Discovery Data Mining, 2016, pp. 785–794.
[5] N. V. Chawla, K. W. Bowyer, L. O. Hall and W. P. Kegelmeyer, “SMOTE: Synthetic minority over-sampling technique,” J. Artif. Intell. Res., vol. 16, pp. 321–357, 2002.
[6] Streamlit Inc., “Streamlit documentation.” [Online]. Available: https://docs.streamlit.io/
[7] SQLite Consortium, “SQLite documentation.” [Online]. Available: https://www.sqlite.org/docs.html
[8] Plotly Technologies Inc., “Plotly Python graphing library.” [Online]. Available: https://plotly.com/python/
[9] ReportLab Inc., “ReportLab PDF toolkit.” [Online]. Available: https://www.reportlab.com/
[10] M. S. Turan et al., Recommendation for Password-Based Key Derivation, Part 1: Storage Applications, NIST SP 800-132, 2010.
[11] Google, “Gemini API documentation.” [Online]. Available: https://ai.google.dev/