Level 1 — RecognitionAI Agents & Tool Use

AI Agents & Tool Use

20 minutes40 marksprintable — key stays hidden on paper

Chapter: 6.2 AI Agents & Tool Use Level: 1 — Recognition (MCQ + Matching + True/False with justification) Time Limit: 20 minutes Total Marks: 40


Section A — Multiple Choice (1 mark each, 10 marks)

Choose the single best answer.

Q1. The ReAct framework interleaves which two components in its reasoning loop?

  • (a) Retrieval and Aggregation
  • (b) Reasoning (thought) and Acting (tool calls)
  • (c) Ranking and Acknowledging
  • (d) Recall and Attention

Q2. In a typical agent reasoning loop, the sequence of steps is best described as:

  • (a) Act → Observe → Think → Stop
  • (b) Think → Act → Observe → (repeat)
  • (c) Observe → Stop → Act → Think
  • (d) Plan → Stop → Plan → Stop

Q3. "Function calling" in LLM agents primarily refers to:

  • (a) The model executing arbitrary OS commands directly
  • (b) The model emitting a structured (e.g., JSON) request specifying a tool and arguments
  • (c) Calling the model recursively on itself
  • (d) A loss function used during training

Q4. Task decomposition in planning agents means:

  • (a) Deleting subtasks that are too hard
  • (b) Breaking a complex goal into smaller, ordered subtasks
  • (c) Compressing the prompt to fewer tokens
  • (d) Randomly sampling actions

Q5. Which is an example of long-term memory for an agent?

  • (a) The current reasoning scratchpad in the context window
  • (b) A vector database storing past interactions for later retrieval
  • (c) The tokens in the immediate prompt
  • (d) The model's temperature setting

Q6. In multi-agent collaboration, a common pattern is:

  • (a) A single monolithic agent with no roles
  • (b) Specialized agents (e.g., planner, coder, critic) communicating via messages
  • (c) Agents that never exchange information
  • (d) Randomly merging model weights at runtime

Q7. LangChain and LlamaIndex are best categorized as:

  • (a) GPU hardware accelerators
  • (b) Frameworks/libraries for building LLM applications and agents
  • (c) Pre-trained foundation models
  • (d) Tokenization algorithms

Q8. A code-generation agent typically improves reliability by:

  • (a) Never running the generated code
  • (b) Executing generated code and using test/error feedback to iterate
  • (c) Increasing temperature to maximum
  • (d) Removing all tool access

Q9. "Guardrails" in agentic systems primarily serve to:

  • (a) Increase raw token throughput
  • (b) Constrain outputs/actions to safe, valid, and policy-compliant forms
  • (c) Replace the LLM entirely
  • (d) Store embeddings

Q10. Constrained generation (e.g., grammar/schema-constrained decoding) ensures:

  • (a) The output conforms to a required structure such as valid JSON
  • (b) Faster training convergence
  • (c) Larger context windows
  • (d) Fewer model parameters

Section B — Matching (2 marks each, 12 marks)

Match each term (B1–B6) to its correct description (i–vi). Write the pair, e.g., "B1 → iii".

Term Description
B1. ReAct (i) Stores and retrieves past information beyond the context window
B2. Tool/Function calling (ii) Splitting a goal into ordered sub-goals before acting
B3. Memory system (iii) Interleaves explicit reasoning traces with actions/observations
B4. Planning / decomposition (iv) Restricts model output to a valid schema or policy
B5. Multi-agent collaboration (v) Model invokes external functions via structured arguments
B6. Guardrails / constrained generation (vi) Multiple specialized agents coordinate to solve a task

Section C — True/False WITH Justification (3 marks each, 18 marks)

State True or False (1 mark) and give a one–two sentence justification (2 marks).

C1. In the ReAct loop, an "observation" is the result returned to the agent after it takes an action.

C2. Function calling means the LLM directly executes the tool code inside its own weights.

C3. A reasoning loop must always run for a fixed, unlimited number of iterations and can never include a stopping condition.

