TITLE: Definition of L-function attached to automorphic representation
QUESTION [12 upvotes]: Suppose $\pi$ is an irreducible automorphic representation of a reductive connected algebraic group $G$ over $\mathbb{A}_K$, here $K$ is a number field, $\mathbb{A}_K$ denotes its adeles. We have a restricted tensor product decomposition of $\pi=\otimes\pi_v$, where $\pi_v$ is an irreducible admissible representation for $G(K_v)$, and for all but finitely many $v$, $\pi_v$ is unramified.
We know how to define local L-factors at $v$ is $\pi_v$ is unramified, and we also know how to define local L-factors at archimedean places because of Langlands classification. So the question is how to define L-factors at ramified places?
As far as I know, at least for $GL_n$, we can define it as the gcd of some family of integrals via integral representation of L-function.

REPLY [9 votes]: This question was posted a while back but I just saw it. Here are some thoughts. In practice there are a couple of methods to construct L functions for local ramified representations. The first one is the Langlands-Shahidi method which works for "generic representations" of quasi-split groups and the second one is the method of integral representations (Rankin-Selberg method, Shimura's integral and the doubling method, etc). It is probably a bit painful to give a meaningful description of these two methodologies in such a limited space, so instead let me refer you to a couple of places where you can see accessible accounts of the two approaches.  A good reference for the basics of the Langlands-Shahidi method is the beautiful monograph "Analytic properties of automorphic L functions" by Gelbart and Shahidi. The same reference has a nice introduction to the method of integral representations. Dan Bump has written two very informative survey papers on the Rankin-Selberg method. Cogdell's ICTP lectures on the Rankin-Selberg method are lovely. Another good book to look at is the AMS book by Cogdell, Kim, Murty.  
As it stands there is no Langlands-Shahidi method for non-generic representations. What is missing from the picture is a good supply of easy to use unique models, like the Whittaker model in the generic setting. For orthogonal groups, however, recent progress by Waldspurger and others on the Gross-Prasad conjectures gives one the hope that maybe one can now develop a Langlands-Shahidi method, although there are serious obstacles to deal with. 
Most of the integral representations known to mankind too are closely linked with unique models (Whittaker, Bessel, etc). Sakellaridis has a theory that "explains" (some) integral representations in terms of spherical subgroups of reductive groups.