The choice of pears is very important. The quality of your compote will depend largely on their variety, ripeness and flavour. Choose the variety you prefer, of course, but I have a weakness for Williams. Avoid using Louise Bonnes as they do not cook well.
If you choose the gelling method, note that the weight of agar-agar is important and must be in proportion to the volume of pears after blending. A good rule of thumb is 4g agar-agar to one litre of blended pears.