An important aspect of the AdS/CFT correspondence is the recipe to compute correlation functions of a boundary operator $\mathcal{O} $ in terms of the supergravity fields in the interior of the $AdS_{n+1}$ (as we approach the boundary). Namely, $$\big< \exp \int_{\mathbb{S}^n} \mathcal{O} \phi_{0}\big > = Z_{s} \left[\phi \big|_{\partial(AdS)} = \phi_0\right],$$ where $Z_s$ is the supergravity partition function.
The review papers I have found (and Witten's original paper as well) explain how to use the above formula but fail to provide a satisfactory explanation why the formula ought to work, or even how it came about.
Can anyone explain if there is a logical (and/or insightful) path that would lead to the above correspondence between the generating function of the $n$-points correlators and supergravity/string theory?