An audit of a RAG application's knowledge base reveals that approximately 8% of ingested online forum posts contain toxic content (hate speech, slurs, violent language). This content occasionally surfaces in the assistant's responses, causing user complaints and brand risk. The team needs a scalable mitigation strategy for the data source. Which approach is MOST effective?
Show answer & explanation
Correct answer: D
WHY D is correct: Fixing problems at the data source — during ingestion, before the knowledge base is built — is the most effective and durable mitigation. A toxicity classifier applied per-chunk at ingest time removes problematic content from the Delta table and Vector Search index permanently. Toxic chunks never enter the knowledge base and cannot be retrieved, regardless of the query. This upstream fix is more reliable than any downstream LLM-level interventions. WHY NOT A: A UI disclaimer acknowledges the problem but does nothing to prevent toxic content from appearing in responses. It shifts liability rather than removing the risk, and user-facing disclaimers do not satisfy enterprise safety requirements. WHY NOT B: System prompt instructions are the weakest form of guardrail. The LLM may still reproduce toxic phrasing when it appears in retrieved context, especially for closely relevant queries. Instructions are not reliably followed when the context window contains strongly contradicting content. WHY NOT C: Retrieval similarity scores measure semantic relevance to the user query, not content quality or toxicity. A toxic post that is topically relevant to the user's question will score high, not low. Raising the threshold only reduces result count — it does not correlate with toxicity reduction.