This study presents an enhanced model based on a new swarm intelligence algorithm called jellyfish search optimizer (JSO). The suggested model is called chaotic jellyfish search with enhanced swap operator (CJSESOS). The CJSESOS algorithm has two modifications to the original JSO algorithm, the first is the chaotic sequence generated by iterating a logistic map which is named CJSO. This enhancement discovers a creative solution by directing particles to different location of the search space, the second is enhanced swap sequence operator which increased the CJSO algorithm's ability to escape from local minimum by diversifying the results. The performance of the CJSESOS is evaluated using fourteen benchmark functions. The proposed model is applied to solve a discreate real life problem, named team formation (TF) problem which considered one of the most significant problems in computer science and optimization. TF problem is defined as creating the most effective team of experts in social network to carry out a task with the lowest possible cost. The proposed CJSESOS algorithm was tested for solving the TF problem with varying number of skills in different datasets. In addition, the proposed algorithm is compared to well-known optimization algorithms such as jellyfish search optimizer (JSO), particle swarm optimization (PSO), genetic algorithm (GA), grey wolf optimization (GWO), heap based optimizer (HBO), aquila optimizer (AO) and pelican optimization algorithm (POA). The simulation results show that the proposed model outperformed all the compared algorithms on the term of efficiency and accuracy.