Databricks Generative AI Engineer Associate Question 261
Select 2You are designing a Retrieval-Augmented Generation (RAG) application that relies on a knowledge base derived from customer support transcripts. During testing, you identify problematic text in the knowledge base, including sensitive information and potentially harmful language. What is the best alternative approach to mitigate these issues while maintaining the application's performance?
- A
Use a text pre-processing pipeline to redact sensitive information and filter harmful content before ingesting data into the knowledge base.
- B
Fine-tune the language model on a curated dataset that excludes sensitive or harmful content.
- C
Implement a post-retrieval filtering mechanism to remove problematic responses from the output.
- D
Rely on the model's built-in safety mechanisms to handle sensitive or harmful content automatically.
- E
Introduce a human-in-the-loop validation process to manually review and approve data ingestion.
Show answer and explanation
Correct answers: A, C
Explanation
Mitigating problematic text in a RAG application requires a combination of proactive and reactive strategies. Redacting or filtering harmful content during pre-processing ensures that the knowledge base is clean from the outset, while post-retrieval filtering provides an additional safeguard against problematic responses. These approaches work together to ensure safety and reliability without heavily compromising system performance.
- A. Correct.
Using a text pre-processing pipeline to redact sensitive information and filter harmful content before ingestion is an effective and proactive mitigation strategy that ensures the knowledge base remains clean and reliable.
- B. Incorrect.
Fine-tuning the language model on a curated dataset is helpful for improving the model’s performance, but it does not address the issue of problematic text already present in the knowledge base.
- C. Correct.
Implementing a post-retrieval filtering mechanism can help ensure that problematic outputs are removed before they are presented to the user, adding an extra layer of safety.
- D. Incorrect.
Relying solely on the model's built-in safety mechanisms is insufficient, as these mechanisms may not fully address domain-specific issues or sensitive content in the data source.
- E. Incorrect.
Introducing a human-in-the-loop validation process is not scalable for large datasets and could significantly slow down the ingestion process, making it impractical for most RAG applications.