Numbers are approximate, but here's what I do.
If you can only do one to three pull-ups, then you should use negatives or assisted pull-ups and strive for an equal number of reps across your sets. At this stage you're not strong enough to warrant straining to do some variable but small number of real pull-ups. You're better served by getting in a consistent, larger amount of volume (total reps) while gradually making it harder by doing slower negatives or decreasing the amount of assistance weight on the band or assisted pull-up machine.
If you can do four to eight pull-ups then you should find a number you can reliably do in each set and do that for several sets. At this point you're strong enough so that real pull-ups are best, but weak enough that you might severely limit volume by going for your max every set. Alternatively, you could nix the entire idea of a set number of sets, and just pick a total to reach in however many sets it takes.
If you can do nine or more pull-ups then you should stop worrying about consistent numbers across sets. Just go for your max (or a training max) in each set and make sure it stays within an acceptable range: if you can do 15 at your best, make sure each set is between 12 and 15. Then you can keep the number of sets constant and know you're still challenging yourself in terms of volume and effort.