I'm a newcomer to the geometric Langlands setting, and have mostly consulted surveys like Laumon's overview of L. Lafforgue's proof or Frenkel's recent advances survey, so apologies if this is material easily found in standard references.
I can see the utility of the sheaf-function dictionary, e.g. in the very nice toy example of unramified geometric class field theory in the Frenkel link, and also in the natural generalization to the case of Riemann surfaces. However, one thing bothers me a little: the techniques used to prove the function field Langlands conjectures (at least for $\text{GL}_n$), using trace formula methods in the cohomology of moduli spaces of shtukas, don't have any obvious relationship to this dictionary. Is there such a relationship, and is it written down somewhere in the literature?
It's a bit of a vague question; sorry, I guess I would hope for something like a perspective in which these cohomology groups somehow naturally parameterize (complexes of) $l$-adic perverse sheaves or something.
Also, as an aside, in general, is it known in general that every cuspidal automorphic function (say) for a function field corresponds to an $l$-adic sheaf on a suitable moduli space? If so, what are the techniques used to prove this?