Just like food, yagya can also be categorized into sattvik, rajsik and tamsik.
A yagya performed according to the scriptures and without any ulterior motives is considered sattvik. The yagya should be ordained, by the scriptures, to be performed by the man of such a class. The man doing the yagya should not expect to gain wife, children, house, respect, appreciation, reputation, victory or heaven; nor should he do it to alleviate undesirable circumstances or his sorrow.
A yagya performed with faith and according to scriptures but with a motive to gain something or simply to establish a reputation irrespective of faith is considered a rajas yagya.
Tamas yagya is one which is not performed according to the scriptures, doesn’t involve any food donation and is done without any mantras, alms and faith.