You are building a customer support bot using Claude 3.5 Sonnet. You notice the model sometimes hallucinates policy details when the user asks a question not covered in your provided documentation. How should you structure your prompt to minimize this?
This directive creates a clear refusal behavior when the context is insufficient. By explicitly forbidding the model from guessing, you enforce a strict groundedness in the provided information. This prevents the model from relying on its pre-trained internal knowledge, which may be outdated or conflict with specific company policies.
Why this answer
Anchoring the model with strict constraints is the most effective way to reduce hallucinations. By explicitly instructing the model to state 'I don't know' rather than guessing, you force a boundary between known context and external knowledge. This approach is essential for enterprise applications where accuracy and safety are paramount, ensuring that the model remains within the provided knowledge base and does not invent plausible-sounding but incorrect information.
Exam trap
Candidates often rely on 'be accurate' or 'don't lie' instructions. These are too subjective; the model needs a binary condition to determine when it should stop answering.