The NFL does not disclose how they make the determination, though they provide hints: the size of the free agent contract, playing time and performance (such as offseason awards).
History shows the main factor is the size of the free agent contract.
There's a cap on how many compensatory picks will be awarded. It used to be 32; I don't know if that has changed. If they don't find 32 worthies for rounds 3-6, they slap the remainder on at the end of the 7th. round.
Another important consideration is whether the value of free agents lost exceeds the value of free agents signed. Interestingly enough, the Packers cut Bennett just before the week 10 deadline that would have qualified him as a Packer FA signing for compensatory purposes. It would not have been a bad idea to cut him anyway even if the injury nonsense had not arisen because he sure wasn't contributing much while dropping a lot of balls. Decent blocker, though. Had he stuck, he probably would have wiped out whatever pick we get for Hyde or Lang given the size of his contract.
I said earlier that Hyde is worth a 3rd. round comp, but that may have been a moment of weakness. The dollars might not be there. Same for Lang. Recall Williams and House got nice contracts, and ended up being 4th. round comps. Hayward made the Pro Bowl and only netted a 5th. rounder because of the modest 3 year/$15 mil contract. It still seems funny calling that modest, but it is for a cornerback.
Hyde/Lang: maybe a couple of 4th. rounders, maybe a 3rd. and a 4th.