Well, you do learn from your mistakes but you don't learn from them in game but you do in real life.
By attempting to mix two ingredients together, and you fail to create something you now know that those ingredients cannot produce anything.
I am sure you can find many recipes in game and on the internet, every ingredient has a set of four qualities, when mixed with ingredients that have similar qualities you get a potion or poison.