CertLumen

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) or ai_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?

  1. Apython-pptx
  2. Bpytesseract
  3. Cpdfplumber
  4. Dlxml
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

← Previous objective · All 56 objectives · Next objective →