  A three-terminal thermoelectric device based on a $p$-$i$-$n$ semiconductor
junction is proposed, where the intrinsic region is mounted onto a, typically
bosonic, thermal terminal. Remarkably, the figure of merit of the device is
governed also by the energy distribution of the {\em bosons} participating in
the transport processes, in addition to the electronic one. An enhanced figure
of merit can be obtained when the relevant distribution is narrow and the
electron-boson coupling is strong (such as for optical phonons). We study the
conditions for which the figure of merit of the three-terminal junction can be
greater than those of the usual thermoelectric devices made of the same
material. A possible setup with a high figure of merit, based on
Bi$_2$Te$_3$/Si superlattices, is proposed.
