What are RAG-specific safety concerns?
hardAnswer
- (1) Indirect prompt injection: attacker seeds malicious instructions into indexed docs.
- Defense: sandbox tool calls, strip HTML/scripts, sign trusted sources, dual-LLM pattern.
- (2) Data leakage: RAG can retrieve sensitive info the user shouldn't see.
- Defense: metadata-based access control at retrieval time.
- (3) Provenance drift: outdated docs give confidently wrong answers.
- Defense: freshness metadata + citation UX.
- (4) Attribution failure: LLM makes up citations.
- Defense: post-process verification.
Check yourself — multiple choice
- No RAG-specific risks
- Prompt injection in docs, data leakage without ACL, stale info, hallucinated citations — each needs a specific defense
- Only for images
- Solved by fine-tuning
RAG safety: prompt injection / ACL / freshness / citation verification — each with a defense.
#rag#safety#guardrails
Practise LLMs & GenAI
214 interview questions in this topic.