← All questions
RAGVery Hard· Prompt Engineering· Grounding· Compliance

Compliance requires that every claim in an answer be tr...

Adding ‘answer only from the provided context’ to a system prompt is a common technique to guide model behavior, but it should not be mistaken for a formal control. Prompts are probabilistic in nature and shift the model’s output distribution rather than enforcing a strict logical constraint. Because the requirement is a verification requirement—ensuring that every claim is traceable to a source—it necessitates an explicit verifier component in the architecture to validate the output against the source documents.

Code playground (Python)