An Arabi came to the Prophet ﷺ and began speaking eloquently. The Messenger of Allah ﷺ said, "Indeed, some eloquence is enchanting, and some poetry contains wisdom."
حدثنا مسدد حدثنا أبو عوانة عن سماك عن عكرمة
جاء أعرابي إلى النبي ﷺ فجعل يتكلم بكلام فقال رسول الله ﷺ إن من البيان سحرا وإن من الشعر حكما
[Hasan] Tirmidhi related it, Adab, Chapter on What Has Been Said About Some Poetry Being Wisdom, no. 2845, from the hadith of Abu Awana with this wording, and he said, hasan sahih. Ibn Majah also related it, no. 3756, but its chain is daif. The hadith has corroborating narrations.