The gradient is a 3-dimensional vector.
If the 4-dimensional function f(x,y,z)=xy2/z3 the gradient components are:
∂f/∂x=y2/z3, at (1,2,-1) this is -4;
∂f/∂y=2xy/z3, at (1,2,-1) this is -4;
∂f/∂z=-3xy2/z4, at (1,2,-1) this is -12.
The gradient is <-4,-4,-12> which can be written -4i-4j-12k where i, j, k are Cartesian unit vectors.