Databricks Generative AI Engineer Associate Question 260
Select 2You are developing a RAG (Retrieval-Augmented Generation) application that uses a large corpus of text data from multiple sources. During testing, you find that some of the retrieved text contains problematic content, such as offensive language or factual inaccuracies. Which of the following approaches would be the most effective alternative for mitigating such problematic text in the data source?
- A
Implement a pre-processing pipeline to filter out problematic text using a combination of regular expressions and keyword matching.
- B
Use a machine learning-based content moderation model to classify and remove or flag problematic content before indexing the data.
- C
Rely on the generative model's prompt engineering to discourage the inclusion of problematic content during response generation.
- D
Integrate a human-in-the-loop process to manually review and curate the data source for problematic content.
- E
Apply differential privacy techniques to obfuscate problematic content while retaining its semantic meaning.
Show answer and explanation
Correct answers: B, D
Explanation
Mitigating problematic text in the data source feeding a RAG application requires a robust approach. Using a machine learning-based content moderation model (Option 2) provides scalability and accuracy in identifying problematic content. Additionally, combining this with a human-in-the-loop process (Option 4) ensures high-quality curation for edge cases that automated systems might miss. These methods directly address the issue at the data preprocessing stage, ensuring the RAG application retrieves clean and reliable information.
- A. Incorrect.
While keyword matching and regular expressions can catch some problematic text, this method is not robust enough to handle variations in language, context, or subtle problematic content.
- B. Correct.
A machine learning-based content moderation model can effectively identify and filter out problematic content by learning contextual and semantic patterns, making it a scalable and reliable solution.
- C. Incorrect.
Prompt engineering is focused on guiding the generative model's behavior during response generation and does not address the underlying issue in the data source itself.
- D. Correct.
Integrating a human-in-the-loop process allows for manual curation and ensures high-quality data, especially when automated techniques fall short. However, this approach may not scale well for very large datasets.
- E. Incorrect.
Differential privacy techniques are designed to protect sensitive data, not to mitigate problematic text. This approach would not effectively address the issue of offensive language or factual inaccuracies.