Parsing 20,000 scanned contracts in a Unity Catalog volume

GenAI Engineer Data Preparation Medium Question 17 of 45

A Generative AI Engineer must parse 20,000 scanned contracts held as binary files in a Unity Catalog volume. The parsed output has to arrive as elements carrying type, content, and bounding box so a downstream SQL job can chunk by section.

Which approach produces that output with the least custom code?

Show answer and explanation

CCall ai_parse_document on the binary file column read from the volume path

ai_parse_document parses unstructured documents stored as binary data and returns elements carrying type, content, confidence and a bounding box, so the whole step stays in SQL. ai_extract pulls named fields out of text and returns values, not positioned elements, and it does not read binary scans. An ai_query prompt returns free text with no element type or coordinates. An OCR UDF returns raw text and adds a library and a UDF to maintain.

Source: docs.databricks.com/aws/en/sql/language-manual/functions/ai…

Anonymous, no account needed. Your tally stays in this browser.

Next question Start 5 timed questions Browse all 45 original GenAI Engineer practice questions