Skip to content

Tool calling

Adrià Castany 2 min

What is tool calling?

Tool calling is the mechanism by which a language model can run functions you define instead of only writing. You describe the available tools, the model decides which one to use and with what arguments, and it receives the result to fold into its answer.

Also called

function calling, tool use

Topic
AI in support
On this page
  1. Tool calling, integration and automation
  2. Why it matters
  3. How it works
  4. The model does not run anything
  5. Which tools to expose
  6. Examples in customer service
  7. How Intake handles it
  8. Frequently asked questions

Tool calling, integration and automation

An integration connects two systems.

An automation always runs the same steps when a condition is met. In tool calling it is the model that decides, in each conversation, whether a function is needed and with what data. That is why it needs limits the other two do not.

Why it matters

It is what turns a text generator into something that resolves.

Without tools, the most a system can do is explain how to raise a limit; with them, it raises it and confirms the result in the same conversation. It is the piece that separates a chatbot from an agent.

How it works

The model gets a description of each tool.

What it does, what parameters it needs and what it returns. Faced with a question, it either answers directly or asks for a tool to be run. Your system runs it, returns the result, and the model writes with it.

The model does not run anything

An important nuance for understanding the risk.

The model only asks for a function to be called. Your system is what runs it, and it can check permissions, validate arguments and refuse. That is where the limits live, not in the model.

Which tools to expose

The useful rule is the same as with any permission.

Only what is needed, and reads separate from writes. Checking a plan is a read; canceling a subscription is a write, and probably should not be available without a person confirming.

Examples in customer service

Read-only ones come first.

The ones that change something are added later and, when they cannot be undone, with a person confirming.

  • Checking the status of an order or an invoice.
  • Looking up the plan and usage of an account.
  • Resending a verification email.
  • Changing a contact detail.
  • Opening an issue for product with the case already described.

How Intake handles it

Frequently asked questions

What is tool calling?

The mechanism by which a language model can ask for functions you define to be run. Looking up a value, making a change, calling your API. It is what lets a support system resolve instead of explain.

Can a model run anything on my systems?

Only what you enable. The model asks for a function to be called; your system runs it, checks permissions and can refuse. The limits go there.

Which actions should be automated first?

The read-only ones that come up most, such as checking an order, an invoice or a plan. They resolve a good share of conversations and break nothing if the model gets it wrong.

Glossary

Keep reading

Glossary

Related terms

See the full glossary

Add it without dropping what you use

15 minutes, no commitment