In particular, the formic acid sprayed by ants when attacked can trigger a predator alarm response in nearby ants, gathering reinforcements to attack the predator.
Wild waterpepper produces oils that cause skin irritation, and the many acids in its tissues, including formic acid, make the plant unpalatable to livestock.