so here is my 2 cents. I had ants in my pantry. I put out traps and put down stuff to kill them and all it did was "manage" the population. From what I understand ants create a trail that other ants follow, and if you interrupt that trail with things like vinegar or stronger they follow a different trail, but they are still crawling in all directions creating new trails. So ever year after "treating" them the would eventually come back. So the real "trick" for me was finding their nest. In my case and I think in most peoples cases the nest isn't even remotely close to where you're seeing the ants. In the end of my efforts I found out that the ants were traveling over 25 feet to get to my pantry where they were collecting food and taking it back to the nest +25' away. So here is the process I took and maybe you can find a faster or better way from my efforts to get to the end where I have no ants any more.
Knowing that "treating" them was only population management I decided to seal my pantry. I bought a box of clean caulk and seal not only every location I could find them but I sealed ALL gaps. I sealed the baseboard to the floor. I sealed around the shelving that interrupted the baseboard. I sealed IN and OUT of outlets and light fixtures. I had and laundry lines in the pantry from a remodel and I sealed inside and out of that. Then I sealed the outside walls I could get to around the pantry. At this point the ants could no longer get into the pantry any other way then the door. This stopped them from getting into the pantry but withing a day I noticed about 3 feet away from the pantry, in the sunroom. I suddenly had a collection of ants at the base boards there. This was the moment I realized that where I was seeing the ants and killing them had ABSOLUTELY nothing to do with where they were coming from and the hunt was on. I tracked them all around the baseboards in the sun room back to a door in the sunroom that, I though, they were getting in through. So I sealed, and treated that area thinking I had found the problem.... but no, the day after doing the door I found them on the opposite corner of the sunroom. Which after a decent amount of watching them there most of them seemed to be coming in and out of that corner. So I went outside only to find the tiniest of cracks in the concrete slab on grade foundation of my sunroom right where my exterior stucco met the concrete and sure enough they were funneling in that crack like nobodies business. I dug down about a foot around that crack and sealed anything that looked like it might be a way in I even sealed the entire length of that exterior wall where the stucco and concrete meet. Problem solved... right.... nope. I was sure that I had solved the problem and weeks went by with no ants INSIDE the house. Then one day while working out side I noticed the ants where crawling all over the exterior of the house... presumably looking for another entry point. BUT this lead me back to a colony/nest inside/under a flowering plant that had been at the house since I purchased it. Every year I seen the plant and there where no ants on it, but after I had sealed up their major food supply suddenly the plant was covered in ants. The whole plant was moving with them. I dug it up and it was honestly the biggest collection of ants I have ever seen in my life. It creeped me out so much that I poured a concrete pad at that side of the house big enough to put a large hot tub on and continued the concrete 4' away from the house all the way around to the other side. I did have to relocate a decent amount of landscaping, but I haven't had anything other than the occasional "regular" amount of normal ants crawling on the exterior of my house, and I haven't had any inside for over 2 years.
That's my story. To summarize it track them ... track them... track them some more and then create a barrier to prevent OR a barrier that will give you maximum visibility to their entry.
I'm sure most people would hate this but If I ever built my own house I would completely surround it with 4' of concrete just to keep the "stuff" at bay.
Hope that helps