  Using a first-principles cluster expansion, we shed light on the solid-state
phase diagram and structure of the recently discovered high-performance
thermoelectrics, Pb-Ag-Sb-Te alloys. The observed nanoscale inhomogeneities are
shown to be coherent precipitates of ordered (Ag)m(Sb)n(Te)m+n phases, such as
AgSbTe2, all immiscible with rocksalt PbTe. The solubility is high for PbTe in
AgSbTe2 and low for (Ag,Sb)Te in PbTe (8% vs. 0.6% at 850 K). The differences
in the phonon spectra of PbTe and AgSbTe2 confirm that the inhomogeneities
enhance the thermoelectric performance.
