We propose a geometric interpretation of the classical Rankin-Selberg method for GL(n) in the framework of the geometric Langlands program. We show that the geometric Langlands conjecture for an irreducible unramified local system E of rank n on a curve implies the existence of automorphic sheaves corresponding to the universal deformation of E. Then we calculate the `scalar product' of two automorphic sheaves attached to this universal deformation.