Get Your CertDatabricks Certified Generative AI Engineer AssociatePlayCompete
‹ All Databricks Certified Generative AI Engineer Associate questions

Databricks Generative AI Engineer Associate Practice Question 7: AI Query Batch Inference

Databricks Certified Generative AI Engineer Associate · Test 1 · question 7 of 10

Assembling and Deploying Applicationsmedium

Each night, about 5 million new support tickets land in a Unity Catalog Delta table. A SQL-focused analytics team needs every ticket labeled with a category and a sentiment using an LLM, with the results written back to a table for dashboards. No one needs results in real time. The team wants the least custom code and does not want to manage parallelism or retries itself.

What should they use?

Select one answer
Show answer and explanation

Answer:

  • A. A scheduled SQL job that calls ai_query() with a Databricks-hosted model over the table

This is a batch inference workload: a large table, no latency requirement, and results written back to a table. ai_query() is the general-purpose AI Function for querying a supported model directly from SQL or Python. Databricks recommends submitting the whole dataset in one query, because AI Functions handle parallelization, retries, and scaling automatically. That suits a SQL team that wants minimal code.

Option B works, but it is exactly the custom code the team wants to avoid. They would have to build batching, concurrency, rate-limit handling, and retries themselves.

Option C is wrong. An agent endpoint is built for interactive real-time requests. Calling it per ticket from a dashboard is slow, costly, and never writes a labeled table.

Option D is wrong. Similarity search finds tickets that resemble a query. It does not produce a category or sentiment label for each ticket, and it is not an LLM inference step.

Reference: ai_query function

Practice Test 1 ›

Study guides for Databricks Certified Generative AI Engineer Associate