Skip to content

Graded Quiz: Manual Tool Calling in LangChain :Fundamentals of Building AI Agents (BM RAG and Agentic AI Professional Certificate) Aanswers 2025

Question 1

Role of RunnableParallel in LCEL:

❌ Converts functions automatically
❌ Ensures sequential execution
Runs multiple components concurrently using the same input
❌ Template for prompt engineering

Explanation:
RunnableParallel sends the same input to multiple runnables at once and collects results in parallel.


Question 2

Why manually parse tool parameters?

❌ Bypass LLM suggestions
❌ Automate decision-making
❌ Remove need for agents
Ensure the tool is executed with the correct inputs for accurate results

Explanation:
LLMs may format arguments inconsistently; manual parsing ensures clean, valid inputs.


Question 3

First step in initializing a chat model for tool interactions:

Import “init chat model” from LangChain’s chat models module
❌ Create mapping dictionary
❌ Bind tools immediately
❌ Define a tool first

Explanation:
You must load/import the chat model before binding tools or invoking it.


Question 4

How does an agent class manage tool calling?

❌ Bypasses parameters
❌ Executes tools without user input
❌ Manages chat history only
Encapsulates the entire tool-calling process from query → tool execution → final response

Explanation:
Agents orchestrate the whole loop: understanding query, picking tool, parsing args, running tool, forming answer.


Question 5

Why create a mapping dictionary for tools?

To link tool names to their actual functions for dynamic calls
❌ Execute tools in parallel
❌ Remove need for tool lists
❌ Add tools automatically

Explanation:
Mapping allows the agent to call tools by name when the LLM returns:
{"tool": "search", "args": {...}}.


Question 6

Why is prompt structure important?

❌ Prompts unnecessary
❌ Prompts eliminate tool params
❌ Prompts manage chat history
Prompts define variables & structure for clear communication with the model

Explanation:
Clear prompt templates ensure LLMs interpret tasks and parameters correctly.


Question 7

Primary function of ToolCallingAgent:

❌ Replace HumanMessage
Handle the full tool-calling process automatically
❌ Manage chat history only
❌ Manually execute tools

Explanation:
ToolCallingAgent chooses the tool, parses args, runs it, and constructs the final answer.


🧾 Summary Table

Q No. Correct Answer Key Concept
1 RunnableParallel runs components concurrently LCEL parallelism
2 Ensures correct tool inputs Tool parameter parsing
3 Import/init chat model Model setup
4 Agent handles full tool-calling loop Agent orchestration
5 Map tool names → functions Dynamic tool calling
6 Prompts define structure Prompt design
7 Automates full tool-calling ToolCallingAgent role