Razin Abi al-Nu’man reported: Ali ibn Abi Talib, may Allah be pleased with him, said, “When you are asked about what you do not know, then flee.” It was said, “O leader of the faithful, how does one flee?” Ali said, “That you say: Allah knows best.”
Source: Sunan al-Dārimī 183
عَنْ رَزِين أَبِي النُّعْمَانِ عَنْ عَلِيِّ بْنِ أَبِي طَالِبٍ رَضِيَ اللَّهُ عَنْهُ قَالَ إِذَا سُئِلْتُمْ عَمَّا لَا تَعْلَمُونَ فَاهْرُبُوا قَالَ وَكَيْفَ الْهَرَبُ يَا أَمِيرَ الْمُؤْمِنِينَ قَالَ تَقُولُونَ اللَّهُ أَعْلَمُ
183 سنن الدارمي المقدمة