Databricks Certified Generative AI Engineer Associate · Free Practice Question Easy

Question 26

A Generative AI Engineer is building a RAG application that will rely on context retrieved from source documents that are currently in PDF format. These PDFs can contain both text and images. They want to develop a solution using the least amount of lines of code. Which Python package should be used to extract the text from the source documents?
  • A flask
  • B beautifulsoup
  • C unstructured
  • D numpy
Reveal correct answer

Correct answer: C

Explanation

The unstructured library is designed to efficiently extract text and other structured data from PDFs with minimal code.

A. Incorrect: Flask is a web framework and cannot extract text from PDFs.

B. Incorrect: BeautifulSoup is used for parsing HTML and XML documents, not PDFs.

C. Correct: The unstructured Python library is specifically designed for handling PDFs, including those with both text and images, and requires minimal coding effort.

D. Incorrect: Numpy is a numerical computation library and cannot process PDFs.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need