Rosemary is now classified as Salvia rosmarinus. That makes an old claim that rosemary and sage belong to entirely different genera an unreliable starting point for comparison.
Read the current names
Rosemary is Salvia rosmarinus, formerly Rosmarinus officinalis. Culinary sage is Salvia officinalis. Older labels can still be useful, but a claim that these herbs must belong to different genera is out of date.
Compare leaves and habit
The familiar rosemary shrub has narrow evergreen leaves. Culinary sage usually has broader leaves, but Salvia contains many other species and cultivars. A rule based on one narrow or grey leaf cannot identify the whole group.
Keep a full plant label and compare the whole shrub, flowers and foliage. For cultivation, check the named plant's needs and the conditions at the planting site. A shared genus does not mean that every sage and rosemary selection has the same hardiness, size or pruning response.



Related reading: Rosemary in Pots: Container Size, Drainage and Watering.