What Is Tool Calling and Why Do LLMs Need It?

Large Language Models are good at understanding and generating language, but they cannot automatically access current information or interact with external systems.

For example, when a user asks for the current price of a product, the model should not guess. It needs a reliable way to retrieve that information from another system. This is where Tool Calling, also known as Function Calling, becomes useful.

What the Article Covers

For example, an application might provide a function like this:

def get_product_price(product_id):
    ...

If the user asks for the current price of product 12345, the LLM can request:

get_product_price(product_id="12345")

The application executes the function and sends the result back to the LLM, which then uses that information to answer the user.

A useful way to understand this relationship is:

LLM = Brain

Tools = Hands

The model reasons about what needs to happen, while tools allow the application to retrieve data or interact with other systems.

Read the full article and join the discussion →