  We address and quantify the role of non-adiabaticity ("memory effects") in
the exchange-correlation (xc) functional of time-dependent density functional
theory (TDDFT) for describing non-linear dynamics of many-body systems.
Time-dependent resonant processes are particularly challenging for available
TDDFT approximations, due to their strong non-linear and non-adiabatic
character. None of the known approximate density functionals are able to cope
with this class of problems in a satisfactory manner. In this work we look at
the prototypical example of the resonant processes by considering Rabi
oscillations within the exactly soluble 2-site Hubbard model. We construct the
exact adiabatic xc functional and show that (i) it does not reproduce correctly
resonant Rabi dynamics, (ii) there is a sizable non-adiabatic contribution to
the exact xc potential, which turns out to be small only at the beginning and
at the end of the Rabi cycle when the ground state population is dominant. We
then propose a "two-level" approximation for the time-dependent xc potential
which can capture Rabi dynamics in the 2-site problem. It works well both for
resonant and for detuned Rabi oscillations and becomes essentially exact in the
linear response regime. This new, fully non-adiabatic and explicit density
functional constitutes one of the main results of the present work.
