Databricks Generative AI Engineer Associate · Section 2 · 14% of the exam
Identify needed source documents that provide necessary knowledge and quality for a given RAG application
One of the objectives of the Databricks Certified Generative AI Engineer Associate exam, in the section “Data Preparation”. Here is what it covers, the points to remember and a question to try.
What it covers
Decide which sources a RAG application actually needs, pick the right Python package (or ai_parse_document) to extract their content, and strip the boilerplate, duplicates and stale versions that quietly ruin retrieval.
Points to remember
- Start from the questions users will ask; make sure a source exists for every question type.
- Per-record facts (delivery date for a
transaction_id) come from structured tables keyed by the ID, not from documents. - Judge sources on authority, freshness, coverage, quality, access rights and licensing; keep raw sources in a table for traceability.
- PDF text:
pypdf/PyMuPDF; PDF tables:pdfplumber; many formats:unstructured; DOCX:python-docx; PPTX:python-pptx; HTML: BeautifulSoup/lxml. - Scanned images have no text layer: use OCR (
pytesseract) orai_parse_document.
Try a question
A support assistant indexes 8,000 pages exported from an HTML help center. Retrieved chunks are dominated by the site's navigation menu, a cookie-consent banner and a footer of links, and answers cite irrelevant pages. Which change addresses the root cause?
- AStrip
nav,header,footer, script and banner nodes with BeautifulSoup first - BIncrease
num_resultsfrom 5 to 20 so the real content has more chances to be retrieved - CSwitch to a chat model with a larger context window so it can ignore the boilerplate
- DDouble the chunk size so that each chunk contains more real content relative to the menu
Show the answer
A. Page chrome repeated on every page dilutes each chunk's embedding and matches many unrelated queries. Removing those DOM nodes before text extraction fixes the data itself; the HTML structure makes this easy while the tags are still present.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Source Documents, Extraction and Filtering teaches this objective (about 40 minutes), and 11 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.
More in this section
- Apply a chunking strategy for a given document structure and model constraints
- Filter extraneous content in source documents that degrades quality of a RAG application
- Choose the appropriate Python package to extract document content from provided source data and format
- Define operations and sequence to write given chunked text into Delta Lake tables in Unity Catalog
- Use tools and metrics to evaluate retrieval performance
- Design retrieval systems using advanced chunking strategies
- Explain the role of re-ranking in the information retrieval process