Databricks Generative AI Engineer Associate Question 54
Select 3You are building a Retrieval-Augmented Generation (RAG) application to provide concise answers to user queries based on a large collection of technical documents. During testing, you notice that the generated answers often include irrelevant information or unrelated details. Which strategies should you implement to improve the quality of your RAG application by filtering extraneous content from source documents?
- A
Use document chunking to split large documents into smaller, more focused sections before indexing.
- B
Apply natural language processing (NLP) techniques such as named entity recognition (NER) to extract relevant entities during preprocessing.
- C
Index all content from the source documents without any filtering to ensure nothing is missed.
- D
Implement a content filtering pipeline that removes sections like footnotes, advertisements, or navigation menus.
- E
Rely solely on the language model to identify and ignore irrelevant content during inference.
Show answer and explanation
Correct answers: A, B, D
Explanation
To improve the quality of a RAG application, it is essential to preprocess and filter source documents effectively. This involves splitting large documents into smaller chunks, using NLP techniques to extract relevant information, and implementing a filtering pipeline to remove extraneous content. These strategies help ensure that only high-quality, relevant data is indexed and retrieved, thereby enhancing the accuracy and relevance of generated answers.
- A. Correct.
Splitting large documents into smaller chunks ensures that only relevant sections are retrieved during the RAG process, which reduces the inclusion of extraneous information.
- B. Correct.
Using NLP techniques like NER helps identify and prioritize relevant entities, ensuring that only pertinent information is retained during preprocessing.
- C. Incorrect.
Indexing all content without filtering increases the likelihood of retrieving irrelevant details, which can degrade the quality of generated answers.
- D. Correct.
Filtering out unnecessary sections such as footnotes, ads, or navigation menus ensures that irrelevant content does not influence the RAG system's output.
- E. Incorrect.
Relying solely on the language model to filter irrelevant content is not sufficient, as it can lead to inefficiencies and inaccuracies in the generated responses.