Guppies, like other tropical fish, do not survive well in a tank with goldfish.They have different habitats that they need to survive.
Goldfish are fresh water fish and require cooler water. Guppies are tropical fish that need warm water to survive. Also, the two species need a different diet. The food made for one does not have the correct nutrients for the other. Since guppies are smaller, the goldfish might eat them or not give them a chance to get to the fish flakes. In addition, goldfish require the water to be changed more often if a strong filter is not used. The filter may be too strong for the guppies.