Good points John about the problems with house plants. It's very difficult to create a balanced system in such artificial conditions.
However, we have this thing called winter which means some of my younger, more tender plants need to come inside if they will survive to be large enough to plant out later in life. Also, it greatly increases my food production and reduce the input (aka, water, soil nutrition) I need to give it, if I can start some of the plants inside so that they can be hardy enough to plant out at the end of the rainy season. If I can plant them early enough, they grow their roots deep enough to survive the drought on their own rather than depending on irrigation for the entire summer. However the rainy season is still quite cold, so the seeds wouldn't germinate outside.
I usually use a mixture of 'wild' dirt and old (organic) potting soil I found in the back of the shed. I like giving the plants some of the microbes, fungus, &c from the live soil, to help the plants grow stronger, plus a handful of manure in the bottom of each pot so they have something to 'eat' when their roots grow. Thinking back on it, it wasn't until I started mixing in
compost from my worm bin that these gnats appeared.
In the past I tried the nematodes. They caused an explosion in the gnat population and made the humans itchy if they touched the plants/soil. I don't know why this was. Perhaps it was a bad batch of nematodes or perhaps the watering cycle needed for the nematodes to thrive is also the watering cycle that the gnats thrive with. Either way, I don't have the funds to try again this year.
Are there wild sources of predatory soil dwellers? Could they survive in such small pots of soil?
Would earthworms actually eat gnats? I thought they dwelled in a darker part of the soil and ate only dead things.
What about a betta fish? I seem to remember in the past that the gnats are attracted to water, and my betta fish ate any bugs that were stupid enough to come near his home. He even use to jump slightly to catch a hovering house fly. Alas I don't have a fish anymore, but maybe someone here does and they could try an experiment? I think it would be difficult to get the fish tank near the plants without being in direct sun. Then again, that would just be control for the adult population.