Guardrails in Generative AI: Mitigating Hallucination Risks for Safe Applications