  We propose a general method embedded in the ab initio nuclear framework to
reconstruct linear response functions and calculate sum rules. Within our
approach, based on the Gaussian integral transform, we consistently treat the
groundstate and the excited spectrum. Crucially, the method allows for a robust
uncertainty estimation of the spectral reconstruction. We showcase it for the
spin response in neutron matter. Our calculations are performed using
state-of-the-art many-body coupled-cluster method and Hamiltonians derived in
the chiral effective field theory, emphasizing the analysis of finite-size
effects. This work serves as a stepping stone towards further studies of
neutrino interactions in astrophysical environments from first principles.
