Instead of trying to buff herbivores, nerf the carnivores
Imagine a world of trash. Maybe a precursor civilization has polluted the world, maybe it's an experiment, maybe it's just an accident that nobody bother to clean up, you tell me.
1. Nutritional energy for cognition
This world have a lot of fertilizer runoff or equivalent on the surface, allow the plants to grow strong and nutritious, allowing herbivores can have enough energy to sustain some form of intelligence. Since this is artificial fertilizer, it can even have some exotic mineral (Ca, Zn, etc.) that rarely exists in nature yet our brains need.
2. Preventing carnivores from developing intelligence first
Unfortunately, this world is also hit with a lot of heavy metal contamination, which means anything carnivorous will eventually accumulate too much toxin, and die off. The higher on the food chain we go, the quicker the accumulation.
Intelligence is not all that powerful on its own, without support from a longer lifespan to accumulate knowledge, an overlap in generations to facilitate education, social aptitude to share knowledge, etc. Throw a spanner into one, and the rate of developing cognition is slowed down, maybe enough for herbivores to catch up.
3. A need for problem solving ability that do not involve other living beings
Again, we do not want to involve any other species in this drive for cognition, seeing as this would require that animal to be equal to the herbivores in intelligence. So you could add that not only the planet is covered in pollution, its climate pattern is also damaged to the point that it has extremely volatile and unpredictable weather.
Emphasis on unpredictable, so your herbivores cannot just select for an instinctive behavior that will protect it once, and keep it to the end of time. Also emphasis on volatile, and maybe widespread as well, so no amount of toughness, or overwhelming number will save them on its own.
That way, the weather will select for animals that have:
- Problem solving ability: Each type of natural disaster will require different countermeasures. For example, forest fire require you to get to ground, and run to water, while flood need you to get to high ground instead. Since the weather is extreme and unpredictable, animals that cannot solve problems quickly cannot thrive.
- Pattern recognition: When long-term prediction of random disaster is not feasible, the ability to quickly notice and understand the beginning stages of a disaster is highly valued. Each second you realize the danger is a second you can prepare for it.
- Plan development: While the long-term prediction of weather is not allowed here, long-term preparation for it is not. Building nests underground near water to avoid fire, have escape routes to avoid flood, food storage in case of flash freeze, etc., having the correct counter on hand allow this herbivore to thrive.
4. Remember to provide the little details
Make sure that the manipulators evolved on your herbivores are something that can continue evolving, like a limb, tentacle, or elephant trunks, have more than just one of them, give them social instinct to group together and exchange resources and ideas. So long as an herbivore gets to be a civilization first, it will both give drive for more intelligence, while out-competing any other sentient-wannabe. Which will end up with an herbivore become the dominant intelligent species of your world. (If you are asking for how herbivores on average get to be smarter than carnivores, I got nothing there)
... Until the herbivores meet up with whoever created such a world, and get a practical demonstration of the benefits of eating meat