A wasp is any insect of the narrow-waisted suborder Apocrita of the order Hymenoptera which is neither a bee nor an ant and excludes the broad-waisted sawflies (Symphyta), which look somewhat like wasps, but are in a separate suborder.
The wasps do not constitute a clade (a complete natural group with a single ancestor), whereas bees and ants are deeply nested within the wasps, having evolved from wasp ancestors. Wasps that are members of the clade Aculeata can sting their prey.
The most commonly known wasps, such as yellowjackets and hornets, are in the family Vespidae and are eusocial (living together in a nest with an egg-laying queen and non-reproducing workers). Most wasp species are however solitary, with each adult female living and breeding independently. Females typically have an ovipositor for laying eggs in or near a food source for the larvae, though in the Aculeata the ovipositor is often modified instead into a sting used for defense or prey capture. Wasps play many ecological roles. Some are predators or pollinators, whether to feed themselves or for their larvae. Many, notably the cuckoo wasps lay their eggs in the nests of other wasps (kleptoparasites). Many of the solitary wasps are parasitoidal, meaning they lay eggs on or in other insects (any life stage from egg to adult) and often provision their own nests with such hosts. Unlike true parasites, the wasp larvae eventually kill their hosts. Solitary wasps parasitize almost every pest insect, making wasps valuable in horticulture for biological pest control for whitefly in tomatoes and other crops.
The largest social wasp is the Asian giant hornet, at up to 5 cm in length. Among the largest solitary wasps is a group of species known as tarantula hawks, along with the giant scoliid of Indonesia (Megascolia procer). The smallest wasps are solitary parasitoid wasps in the family Mymaridae, including the world’s smallest known insect, with a body length of only 0.139 mm, and the smallest known flying insect, only 0.15 mm long.