Yes the diet of an animal can be predicted by seeing the dental formula.
dental formula=no of incisor.no of canines.no of premolars.no of molars/no of incisor.no of canines.no of premolars.no of molars*2
Like for example the dental formula of an adult human is 2123/2123=32
dental formula is different in different mammals.
dental formula of a herbivore is- I 0/3; C 0/ ; PM 3/3; M 3/3.
dental formula of a carnivore is- I 3/3; C 1/1; PM 4/4; M 2/3.
dental formula of a omnivore is- I 2/2; C 1/1; PM 2/2; M 3/3
so by seeing the number it can be concluded whether it is a omnivore carnivore or a herbivore....hence diet of an animal could be predicted