Databricks-GenAI-Assoc Application Development Practice Question
A GenAI engineer is building a multi-step agent that uses Databricks Foundation Model APIs. The agent must decide when to call a weather tool and when to answer directly. The engineer wants to ensure the agent's decision-making is reliable and that failures in tool calls are handled gracefully. Which design approach should the engineer use?
⚠ Common exam trap
The trap here is assuming that a single LLM call can both decide to use a tool and produce a final answer incorporating the tool's output, which is not possible without a loop.
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
✓
Implement a ReAct-style loop where the LLM outputs a thought, action, and action input, and the agent executes the tool and feeds back the observation.
A ReAct-style loop enables the agent to reason about whether a tool is needed, execute it, and observe the result before deciding the next step. This iterative process supports graceful error handling because exceptions can be captured and returned as observations, allowing the LLM to adjust. Single-pass or fixed-chain approaches lack this adaptability and feedback.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Chain multiple LLM calls where the first call always invokes the weather tool and the second call formats the answer.
Why it's wrong here
Always invoking the weather tool is inefficient and fails when the query does not need weather data. It also does not allow the agent to decide when to call the tool, and error handling is not inherently graceful without a feedback loop.
- ✓
Implement a ReAct-style loop where the LLM outputs a thought, action, and action input, and the agent executes the tool and feeds back the observation.
Why this is correct
A ReAct-style loop structures the agent's reasoning and tool use, allowing it to decide when to call the weather tool and incorporate the result. It also provides a clear place to handle tool errors by catching exceptions and feeding error messages back to the LLM for recovery.
- ✗
Fine-tune the LLM on examples of weather queries and answers, then deploy it without tools.
Why it's wrong here
Fine-tuning cannot provide real-time weather data, as the model's knowledge is static. Without a tool, the agent cannot fetch current conditions, and fine-tuning does not address graceful handling of tool call failures because no tool is invoked.
- ✗
Use a single prompt that instructs the LLM to output a JSON with either an answer or a tool call, and parse it once.
Why it's wrong here
A single-pass approach does not allow the agent to incorporate tool results into its final answer, because the tool call and answer are generated in one step. It also lacks a mechanism to handle tool failures gracefully, as there is no feedback loop.
About these practice questions
Courseiva writes every Databricks-GenAI-Assoc question from scratch — 330 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
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.