Vaisesika Sūtras
Vaisesika Sūtra 6.1.03
बुद्धिपूर्वो ददातिः ॥३॥
Giving or charity is preceded by intention combined with knowledge.