Accurate basis set truncation for wavefunction embedding.