I'm a fiction writer. (You all love these questions.) My publications ALWAYS begin with the general disclaimer "This is a work of fiction ..."
However, I've been doing more realistic dramas, and I'll give an example of something I see myself doing (not specifically, but it's much easier to give an example).
In a 1930s-era gangster drama, two Chicago mobsters are talking about the end of Prohibition and its effect on their lifestyle. One mentions, "Now that they took the cocaine out of Coca-Cola, I bet there's a whole country full of addicts just waiting to get their hands on it."
Is this a form of defamation? Not necessarily because it's true (that Coca-Cola put cocaine in its product), but because I made an intuitive leap in a work of fiction suggesting the boom in cocaine usage in the 30s and 40s in America was at least partially due to the exposure and subsequent withdrawal of the drug by the company the decade before. Again, this is just an example of something I notice I tend to do.
So if this is a form of defamation, can you point me to an example of something similar so that I can learn what not to do? It's true that in-house publishers' attorneys make decisions on these types of things, but if I write a fiction story about the pre-1960s cocaine trade in America, and I can't use my example conversation, I may have just wasted months of work product in developing a story based upon it.