What is the exact relationship between on-shell amplitudes and off-shell correlators in AdS/CFT? In this answer to a question, it is mentioned that in the AdS/CFT correspondence, on-shell amplitudes on the AdS side are related to off-shell correlators on the CFT side.
Can somebody explain this to me in some more (technical) details, maybe by an explanatory example?
 A: First, a reference article, by Witten, http://arxiv.org/abs/hep-th/9802150v2.pdf 
I'll try to expose the basic idea, with a flat space-time.
Suppose you have a relativistic scalar field theory, on a flat space-time domain, with boundary. The equation of the field is :
$$\square \Phi(x) = 0$$ (fields on-shell)
Now, define the partition function 
$$Z = e^{−S(\Phi)}$$, where $$S(\Phi) = \int d^nx \,\partial_i \Phi(x)\,\partial^i \Phi(x)$$ is the action for the field  $\Phi$
After this, you make a integration by parts (using the above fied equation) , and Stokes theorem, and you get:
$$S(\Phi) = \int d^nx \, \partial_i \Phi(x)\,\partial^i \Phi(x) =  \int d^nx \,\partial_i(\Phi(x)\,\partial^i \Phi(x))$$ 
$$=  \int_{Boundary} d \sigma_i \,(\Phi(x)\,\partial^i \Phi(x)) $$
Now, suppose that the field $\Phi(x)$ has the value $\Phi_0(x)$ on the boundary.
Then, you can see  that $S$ and $Z$ could be considered as functionals of $\Phi_0$, so we could write $Z(\Phi_0)$: 
$$ Z(\Phi_0) = e^{ \,( -\int_{Boundary} d \sigma_i \,(\Phi(x)\,\partial^i \Phi(x)))}$$
Now, the true calculus is not with flat space-time, but with Ads or euclidean Ads,so in your calculus, you must involve the correct metrics, but the idea is the same.
The last step is to say that there is a relation between, the Generating function of correlation functions of CFT operators $O(x)$ living on the boundary, and the partition function $Z$
$$<e^{\int_{Boundary} \Phi_0(x)  O(x)}>_{CFT} = Z(\Phi_0)$$ 
The RHS and LHS terms of this equation should be seen as functionals of $\Phi_0$
You can make a development of these terms in powers of $\Phi_0$, and so you got all the correlations functions for the CFT operators $O(x)$
$$<O(x_1)O(x_2)...O(x_n)> \sim \frac{\partial^n Z}{\partial \Phi_0(X_1)\partial \Phi_0(X_2)...\partial \Phi_0(X_n)}$$
So, ADS side, we are using on-shell partitions functions (because field equations for $\Phi$ are satisfied)
Now, CFT/QFT side, the correlations functions $<O(x_1)O(x_2)...>$ are, by definition, off-shell correlation functions (by Fourier transforms, there is no constraint about momentum). To get scattering amplitudes, we simply need to put the external legs on-shell.
A: The statement can be understood in terms of the GKPW-formula (named after Gubser, Klebanov, Polyakov and Witten), which does exactly that: it relates correlation functions on the CFT side (boundary) to string amplitudes on the AdS side (bulk). Assume that $\phi(\vec{x},z)$ is some field in the bulk, where $z$ is the so-called "holographic coordinate", which reaches its CFT-value $\phi_0$ at the boundary at $z=0$. For some Operator $\mathcal{O}(\vec{x})$, the GKPW-formula is given by 
$$\langle e^{\int d^4x\,\phi_0(\vec{x})\mathcal{O}(\vec{x})}\rangle_{CFT}=\mathcal{Z}(\phi(\vec{x},z)|_{z=0}=\phi_0(\vec{x})).$$
On the left hand side, you have the correlation function for the CFT and on the right hand side, you find the partition function of the corresponding string theory, evaluated for the boundary value of the field.    
