Question 1
A LangChain agent supports a logistics company's customer-service desk. A customer asks, "Where is shipment 48213 right now, and has it cleared customs?" That status lives in the carrier's operational system and changes minute to minute, while the company's indexed document corpus contains only shipping policies and service-level agreements. Which mechanism should the agent use to answer this question, and why?
A. Tool-calling — expose the carrier's shipment-status lookup as a tool the model can invoke with the tracking number, because the answer is live state that must be fetched at request time.Correct answer
Correct: tool-calling is the mechanism by which a model requests invocation of an external capability with structured arguments, which is what a live, parameterised status lookup requires (LangChain conceptual guide — Tool calling).
B. Retrieval-augmented generation over the indexed shipping-policy and SLA documents, because retrieval is how an agent obtains any information its base model lacks.
Treats RAG as the universal channel for all unknown information. Retrieval can only surface what is already in the indexed corpus; the corpus holds policies, not the live per-shipment status, so retrieval would return topically related but useless passages.
C. Retrieval-augmented generation, because the retrieval step also performs the lookup against the carrier's operational system on the agent's behalf.
Confuses RAG with tool-calling by assuming retrieval invokes external capabilities. Retrieval fetches documents from an index to ground an answer; it does not call an operational system or take an action against it.
D. Neither mechanism is needed — supplying the tracking number in the prompt lets the model reason out the shipment's current location from its training data.
Assumes a language model can infer live external state. Training data is static and contains no record of this shipment, so the model would fabricate a plausible-sounding location.
Explanation
Tool-calling is the mechanism for having a model request an external capability with structured arguments — querying a system, running a computation, or performing an action — and a per-shipment status that changes minute to minute can only be obtained by invoking the carrier system at request time. Retrieval-augmented generation is for grounding an answer in existing documents, so pointing it at a policy corpus that never contained shipment status returns irrelevant passages, and retrieval does not invoke operational systems the way a tool does. Relying on the model's own knowledge is worse still, because live external state is absent from training data and the model would invent it. (LangChain conceptual guide — Tool calling.)