Courseiva
Application Development →hardMultiple Choice

Databricks-GenAI-Assoc Application Development Practice Question

An engineer built an agent using Mosaic AI Agent Framework and wants the agent to call a Unity Catalog function that returns customer order history. The function must be invoked by the LLM at runtime without exposing raw SQL to the model. Which approach should the engineer use?

⚠ Common exam trap

The trap here is believing the LLM must see or generate SQL to query Unity Catalog data, when the agent framework exposes functions as typed tools instead.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Register the Unity Catalog function as a tool in the agent and let the LLM select it by name and arguments.

Registering the Unity Catalog function as a tool gives the agent a typed, governed interface the LLM can invoke by name with structured arguments. The function's metadata supplies the schema, so no SQL is exposed to or generated by the model. Prompt-embedded SQL, scheduled jobs, and text-to-SQL all fail the requirement of runtime, governed invocation without model-authored queries.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Expose the function through a SQL warehouse and have the agent send natural-language queries to the warehouse endpoint.

    Why it's wrong here

    Sending natural language to a SQL warehouse requires text-to-SQL translation, which reintroduces the exact risk of model-authored queries the scenario wants to avoid. It also bypasses the typed tool contract. Unity Catalog functions are meant to be invoked as tools with structured arguments, not through free-form query generation.

  • ✗

    Embed the SQL body of the function in the system prompt so the LLM can generate the query when needed.

    Why it's wrong here

    Embedding SQL in the system prompt exposes the underlying query and invites the model to fabricate or modify it, which breaks governance and increases injection risk. It also bloats the context window. The agent framework is designed to call functions through a typed tool interface, not to have the model author SQL at runtime.

  • ✓

    Register the Unity Catalog function as a tool in the agent and let the LLM select it by name and arguments.

    Why this is correct

    Mosaic AI Agent Framework supports Unity Catalog functions as tools that the LLM can invoke by name with structured arguments. The function's signature and docstring become the tool schema, so the model never sees or writes SQL directly. This is the supported pattern for giving agents governed access to governed data while keeping the interface declarative.

  • ✗

    Create a Databricks job that runs the function on a schedule and writes results to a Delta table the agent reads.

    Why it's wrong here

    A scheduled job produces batch results, not on-demand invocation driven by the conversation. The scenario requires the LLM to call the function at runtime based on user intent. Precomputing results also risks stale data and does not provide the parameterized, per-request behavior the agent needs.

About these practice questions

One of 330 original Databricks-GenAI-Assoc practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Databricks exam blueprint

This Databricks-GenAI-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-GenAI-Assoc exam.