Sample questions
Question 1Easy
In LLM applications, what is "tool use" (function calling)?
- The user calls the model by phone
- The model downloads new weights
- The model directly runs code on the user's machine without any application involved
- 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
- The app describes available functions to the model.
- The model replies with a structured call: function name and arguments.
- 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?
- It loops: reasoning, acting with tools and observing results
- It always uses a larger model with a longer context window
- It responds only with yes or no
- 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
- A single LLM call takes input and returns one output.
- An agent loops: it reasons, calls a tool, observes the result and decides the next step.
- 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?
- Hiding the tool list from the developers who maintain it
- Least privilege, with human confirmation for high-impact actions
- Using a higher temperature so the agent's actions become less predictable to attackers
- 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
- Assume the agent may be tricked by injected instructions.
- Least privilege limits which tools and data it can reach.
- 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?
- The user's original question, repeated before every step
- The model's original pre-training data
- The result returned by the tool or environment after an action
- 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
- ReAct alternates Thought, Action and Observation.
- After an Action (a tool call), the environment returns a result.
- 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?
- The LLM cannot produce JSON, so arguments must always be converted by hand first
- Model outputs can be wrong or manipulated, and tools have side effects
- Validation increases the context window
- 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
- The model's arguments might be wrong (hallucinated) or influenced by injected text.
- Tools have real side effects such as payments, deletions or emails.
- 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?
- Fine-tuning the model after every message
- Storing summaries or facts externally and retrieving them when needed
- Increasing the temperature over time
- 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
- The context window is limited, so a long task cannot keep everything.
- Store key facts or summaries outside the model (database, files, vector store).
- 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 →