  Accurately predicting the formation energy of a compound, which describes its
thermodynamic stability, is a key challenge in materials physics. Here, we
employ many-body quantum Monte Carlo (QMC) with single-reference trial
functions to compute the formation energy of two electronically disparate
compounds, the intermetallic VPt$_2$ and the semiconductor CuI, for which
standard density functional theory (DFT) predictions using both the
Perdew-Burke Ernzerhof (PBE) and the strongly constrained and appropriately
normed (SCAN) density functional approximations deviate markedly from available
experimental values. For VPt$_2$, we find an agreement between QMC, SCAN, and
PBE0 estimates, which therefore remain in disagreement with the much less
exothermic experimental value. For CuI, the QMC result agrees with neither SCAN
nor PBE pointing towards DFT exchange-correlation biases, likely related to the
localized Cu $3d$ electrons. Compared to the behavior of some density
functional approximations within DFT, spin-averaged QMC exhibits a smaller but
still appreciable deviation when compared to experiment. The QMC result is
slightly improved by incorporating spin-orbit corrections for CuI and solid
I$_2$, so that experiment and theory are brought into imperfect but reasonable
agreement within about 120~meV/atom.
