AI Advanced · 25% of the exam

Agent Frameworks & ADK: free practice questions

5 sample questions from our 196-question bank for this domain — answers and explanations included. These are the same scenario-based style as the real DataCertPrep exam.

1. An engineering team is evaluating a multi-agent ADK trip-planning system. Their trajectory evaluation harness records the full sequence of agent actions and tool calls for each test case. They observe the following pattern: the system achieves a 92% task success rate (correct final itinerary produced), but trajectory analysis reveals that on 40% of successful runs the orchestrator calls the `flight_search` tool three or more times when one call should suffice. Which evaluation dimension does this finding PRIMARILY expose, and what is the MOST appropriate metric to add?

  • A. It exposes a retrieval accuracy problem; the team should add a `tool_output_relevance` score to measure whether tool results match the query intent.
  • B. It exposes an agent efficiency / step-optimality problem; the team should add a `redundant_tool_call_rate` or `average_tool_calls_per_task` metric to quantify unnecessary actions.✓ Correct
  • C. It exposes a task decomposition failure; the team should replace task success rate with a BLEU-score comparison of generated itineraries against reference itineraries.
  • D. It exposes a memory leak in ADK's in-session state; the team should add a `session_state_size` metric to monitor how much data is stored per turn.
  • E. It exposes a latency regression; the team should instrument end-to-end wall-clock time and set an SLA threshold to catch regressions before deployment.
Explanation

The pattern described — correct output but excess tool invocations — is a classic agent efficiency or step-optimality issue that task success rate alone cannot capture. Adding a `redundant_tool_call_rate` or tracking `average_tool_calls_per_task` via trajectory evaluation directly measures this inefficiency and can surface cost and latency implications. Option A is wrong: the issue is not about tool output relevance (the tool presumably returns correct results); it is about calling the tool too many times. Option C is wrong: BLEU score measures text similarity of outputs, not the efficiency of the action sequence; also replacing task success rate would remove a valuable metric. Option D is wrong: repeated tool calls may bloat session state slightly but the root problem is agent reasoning, not a memory management bug. Option E is wrong: latency is a downstream symptom, not the primary dimension being exposed; adding only a wall-clock SLA does not explain or quantify the root cause of redundant calls.

2. A LangGraph application processes legal contracts. The graph state contains a `annotations` key typed as `List[str]`. Multiple nodes add annotations independently. A developer defines a state reducer `operator.add` for the `annotations` key. What does this reducer accomplish?

  • A. It ensures that only the most recent annotation is kept, discarding earlier entries.
  • B. It causes each node's returned `annotations` list to be concatenated (appended) to the existing list rather than replacing it.✓ Correct
  • C. It automatically deduplicates annotation strings before storing them in state.
  • D. It locks the `annotations` key so only one node can write to it at a time, preventing race conditions.
Explanation

A LangGraph state reducer function defines how new values returned by nodes are merged into the existing state for that key. `operator.add` on a list performs list concatenation — so each node's output list is appended to the accumulated list, enabling multiple nodes to contribute annotations without overwriting each other. (A) describes the default behavior (no reducer, just replacement) — which is the opposite of what `operator.add` does. (C) is incorrect; `operator.add` does not deduplicate; it simply concatenates. (D) is incorrect; reducers are purely about value merging semantics, not about concurrency locking.

3. A financial-services team is using Google ADK to build an advisory assistant. Regulations require that certain user data used during a session must not persist beyond the session boundary—it should only be available within a single conversation turn sequence. Which ADK memory scope is appropriate for this data?

  • A. Persistent memory backed by a database-backed SessionService, because it guarantees data durability
  • B. In-session memory stored in the session's `state` dictionary, because it exists only for the lifetime of that session and is discarded when the session ends✓ Correct
  • C. Agent-level memory set on the LlmAgent's `instruction` field, because instructions are reset after each run
  • D. A shared global variable in the Python process, because it is automatically garbage-collected after the request completes
Explanation

ADK's in-session state (the `state` dict on the Session object) is scoped to a single session and is not written to durable storage unless a persistent SessionService is configured. When the session ends, this data is gone—which satisfies the regulatory requirement. A database-backed SessionService explicitly persists data across sessions, which violates the requirement. The agent `instruction` field is static configuration, not user-data storage. Relying on global Python variables is not an ADK pattern and is unsafe in multi-threaded/multi-process deployments.

4. An AI architect is evaluating a deployed CrewAI-based research system. The system runs a hierarchical crew nightly to produce market intelligence reports. The team observes that cost-per-task has tripled over two months even though task success rate remains stable. Which THREE investigation areas are MOST relevant to diagnosing the cost increase? (Select THREE)

  • A. Whether the manager agent's planning loop is generating significantly more intermediate reasoning steps or re-delegations over time due to increasingly complex task inputs✓ Correct
  • B. Whether agents are using a more expensive model tier (e.g., GPT-4o vs. GPT-3.5) than originally configured, possibly due to a dependency update changing the default✓ Correct
  • C. Whether the number of CrewAI tasks defined in the crew has decreased, causing each remaining task to consume more tokens
  • D. Whether tool outputs (e.g., search results, scraped web pages) have grown larger over time, inflating the context sent to the LLM on each tool call✓ Correct
  • E. Whether the task success rate metric itself has become easier to satisfy, masking underlying quality degradation
  • F. Whether CrewAI's hierarchical process is invoking the manager LLM more frequently per run due to increased crew size or added validation steps
Explanation

Option A is correct: in hierarchical mode, the manager LLM drives task delegation, and more complex inputs can cause more re-planning cycles, each consuming tokens. Option B is correct: a dependency update silently changing the default model to a more expensive tier is a common real-world cause of cost spikes without quality changes. Option D is correct: larger tool outputs (e.g., longer search results) increase the context window consumed per LLM call, directly driving up cost. Option C is incorrect: fewer tasks would generally reduce cost, not increase it. Option E is about the evaluation metric itself, which is not a direct cause of cost increase. Option F is plausible but is essentially a subset of A (more manager LLM invocations); the question asks for the most relevant areas, and A captures this more precisely — though F is a reasonable secondary consideration, it is less direct than A, B, and D as the top three.

5. A developer is building a Google ADK pipeline that must call an external pricing API, then pass the result to an LLM for analysis, and finally write a summary to a database — strictly in that order, with no branching. Which ADK agent type is the MOST appropriate choice for the top-level orchestrator?

  • A. `LlmAgent`, because it can dynamically decide the order in which to call the pricing API, LLM analysis, and database write tools.
  • B. `ParallelAgent`, because all three steps can be executed concurrently to minimize latency.
  • C. `SequentialAgent`, because it executes a fixed, ordered list of sub-agents or steps without requiring LLM-driven routing decisions.✓ Correct
  • D. `LoopAgent`, because the pipeline may need to retry failed API calls until a success condition is met.
Explanation

A SequentialAgent is designed precisely for workflows where a fixed, ordered sequence of sub-agents must execute one after another, passing outputs downstream — no LLM is needed to decide the order. Option A (LlmAgent) is inappropriate as the top-level orchestrator when order is deterministic; an LlmAgent uses LLM inference to decide routing, adding unnecessary cost and non-determinism. Option B (ParallelAgent) runs sub-agents concurrently, which violates the strict sequential dependency (the LLM analysis step depends on the API result). Option D (LoopAgent) is for iterative retry or polling patterns, not a one-pass linear pipeline.

191 more questions in this domain

Practice the full bank with instant grading, flashcards, and a timed mock exam.

Start practicing free