4 added 220 characters in body

@Igor: If I remember correctly, for lattices in $\mathrm{SL}_n(\mathbb R)$, $n\ge 2$, the answer is 2 (perhaps somebody can correct me here).

Update 1. Andy Putman corrected me in $\mathrm{SL}_n(\mathbb R)$ the comment belowquestion is interesting. This

Update 3. You may mean be interested in this paper They prove that the principal congruence subgroups of $\mathrm{SL}_n(\mathbb Z)$ have bounded number of generators but it is not true for lattices in all arithmeric subgroups of $\mathrm{SL}_n(\mathbb R)$the question is interesting.

For hyperbolic groups there exists a result of Arzhantseva-Olshanskii (Arzhantseva, G. N.; Olʹshanskiĭ, A. Yu. Generality of the class of groups in which subgroups with a lesser number of generators are free. Mat. Zametki 59 (1996), no. 4, 489--496) that generically hyperbolic groups given by $n$ generators and a number of relations are $n$-generated. Thus if you have a random presentation with $n$ generators, it gives a group which cannot be generated by fewer elements. I do not think there is a known algorithm that outputs the smallest number of generators given a presentation plus the additional information that the group is hyperbolic (CAT(0), etc.).

Update 2. As HW noticed below, if we know that the group is hyperbolic, we can find its $\delta$.

But if in addition to hyperbolicity you also know the $\delta$ (hyperbolicity constant), then the algorithm should exist simply because you should not search too far for the generators: every generating set should consist (up to conjugacy) of relatively short elements. The proof may follow from a paper by Arzhantseva (or Kapovich-Weidmann) Arzhantseva, Goulnara N., A dichotomy for finitely generated subgroups of word hyperbolic groups. Topological and asymptotic aspects of group theory, 1–10, Contemp. Math., 394, Amer. Math. Soc., Providence, RI, 2006 (resp. Kapovich, Ilya; Weidmann, Richard Nielsen methods and groups acting on hyperbolic spaces. Geom. Dedicata 98 (2003), 95–121. )

3 added 116 characters in body

@Igor: If I remember correctly, for lattices in $\mathrm{SL}_n(\mathbb R)$, $n\ge 2$, the answer is 2 (perhaps somebody can correct me here).

Update. Andy Putman corrected me in the comment below. This may mean that for lattices in $\mathrm{SL}_n(\mathbb R)$ the question is interesting.

For hyperbolic groups there exists a result of Arzhantseva-Olshanskii (Arzhantseva, G. N.; Olʹshanskiĭ, A. Yu. Generality of the class of groups in which subgroups with a lesser number of generators are free. Mat. Zametki 59 (1996), no. 4, 489--496) that generically hyperbolic groups given by $n$ generators and a number of relations are $n$-generated. Thus if you have a random presentation with $n$ generators, it gives a group which cannot be generated by fewer elements. I do not think there is a known algorithm that outputs the smallest number of generators given a presentation plus the additional information that the group is hyperbolic (CAT(0), etc.).

Update 2. As HW noticed below, if we know that the group is hyperbolic, we can find its $\delta$.

But if in addition to hyperbolicity you also know the $\delta$ (hyperbolicity constant), then the algorithm should exist simply because you should not search too far for the generators: every generating set should consist (up to conjugacy) of relatively short elements. The proof may follow from a paper by Arzhantseva (or Kapovich-Weidmann) Arzhantseva, Goulnara N., A dichotomy for finitely generated subgroups of word hyperbolic groups. Topological and asymptotic aspects of group theory, 1–10, Contemp. Math., 394, Amer. Math. Soc., Providence, RI, 2006 (resp. Kapovich, Ilya; Weidmann, Richard Nielsen methods and groups acting on hyperbolic spaces. Geom. Dedicata 98 (2003), 95–121. )

2 corrected the first part of the answer

@Igor: If I remember correctly, for lattices in $\mathrm{SL}_n(\mathbb R)$, $n\ge 2$, the answer is 2 (perhaps somebody can correct me here). So the algorithm is easy

Update. I think Andy Putman corrected me in the proof involves arithmeticity of these comment below. This may mean that for lattices in $\mathrm{SL}_n(\mathbb R)$ the question is interesting.

For hyperbolic groups there exists a result of Arzhantseva-Olshanskii (Arzhantseva, G. N.; Olʹshanskiĭ, A. Yu. Generality of the class of groups in which subgroups with a lesser number of generators are free. Mat. Zametki 59 (1996), no. 4, 489--496) that generically hyperbolic groups given by $n$ generators and a number of relations are $n$-generated. Thus if you have a random presentation with $n$ generators, it gives a group which cannot be generated by fewer elements. I do not think there is a known algorithm that outputs the smallest number of generators given a presentation plus the additional information that the group is hyperbolic (CAT(0), etc.). But if in addition to hyperbolicity you also know the $\delta$ (hyperbolicity constant), then the algorithm should exist simply because you should not search too far for the generators: every generating set should consist (up to conjugacy) of relatively short elements. The proof may follow from a paper by Arzhantseva (or Kapovich-Weidmann) Arzhantseva, Goulnara N., A dichotomy for finitely generated subgroups of word hyperbolic groups. Topological and asymptotic aspects of group theory, 1–10, Contemp. Math., 394, Amer. Math. Soc., Providence, RI, 2006 (resp. Kapovich, Ilya; Weidmann, Richard Nielsen methods and groups acting on hyperbolic spaces. Geom. Dedicata 98 (2003), 95–121. )

1