If f = dot(x,y), then f = f (x,y), so the Jacobian should be J = [[df/dx1, df/dx2, df/dx3],[df/dy1, df/dy2, df/dy3]]

No 
To be able to write the jacobian as a 2D matrix, you need all inputs and outputs to be 1D Tensors.
So you will need to have a single output that is the concatenation of x and y. And then you can write the Jacobian as  [[df/dx1, df/dx2, df/dx3, df/dy1, df/dy2, df/dy3]]