AI Agents & Tool Use Questions with Answers

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

Sample questions

Question 1Easy

In LLM applications, what is "tool use" (function calling)?

  1. The user calls the model by phone
  2. The model downloads new weights
  3. The model directly runs code on the user's machine without any application involved
  4. The model requests a function call, and the application executes it

Answer: D. The model requests a function call, and the application executes it

Explanation

The application describes available tools; the model chooses one and its arguments; the result is fed back into the conversation.

Step-by-step solution

  1. The app describes available functions to the model.
  2. The model replies with a structured call: function name and arguments.
  3. The app runs the function and returns the result to the model.

Why the other options are wrong

  • A. Unrelated to phoning anyone.
  • B. Tool use does not change the model's weights.
  • C. The model only proposes calls; the application decides and executes.

Tip: Model proposes, application executes.

Question 2Medium

What distinguishes an AI agent from a single LLM call?

  1. It loops: reasoning, acting with tools and observing results
  2. It always uses a larger model with a longer context window
  3. It responds only with yes or no
  4. It never uses tools and answers only from knowledge stored in its weights

Answer: A. It loops: reasoning, acting with tools and observing results

Explanation

Agents plan, act, observe and iterate (e.g. a ReAct-style loop), often across many steps.

Step-by-step solution

  1. A single LLM call takes input and returns one output.
  2. An agent loops: it reasons, calls a tool, observes the result and decides the next step.
  3. It continues until the goal is met or a limit is reached.

Why the other options are wrong

  • B. Agents can use any model size; the loop is what matters.
  • C. Agents are not limited to yes or no.
  • D. Agents are defined by acting with tools.

Tip: Agent = LLM + tools + loop.

Question 3Medium

An agent can send emails and delete files. Which design principle most reduces the damage if it is manipulated by a prompt injection?

  1. Hiding the tool list from the developers who maintain it
  2. Least privilege, with human confirmation for high-impact actions
  3. Using a higher temperature so the agent's actions become less predictable to attackers
  4. Giving it administrator access to everything

Answer: B. Least privilege, with human confirmation for high-impact actions

Explanation

Restrict tools and permissions to what the task needs, and require approval for irreversible actions.

Step-by-step solution

  1. Assume the agent may be tricked by injected instructions.
  2. Least privilege limits which tools and data it can reach.
  3. Human confirmation for high-impact actions (sending, deleting) stops damage before it happens.

Why the other options are wrong

  • A. Hiding tools from developers does nothing against injection.
  • C. Randomness does not stop an attacker and makes behaviour less reliable.
  • D. Administrator access maximises damage.

Tip: Limit what it can do; confirm what it cannot undo.

Question 4Medium

In a ReAct-style agent, what does the "observation" step contain?

  1. The user's original question, repeated before every step
  2. The model's original pre-training data
  3. The result returned by the tool or environment after an action
  4. A random sample of tokens

Answer: C. The result returned by the tool or environment after an action

Explanation

Thought -> Action -> Observation repeats; observations let the model update its plan based on real results.

Step-by-step solution

  1. ReAct alternates Thought, Action and Observation.
  2. After an Action (a tool call), the environment returns a result.
  3. That result is the Observation, which the model uses to plan the next step.

Why the other options are wrong

  • A. The question is given once; the observation is new information from the action.
  • B. Training data is not available at run time.
  • D. Observations are real tool results, not random tokens.

Tip: Thought, Action, Observation: repeat until done.

Question 5Hard

Why should an application validate the arguments an LLM produces for a tool call before executing it?

  1. The LLM cannot produce JSON, so arguments must always be converted by hand first
  2. Model outputs can be wrong or manipulated, and tools have side effects
  3. Validation increases the context window
  4. Tools only accept arguments that were generated by humans

Answer: B. Model outputs can be wrong or manipulated, and tools have side effects

Explanation

Treat model output as untrusted input: check schema, ranges and permissions, just like user input to an API.

Step-by-step solution

  1. The model's arguments might be wrong (hallucinated) or influenced by injected text.
  2. Tools have real side effects such as payments, deletions or emails.
  3. So check schema, ranges and permissions before running, like any untrusted input.

Why the other options are wrong

  • A. LLMs can produce JSON; the issue is trust, not format.
  • C. Validation has no effect on the context window.
  • D. Tools accept arguments from any source; validation is about safety.

Tip: Treat model output as untrusted input.

Question 6Hard

What is a common way to give an agent memory beyond its context window across long tasks?

  1. Fine-tuning the model after every message
  2. Storing summaries or facts externally and retrieving them when needed
  3. Increasing the temperature over time
  4. Repeating the whole history in every prompt forever, without ever trimming it

Answer: B. Storing summaries or facts externally and retrieving them when needed

Explanation

External memory (files, databases, vector stores) plus summarisation keeps important state without exceeding the context limit.

Step-by-step solution

  1. The context window is limited, so a long task cannot keep everything.
  2. Store key facts or summaries outside the model (database, files, vector store).
  3. Retrieve the relevant parts back into context when needed.

Why the other options are wrong

  • A. Fine-tuning after every message is impractical and slow.
  • C. Temperature does not store information.
  • D. Full history eventually overflows the window and wastes tokens.

Tip: Short-term = context; long-term = external store plus retrieval.

Practise all 6 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