Edge Cases That Trigger Hallucinations in Generative AI: Patterns and Prevention