Databricks Generative AI Engineer Associate Question 263
Single answerYou are tasked with building a Retrieval-Augmented Generation (RAG) application for a legal document search system. During testing, you discover that some text in the data source contains problematic or sensitive terms that could lead to biased or inaccurate responses. What is the best alternative to handle this issue while maintaining the integrity of the RAG system?
- A
Use Named Entity Recognition (NER) to identify sensitive terms and replace them with placeholders.
- B
Remove entire documents containing problematic terms from the data source.
- C
Apply a text pre-filtering pipeline to flag and correct problematic terms before indexing the data.
- D
Manually review and edit the data source to remove all sensitive content.
Show answer and explanation
Correct answer: C
Explanation
A text pre-filtering pipeline is the most efficient and scalable approach for mitigating problematic text in a data source feeding a RAG application. It ensures sensitive terms are flagged and corrected systematically, preserving the context and integrity of the data while minimizing manual efforts.
- A. Incorrect.
Using Named Entity Recognition (NER) can help identify sensitive terms, but replacing them with placeholders may lead to loss of contextual meaning, reducing the quality of RAG responses.
- B. Incorrect.
Removing entire documents containing problematic terms is too extreme and could result in significant data loss, affecting the RAG model's knowledge base.
- C. Correct.
Applying a text pre-filtering pipeline is an effective mitigation strategy as it automates the process of identifying and correcting problematic terms without compromising the dataset's context and scale.
- D. Incorrect.
Manually reviewing and editing the data source is highly time-consuming, prone to human error, and not scalable for large datasets.