Agents & Tool Use Questions with Answers

32 practice questions on Agents & Tool Use (Generative AI & LLMs) with answers and step-by-step solutions. Try 10 samples below, then practise all 32 free in the AptiNest app.

Sample questions

Question 1Easy

Short-term memory for an agent usually means:

  1. The GPU's RAM size
  2. The tool's source code
  3. The current context
  4. Fine-tuned model weights

Answer: C. The current context

Explanation

Long-term memory is typically stored externally (e.g. a database or vector store) and retrieved when needed.

Step-by-step solution

  1. Short-term memory is what the agent can see right now.
  2. That is the current context: recent messages, tool results and notes.
  3. Long-term memory is stored outside and retrieved.

Why the other options are wrong

  • A. GPU memory is hardware, not agent memory.
  • B. Tool source code is not memory.
  • D. Fine-tuned weights are long-lasting, not short-term.

Tip: Short-term = in context; long-term = in a store.

Question 2Easy

When a tool returns an error, a well-designed agent should:

  1. Adjust or report it
  2. Crash the application
  3. Repeat the identical call forever
  4. Ignore it and claim success

Answer: A. Adjust or report it

Explanation

Clear error messages in observations help the model recover.

Step-by-step solution

  1. Read the error message.
  2. Fix the arguments, try another approach, or report the failure honestly.
  3. Never crash or pretend it worked.

Why the other options are wrong

  • B. Crashing loses all progress.
  • C. Identical retries forever waste cost and never succeed.
  • D. Claiming success hides the failure from users.

Tip: On error: adjust, retry with limits, or report.

Question 3Easy

Why set a maximum number of steps for an agent?

  1. To improve embedding quality
  2. To bound loops and cost
  3. Because tools only work once
  4. To make answers longer

Answer: B. To bound loops and cost

Explanation

Agents can get stuck repeating actions; step and budget limits bound the damage.

Step-by-step solution

  1. Agents can get stuck repeating actions or wandering.
  2. Each step costs tokens, time and money.
  3. A step limit bounds loops and cost.

Why the other options are wrong

  • A. Step limits do not affect embeddings.
  • C. Tools can usually be called many times.
  • D. The goal is to bound runs, not lengthen answers.

Tip: Always cap an agent's steps and budget.

Question 4Easy

In LLM tool use, the model typically outputs:

  1. The tool's source code
  2. A screenshot
  3. Executable machine code for the CPU
  4. A structured tool call

Answer: D. A structured tool call

Explanation

The application executes the call and returns the result to the model.

Step-by-step solution

  1. The app tells the model which tools exist and their schemas.
  2. The model replies with a structured tool call: tool name plus arguments (often JSON).
  3. The app executes it.

Why the other options are wrong

  • A. The model does not write the tool's code.
  • B. Tool calls are structured text, not images.
  • C. Models output text tokens, not machine code.

Tip: Model outputs a call; it does not run it.

Question 5Medium

Parallel tool calls are useful when:

  1. Only one tool exists
  2. Each call depends on the previous result
  3. Independent lookups can run at the same time
  4. Tools must run in order

Answer: C. Independent lookups can run at the same time

Explanation

Running independent calls concurrently reduces total latency.

Step-by-step solution

  1. Some lookups do not depend on each other, e.g. weather in two cities.
  2. They can be requested in the same step.
  3. Running them at once cuts total waiting time.

Why the other options are wrong

  • A. With one tool there is nothing to parallelise, though repeat calls could be.
  • B. Dependent calls must wait for earlier results.
  • D. Ordered calls must run sequentially.

Tip: Independent calls: run together. Dependent calls: run in order.

Question 6Medium

Giving an agent read-only database credentials when it only needs to read follows:

  1. Chain-of-thought
  2. Least privilege
  3. Few-shot prompting
  4. Defence by obscurity

Answer: B. Least privilege

Explanation

Minimal permissions limit damage if the agent misbehaves or is manipulated.

Step-by-step solution

  1. The agent only needs to read data.
  2. Read-only credentials mean it cannot change or delete anything.
  3. Giving only the access needed is least privilege.

Why the other options are wrong

  • A. Chain-of-thought is a prompting technique.
  • C. Few-shot prompting is about examples in prompts.
  • D. Obscurity hides things; least privilege removes access.

Tip: Grant the minimum access the task needs.

Question 7Medium

An agent needs today's exchange rate. The best approach is to:

  1. Rely on training data
  2. Call a rates API tool
  3. Ask the user to wait a year
  4. Guess a typical value

Answer: B. Call a rates API tool

Explanation

Live data must come from tools; model knowledge is frozen at training time.

Step-by-step solution

  1. Exchange rates change constantly.
  2. The model's training data is frozen at a past date.
  3. So call a live rates API tool.

Why the other options are wrong

  • A. Training data is out of date for live values.
  • C. Waiting is not an answer.
  • D. Guessing gives wrong figures.

Tip: Live data: call a tool.

Question 8Medium

Logging an agent's full trace (prompts, tool calls, results) is important mainly for:

  1. Debugging and audit
  2. Reducing token use
  3. Training embeddings
  4. Making responses faster

Answer: A. Debugging and audit

Explanation

Traces show where a run went wrong and support accountability.

Step-by-step solution

  1. A trace records each prompt, tool call and result.
  2. When a run fails, you can see the exact step that went wrong.
  3. It also provides an audit record of what the agent did.

Why the other options are wrong

  • B. Logging adds storage; it does not cut tokens.
  • C. Traces are not used to train embeddings.
  • D. Logging does not speed responses.

Tip: No trace, no debugging.

Question 9Hard

Why are evaluation suites for agents harder to build than for single-turn Q&A?

  1. Tools are always deterministic
  2. Many valid paths exist
  3. Agents have no outputs
  4. Agents cannot be run twice

Answer: B. Many valid paths exist

Explanation

Agent evals often score final outcomes and safety constraints in sandboxed environments rather than exact steps.

Step-by-step solution

  1. An agent can reach the same goal by many different sequences of steps.
  2. So there is no single expected trace to compare against.
  3. Evals usually check final outcomes and safety rules instead.

Why the other options are wrong

  • A. Tools are often not deterministic.
  • C. Agents do produce outputs.
  • D. Agents can be rerun, though results may vary.

Tip: Grade the outcome, not the exact path.

Question 10Hard

A tool call might be retried after a timeout. Why should tools like "create order" be idempotent (e.g. using a request ID)?

  1. To make the tool faster
  2. To let the model skip arguments
  3. Because LLMs cannot retry
  4. So a retry can't create duplicates

Answer: D. So a retry can't create duplicates

Explanation

Idempotency keys ensure repeated calls have the same effect as one.

Step-by-step solution

  1. A timeout does not prove the first call failed; the order may already exist.
  2. A retry could create a second order.
  3. A request ID lets the server recognise the repeat and return the original result.

Why the other options are wrong

  • A. Idempotency is about correctness, not speed.
  • B. The model must still supply arguments.
  • C. Agents and apps retry calls routinely.

Tip: Side-effect tool + retries = use an idempotency key.

Practise all 32 questions free

The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.

Open this topic in the app →

Related topics

See all Generative AI & LLMs topics · All topics