Databricks Generative AI Engineer Associate · Section 2 · 14% of the exam
Filter extraneous content in source documents that degrades quality of a 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 finance team's RAG application must answer questions about figures in quarterly report PDFs that have a text layer. Plain text extraction flattens the financial tables into unreadable runs of numbers. Which Python package is designed to extract tables from digital PDFs with their rows and columns intact?
- A
python-pptx - B
pytesseract - C
pdfplumber - D
lxml
Show the answer
C. pdfplumber exposes characters, lines and rectangles on each PDF page and provides extract_tables(), which rebuilds tables as rows and cells. Keeping table structure lets you chunk tables intact or convert them to Markdown or HTML before embedding.
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
- 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
- Identify needed source documents that provide necessary knowledge and quality for a given RAG application
- 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