The fourth commandment of mystery fiction is:
No hitherto undiscovered poisons may be used, nor any appliance which will need a long scientific explanation at the end.
In his 1939 commentary on the commandments, Fr. Knox said, about this:
There may be undiscovered poisons with quite unexpected reactions on the human system, but they have not been discovered yet, and until they are they must not be utilized in fiction; it is not cricket. Nearly all the cases of Dr. Thorndyke, as recorded by Mr. Austin Freeman, have the minor medical blemish; you have to go through a long science lecture at the end of the story in order to understand how clever the mystery was.
With regard to poisons, building on my earlier musings on poisons, I think the poisons really in question are those which ape death by natural causes. A heretofore undiscovered poison which kills in a way that is unmistakably by poison—if the victim’s face turns neon yellow, then he can’t breathe and, gasping, dies, then afterwards his entire body becomes fluorescent green and glows int he dark for two full days—I suspect that this would be cricket. It would be odd, to be sure, but there is certainly no clue being hidden from the reader. The author would just about have to go out of his way to have the detective recognize this fictional poison but not tell the reader about how it can be obtained and administered.
The real problem, I think, is a fictional poison which mimics natural causes. The fictional poison is, in this case, indistinguishable from magic, as far as the reader is concerned. The author can invent any fictional poison with any properties that he wants, so there is no way for the reader to guess what fictional poison the author invented.
Even this could be managed, though, with a bit of work. The trick would be to require that some poison must be deducible, and further, what innocent place the murderer hid the poison must also be deducible. I think it would have to culminate in the detective trying to force the murderer to eat the innocent thing and having him refuse. (Probably an alternative is trying the food out on a guinea pig, but in these sensitive days animal testing may not go over well with audiences.)
I think the case against the long science lecture at the end is more self-evident. The purpose of mystery fiction is to be fun, not to take the place of a college course. The other problem with coming at the end is that the mystery was thus cheating; if the long science lecture couldn’t have come earlier without giving away the plot, the mystery was mysterious only by being esoteric. There is no real difference here with require a long lecture in art history or reading the Chinese language; if the solution is easy given a certain set of background knowledge, the mystery is mysterious only by being obscure. And being obscure is the easiest thing in the world.
It is sometimes possible to work in a long science lecture at the beginning or in the middle of a work of detective fiction, since this becomes more interesting by clearly being a possible key to the problem, and moreover its placement prevents the author from being merely obscure instead of mysterious. That said, it’s probably still best to avoid it, or at least break it up into pieces.