C4. Autonomous agent evaluation can use metrics such as task success rate and number of steps taken.

C5. Guardrails and constrained generation reduce the risk of invalid or unsafe agent outputs.

C6. In multi-agent systems, giving agents distinct roles (e.g., planner vs. critic) can improve overall solution quality compared to a single undifferentiated agent.


Answer keyMark scheme & solutions

Section A — MCQ (1 mark each)

Q1 → (b). ReAct = Reasoning + Acting; it interleaves thoughts and actions. (1)

Q2 → (b). The canonical loop is Think → Act → Observe, repeated until a stop condition. (1)

Q3 → (b). Function calling = model emits a structured request (tool name + args); an external executor runs it. The model itself does not run OS commands. (1)

Q4 → (b). Decomposition breaks a complex goal into smaller ordered subtasks. (1)

Q5 → (b). A vector DB storing past interactions is external long-term memory; the context window is short-term/working memory. (1)

Q6 → (b). Multi-agent = specialized agents communicating via messages. (1)

Q7 → (b). LangChain/LlamaIndex are frameworks for building LLM apps/agents, not models or hardware. (1)

Q8 → (b). Code agents execute code and use test/error feedback to iterate (self-repair loop). (1)

Q9 → (b). Guardrails constrain outputs/actions to safe, valid, policy-compliant forms. (1)

Q10 → (a). Constrained/grammar-guided decoding enforces structural validity, e.g., valid JSON. (1)

Section A total: 10 marks


Section B — Matching (2 marks each; full 2 for correct, 0 otherwise)

  • B1 → iii — ReAct interleaves reasoning traces with actions/observations. (2)
  • B2 → v — Tool/function calling: model invokes external functions via structured arguments. (2)
  • B3 → i — Memory system stores/retrieves info beyond the context window. (2)
  • B4 → ii — Planning/decomposition splits a goal into ordered sub-goals. (2)
  • B5 → vi — Multi-agent collaboration: specialized agents coordinate. (2)
  • B6 → iv — Guardrails/constrained generation restrict output to valid schema/policy. (2)

Section B total: 12 marks Correct mapping set: {B1:iii, B2:v, B3:i, B4:ii, B5:vi, B6:iv}.


Section C — True/False with Justification (1 + 2 marks each)

C1. True. (1) Justification: In ReAct the agent produces a Thought and Action; the environment/tool returns an Observation that the agent then reasons over in the next step. (2)

C2. False. (1) Justification: The LLM only emits a structured call (name + arguments); an external runtime/host actually executes the tool code — the weights do not run it. (2)

C3. False. (1) Justification: Reasoning loops include stopping conditions (goal reached, final answer, or a max-iteration budget) to prevent infinite/runaway loops. (2)

C4. True. (1) Justification: Standard agent-eval metrics include task success rate, steps/tool-calls used, cost, and latency, measuring both correctness and efficiency. (2)

C5. True. (1) Justification: Guardrails/constrained decoding validate/limit outputs and actions, reducing invalid formats and unsafe or policy-violating behavior. (2)

C6. True. (1) Justification: Role specialization (planner, coder, critic) enables division of labor and self-critique, which often improves quality over one undifferentiated agent. (2)

Section C total: 18 marks

Paper total: 40 marks


[
  {"claim":"Section A has 10 one-mark MCQs summing to 10 marks","code":"section_a = 10*1; result = (section_a == 10)"},
  {"claim":"Section B has 6 matching items at 2 marks each = 12","code":"section_b = 6*2; result = (section_b == 12)"},
  {"claim":"Section C has 6 items at 3 marks each = 18","code":"section_c = 6*3; result = (section_c == 18)"},
  {"claim":"Total marks equal 40","code":"total = 10 + 6*2 + 6*3; result = (total == 40)"},
  {"claim":"Question count is between 15 and 20 inclusive (10 + 6 + 6 = 22 items; MCQ+TF+match count check)","code":"q = 10 + 6 + 6; result = (q >= 15)"}
]