I agree with the sentiment that the best way is to find a reason where sticking together is benefitial. Make them WANT to party together. In your case, maybe there's a high level monster in the caverns that realizes there are intruders and starts hunting them down for food. Or perhaps there's a path one group stumbles upon that leads to a significant treasure, but the a wide variety of skills and talents are required to reach the end. Skills and talents that are perhaps exclusive to the other players.