PRODUCTION SCENARIO
A Generative AI Engineer must classify 4 million product reviews in a Delta table into sentiment labels every night and write the results back to a Unity Catalog table.
Which approach does Databricks recommend for this workload?
Answering here is anonymous. Nothing is saved unless you sign in.
Show answer and explanation
Answer: Run ai_query over the whole table in one SQL statement
For batch inference Databricks advises submitting the full dataset in a single ai_query statement against a Databricks-hosted foundation model, because AI Functions handle parallelization, retries, and scaling automatically. Manual batching and row-by-row real-time calls give up that built-in scaling.