i have learned the hard way, but im glad. Well, they do eat up roots. Not good. So. Instead of telling u a long story, ill just tell u some things i do, that work.
When preparing your soil to use, cook it at 25-275 for 40 minutes. I do this, and empty the metal pan into a wheelbarrel. I repeat, until i have all i need. This kills 95 % of gnat eggs/larva. It should kill em all. Maybe if i stilled the stuff, halfway thru cooking? Then , when i transplant, i add one tsp per gal, of "gognats". (cedar oil). Step three. After the plants are in flower, (if needed), i use 3 tbl per gal , of hydrogen peroxide. This also cleans the roots, but it u use a microb tea, may, lesson these good things, to. There u go. And i still use the yellow sticky paper. The most effective part? The cooking of the soil!