  We study high frequency response functions, notably the optical conductivity,
in the vicinity of quantum critical points (QCPs) by allowing for both detuning
from the critical coupling and finite temperature. We consider general
dimensions and dynamical exponents. This leads to a unified understanding of
sum rules. In systems with emergent Lorentz invariance, powerful methods from
conformal field theory allow us to fix the high frequency response in terms of
universal coefficients. We test our predictions analytically in the large-N
O(N) model and using the gauge-gravity duality, and numerically via Quantum
Monte Carlo simulations on a lattice model hosting the interacting
superfluid-insulator QCP. In superfluid phases, interacting Goldstone bosons
qualitatively change the high frequency optical conductivity, and the
corresponding sum rule.
