Collaboration among individuals with diverse skills and personalities is crucial in producing high-quality software. The success of any software project depends on the team’s cohesive functionality and mutual complementation. This study introduces a data-centric methodology for forming Software Engineering (SE) teams centred around personality traits. Our study analyzed data from an SE course where 157 students in 31 teams worked through four project phases and were evaluated based on deliverables and instructor feedback. Using the Five Factor Model (FFM) and a variety of statistical tests, we determined that teams with higher levels of extraversion and conscientiousness and lower neuroticism consistently performed better. We examined team member interactions and developed a predictive model using extreme gradient boosting. The model achieved a 74% accuracy rate in predicting inter-member satisfaction rankings. Through graphical explainability, it underscored incompatibilities among members, notably those with differing levels of extraversion. Based on our findings, we introduce a team formation algorithm using Simulated Annealing (SA), built upon the insights from our predictive model and additional heuristics.