NEW
Font size
WorksheetsFunction Calling in LLMs Quiz
Total questions: 10
Worksheet time: 8mins
What is the primary limitation that function calling solves for LLMs?
LLMs can't generate creative text
LLMs can't perform precise calculations or access real-time data
LLMs can't understand natural language
LLMs can't work with multiple languages
In the Google GenAI Python SDK, automatic function calling is:
Disabled by default and must be explicitly enabled
Only available for paid accounts
Enabled by default when using client.chats.create()
Not supported in the Python SDK
What is required for a Python function to work with automatic function calling?
The function name must start with 'tool_'
Type hints and a clear docstring
The function must return JSON
The function must be async
When a function encounters an error, what's the best practice for handling it?
Raise an exception to stop execution
Return None and let the SDK handle it
Return an error message as a string
Log the error and return an empty response
What makes something an 'agent' rather than just an LLM with function calling?
It costs more to run
It autonomously decides which tools to use to accomplish goals
It requires a special SDK version
It can only use one function at a time
In the SimpleAgent class, what three components define an agent?
Model, temperature, and max_tokens
Tools, system_instruction, and ChatSession
Functions, database, and API keys
Prompt, response, and history
Why should you include a system_instruction when using automatic function calling?
It's required by the SDK or the code will crash
It makes function calls execute faster
It tries to ensure the model generates a final text response after using tools
It's only needed for paid API plans
What does an orchestrator agent do?
Executes all functions in parallel
Routes requests to specialized agents based on the task
Prevents the LLM from calling functions
Stores conversation history in a database
In a multi-turn conversation, how does the agent remember previous interactions?
You must manually save and reload conversation history
The ChatSession automatically maintains conversation history
Each message is completely independent
History is only stored if you enable a special flag
When combining Week 4 (document processing) and Week 5 (function calling), what can you build?
An agent that only reads documents
An agent that extracts data from documents and takes actions based on that data
A chatbot that can't access external data
A system that requires manual function execution
