Based on Sethu's comment, here is the Gita bhashya of Adi Shankara on verse 18.66,
The validity of the Vedas holds good only with regard to matters
concerning the relation between ends and means of Agnihotra etc.,
whichare not known through such valid means of knowledge as direct
perception; but not with regard to objects of direct perception etc.,
because the validity of the Vedas lies in revealing what is beyond
direct perception. Therefore it is not possible to imagine that the
idea of egoism with regard to the aggregate of body etc., arising from
an obviously false knowledge, is a figurative notion. Surely, even a
hundred Vedic texts cannot become valid if they assert that fire is
cold or non-luminous! Should a Vedic text say that fire is cold or
non-luminous, even then one has to assume that the intended meaning of
the text is different, for otherwise (its) validity cannot be
maintained; but one should not assume its meaning in a way that might
contradict some other valid means of knowledge or contradict its own
statement.
The Vedic texts enjoining rites (and duties) etc. are not invalid,
because they, through the generation of successively newer tendencies
by eliminating the successively preceding tendencies, are meant for
creating the tendency to turn towards the indwelling Self.
We can also look at the brahma sutra bhashya of Adi shankara 1.3.33
Let us examine, as an illustrative example, the injunctive passage,
'He who is desirous of prosperity is to offer to Vâyu a white animal.'
All the words contained in this passage are directly connected with
the injunction. This is, however, not the case with the words
constituting the corresponding arthavâda passage, 'For Vâyu is the
swiftest deity; Vâyu he approaches with his own share; he leads him to
prosperity.' The single words of this arthavâda are not grammatically
connected with the single words of the injunction, but form a
subordinate unity of their own, which contains the praise of Vâyu, and
glorify the injunction, only in so far as they give us to understand
that the action enjoined is connected with a distinguished divinity.
If the matter conveyed by the subordinate (arthavâda) passage can be
known by some other means of knowledge, the arthavâda acts as a mere
anuvâda, i.e. a statement referring to something (already known).
When its contents are contradicted by other means of knowledge it acts
as a so-called gunavâda, i.e. a statement of a quality. Where,
again, neither of the two mentioned conditions is found, a doubt may
arise whether the arthavâda is to be taken as a gunavâda on account of
the absence of other means of knowledge, or as an arthavâda referring
to something known (i.e. an anuvâda) on account of the absence of
contradiction by other means of proof. The latter alternative is,
however, to be embraced by reflecting people.--The same reasoning
applies to mantras also.
Let us take a vedic sentence. Indra performed a yagna called X and because of this, he became powerful and was able to defeat Y in the battle of Z.
Now there can be multiple interpretations of the sentences. Some may believe that the battle of Z happened. Indra, X, Y, Z etc are all real. Some may interpret it to mean that if you do yagna X, you will become powerful to defeat enemies and this does not mean Z happened or there was a person Y.