Those little ants come around once a year. There usually caused by something spilled on the kitchen counter so we use clorox wipes then we employ ant traps and my wife leaves bay leaves all around. It seems to work.
With fruit flies I've figured out that something has been left on the counter and they appear. Take your pick they are attracted to all sorts of fruits and vegetables.