Tons of Jewish responsa (incl. this site) is based on a common belief/premise that the Talmudic Sages knew what they say and that everything they said is true - אמונת חכמים (see this question on this term). While it is difficult to classify all Talmudic statements, I'd like to distinguish between Halachic and factual ones.
Halachic statements rule Halochos - this thing is Kosher or Mutar or liable, etc. The Sages had the full Heavenly authority to rule the Halochos and we are obligated to follow them, which also includes Hashkafah and Mussar issues (thanks @Micha). This is out of the question.
Factual statements (this is so and so or this happened so and so) describe the world, its history, and its phenomena. My question is strictly about factual statements, for example "צלופחד הוא המקושש" or "there are billions of stars out there" or "snake is pregnant for 7 years" or "lice create spontaneously".
We can clearly see from the Talmud itself that the Sages did not accept axiomatically each other's opinions and argued strenuously, frequently relying on common non-Jewish knowledge. I know that this remained disputable and many late Rabbis did not accept many Talmudic statements, Rambam didn't canonize it in his principles, and some of the statements were proven as "very hard to reconcile with our empirical knowledge".
But eventually, in common perception, אמונת חכמים was expanded by some to the domain of knowledge also, beyond the realm of Halachah.
I would like to know the earliest source for the claim of אמונת חכמים expands to trusting Sages' knowledge. Did Tannayim or Amorayim themselves say that their knowledge is absolute and indisputable? Were it Gaonim, Rishonim or Achronim?