Home / GenAI Engineer practice test / Design Applications / Question

Databricks Generative AI Engineer Associate · free practice question

A machine learning engineer is tasked with implementing a ReAct (Reason + Act) agent to fulfill the user request: 'Determine NVDA's current stock closing value…

Exam-style question on Design Applications from the free GenAI Engineer practice test, with the answer and a full explanation below.

Updated November 11, 2026

Design Applications

A machine learning engineer is tasked with implementing a ReAct (Reason + Act) agent to fulfill the user request: 'Determine NVDA's current stock closing value and how much it differs, percentage-wise, from its highest point over the past 52 weeks.' The agent has access to the following three utilities: obtain_current_price(symbol: str) -> float, retrieve_max_52_week_value(symbol: str) -> float, and compute_percentage_difference(actual_value: float, benchmark_value: float) -> float. Identify the proper execution order for these functions and explain the justification for that sequence.

  1. Acompute_percentage_difference, then obtain_current_price, then retrieve_max_52_week_value: the calculation runs first to declare the inputs it needs, which the later calls fill in.
  2. Bretrieve_max_52_week_value as the single data call: its response also carries the current price as a sub-field, which makes obtain_current_price redundant.
  3. Cobtain_current_price, then retrieve_max_52_week_value, then compute_percentage_difference: the calculation needs both fetched values as concrete float arguments.
  4. DAll three tools in one parallel batch: a ReAct agent issues its tool calls together within a single reasoning step, which keeps overall latency to a minimum.
  5. Eobtain_current_price, then compute_percentage_difference, then retrieve_max_52_week_value: the price is used right away, before the next tool result displaces it from memory.
Answer & explanation

Correct answer: C

WHY C is correct: The calculation depends on two floats, the current price and the 52-week high, so both must be fetched before it can run. The two fetches are independent of each other, and the ReAct loop of reason, act, observe retrieves each value and then calls compute_percentage_difference with both known.

WHY NOT A: compute_percentage_difference takes two concrete float arguments and cannot be called with placeholders. Tools in a ReAct loop execute with real values; calling the calculation first would fail or return a meaningless result.

WHY NOT B: Nothing in the tool signatures says the 52-week high call returns the current price; it returns a single float. Assuming an undocumented sub-field would leave the agent without the current price.

WHY NOT D: The two fetches could run in parallel, but the calculation cannot join the same batch because it depends on their outputs. Calling all three at once would fire the calculation with unresolved inputs.

WHY NOT E: Tool results stay in the agent's context for the whole turn, so a later call does not displace an earlier value. This order also calls the calculation with only one of its two required inputs.

Take the full GenAI Engineer practice test free →

Would you pass today?

This question is one of 45 in the free, timed Databricks Generative AI Engineer Associate practice test. Take it and get a section-by-section score.

Start the free test →