THE MINIMALIST FUNCTION CALLING
Function Calling Explained in 100 Words
Ravindra Dastikop
Understand less. Accomplish more.
Why This Book?
Function calling can sound complicated.
Tools.
Functions.
Schemas.
Arguments.
Selection.
Execution.
Results.
Validation.
Actions.
Judgment.
But using function calling does not have to begin with complexity.
This book strips function calling down to what matters.
10 ideas.
10 words each.
100 words.
Enough to begin.
How to Read This Book
Read one idea.
Stop.
Think about it.
Try it with AI.
Then move to the next.
The purpose is not to know everything about function calling.
The purpose is to understand enough to accomplish something with function calling.
01 — FUNCTION CALLING
Function calling lets AI models request functions using structured arguments.
Normally, a model generates a response.
Function calling gives it another possibility.
Instead of merely describing what should happen, the model can request a function made available by an application.
Imagine asking:
“What is the status of order 4821?”
The model itself may not know.
But an application could provide a function such as:
get_order_status
The model can recognize that the function is useful and request it with the appropriate order number.
The important distinction is:
The model requests the function.
The application executes it.
02 — TOOLS
Tools extend models beyond generation by connecting with external capabilities.
Language generation is powerful.
But many useful tasks require capabilities outside the model.
For example:
Retrieve customer information.
Check inventory.
Create a support ticket.
Calculate shipping.
Search company systems.
Update an application.
Function calling allows application-defined functions to become tools available to the model.
This changes the model from something that can only say what should happen into part of a system that can help determine which capability should be used.
03 — FUNCTIONS
Functions define operations applications make available for models to request.
A function represents something the application knows how to do.
For example:
get_weather
find_customer
check_inventory
create_ticket
calculate_price
Each function should have a clear purpose.
The model needs enough information to understand what the function does and when it is appropriate.
The application decides which functions are available.
The model can determine when an available function may help accomplish the task.
04 — SCHEMAS
Schemas describe function arguments so models can generate structured inputs.
A function needs more than a name.
It needs to describe the information it expects.
Suppose we have:
get_weather
The function might require:
Location.
Unit.
Date.
A schema defines the expected structure of those arguments.
For example:
location → string
unit → Celsius or Fahrenheit
This gives the model a structured contract for constructing the function request.
Clear schemas can make function calls more predictable and easier for applications to process.
05 — ARGUMENTS
Arguments contain structured values the model supplies when requesting functions.
Once the model chooses a function, it needs to provide the required information.
Consider:
get_weather(location)
If the user asks:
“What is the weather in Bengaluru?”
The model might request the function with:
location = Bengaluru
That value is an argument.
Arguments translate information from the conversation into structured input that application code can use.
This is an important transition.
Natural language becomes machine-processable parameters.
06 — SELECTION
Selection determines whether models choose available functions automatically or explicitly.
Giving the model functions does not mean every function must always be used.
Sometimes the model can decide whether a tool is necessary.
Sometimes the application may constrain or specify which function can be called.
Consider:
“Hello.”
No external function may be needed.
But:
“Check whether product X is in stock.”
may require an inventory function.
Function selection therefore connects the user's intention with the capability most appropriate for accomplishing it.
07 — EXECUTION
Execution happens in application code after models request function calls.
This distinction is essential.
The model does not automatically execute your application function merely because it generated a function call.
The model produces a request.
Your application receives it.
Your code examines the request.
Then the application executes the corresponding operation.
For example:
Model requests → get_inventory(product_id)
Your application might then query:
A database.
An API.
An enterprise system.
Another service.
The application remains responsible for actually performing the operation.
08 — RESULTS
Results return outputs to models for continued reasoning and responses.
Execution produces something.
Suppose the application checks inventory and receives:
17 units available.
That result can be returned to the model.
The model now has information it did not previously possess.
It can continue the interaction and answer:
“There are currently 17 units available.”
This creates a loop.
The model identifies a need.
It requests a function.
The application executes it.
The result returns.
The model continues.
09 — VALIDATION
Validation checks model generated arguments before applications perform requested operations.
Function calls are generated by AI.
They should not automatically be treated as trustworthy instructions.
Arguments may be:
Missing.
Incorrect.
Unexpected.
Unauthorized.
Unsafe.
Inconsistent with application rules.
The application should therefore validate inputs before performing operations.
This becomes particularly important when functions can:
Change records.
Send messages.
Spend money.
Delete information.
Access sensitive systems.
Create other real-world consequences.
Function calling connects AI with action.
Validation helps create a boundary before action occurs.
10 — JUDGMENT
Judgment determines which functions, permissions, and actions remain appropriate overall.
Function calling can make AI systems substantially more capable.
But greater capability also creates greater responsibility.
Developers and organizations must decide:
Which functions should exist?
Which functions should the model access?
What permissions should they receive?
Which actions need approval?
What information can functions expose?
Which operations require human confirmation?
The goal is not to give AI every possible capability.
The goal is to provide the right capability with the right boundaries.
The Entire Book in 100 Words
FUNCTION CALLING
Function calling lets AI models request functions using structured arguments.
TOOLS
Tools extend models beyond generation by connecting with external capabilities.
FUNCTIONS
Functions define operations applications make available for models to request.
SCHEMAS
Schemas describe function arguments so models can generate structured inputs.
ARGUMENTS
Arguments contain structured values the model supplies when requesting functions.
SELECTION
Selection determines whether models choose available functions automatically or explicitly.
EXECUTION
Execution happens in application code after models request function calls.
RESULTS
Results return outputs to models for continued reasoning and responses.
VALIDATION
Validation checks model generated arguments before applications perform requested operations.
JUDGMENT
Judgment determines which functions, permissions, and actions remain appropriate overall.
The Minimalist Function Calling
You do not need to understand every function-calling implementation before you begin.
Remember ten things:
Function Calling.
Tools.
Functions.
Schemas.
Arguments.
Selection.
Execution.
Results.
Validation.
Judgment.
Everything else can come later.
Define the capability.
Describe the function.
Create the schema.
Supply the tool.
Let the model select appropriately.
Receive structured arguments.
Validate them.
Execute the function.
Return the result.
Apply human judgment.
Then accomplish something.
One Final Question
The next time you build an AI application, don't begin with:
“What should the model say?”
Begin with:
“What should the model be able to ask my application to do?”
Then give it the right tools.

Function Calling in 10 ideas. 100 words.
ReplyDeleteWhat should AI be able to ask your application to do?
📘 The Minimalist Function Calling
https://dastikop.blogspot.com
AIYING — Accomplishing with AI