Yōga Sūtra 2.05
अनित्याशुचिदुःखानात्मसु नित्यशुचिसुखात्मख्यातिरविद्या।
anityāśuciduḥkhānātmasu nityaśucisukhātmakhyātiravidyā।
[अनित्य अशुचि दुःख अनात्मसु नित्य शुचि सुखः आत्म ख्यातिः अविद्या।
anitya = not permanent; aśuci = unclean; duḥkha = misery or sorrow; anātmasu = not-self; nitya = permanent; śuci = clean; sukhaḥ = benevolent; ātma = self; khyātiḥ = that is; avidyā = ignorance;]
Ignorance (avidya) understands that which is not permanent as permanent, that which is unclean as clean, that which is misery as pleasure, that which is not self as self.
A definition of no-knowledge or ignorance is given. So knowledge is the ability to discriminate permanent from non-permanent, benevolent from sorrow, clean from unclean and self from not-self.
E.g: material procession is temporary, not smoking is benevolent while being addicted to smoking is sorrow, stale food like wine is unclean compared to freshly prepared food, physical body is not self, etc.