Let R be a prime ring of characteristic different from 2, U the Utumi quotient ring of R, C the extended centroid of R, F and G non-zero generalized derivations of R and f(x(1),..., x) a polynomial over C. Denote by f(R) the set {f( r1,...,r(n)). E R} of all the evaluations of f(x(1),..., x(n)) in R. Suppose that f(x(1),..., x(n)) is not central valued on R. If R does not embed in M2(K), the algebra of 2 x 2 matrices over a field K, and the composition (FG) acts as a generalized derivation on the elements of f (R), then (FG) is a generalized derivation of R and one of the following holds: 1. there exists alpha is an element of C such that F(x) = alpha x, for all x is an element of R; 2 there exists alpha is an element of C such that G(x) = alpha x, for all x is an element of R; 3. there exist a, b is an element of U such that F(x) = alpha x, G(x) = bx, for all x is an element of R; 4. there exist a, b is an element of U such that F(x) = xa, G(x) = frb, for all x is an element of R; 5. there exist a, b is an element of U, alpha,beta is an element of C such that F(x) = ax + xb, G(x) = alpha x + beta(ax - xb), for all x is an element of R.