Designing Safely When AI Calls External Tools
This article covers how Function Calling, where the AI decides on its own to call external features, works, and how to safely narrow down what it is allowed to call.

Ren

Procura
Cautions that come with being able to do more
This mechanism gives the AI the ability to think and act. While that's convenient, it also creates the risk that features you didn't intend get called, because of the AI's misjudgment or because it was fooled by malicious input. The more features you hand over, the wider this impact becomes.

Ren

Wilson
Drawing the lines for safe design
- Narrow the features you give the AI to only what is needed (don't hand over lots of features at once)
- Don't let it call heavy operations, such as deleting or changing data or sending money, easily
- Always put a human confirmation before important operations
- Record every feature called and its result

Ren

Procura
The importance of testing
Before you release, I recommend trying nasty inputs to see whether any unexpected calls happen. Don't be reassured by trying only normal usage; deliberately mix in unnatural instructions and check how the AI reacts.

Ren

Procura
Make it possible to narrow permissions later
Don't forget to create opportunities to review, later on, the range of features you first handed over. As you add features during development, you may find that you've left the AI with broader permissions than you originally intended. Regularly take stock by asking "Do we really need all the features we're giving it now?", and narrow down features that aren't used or that have stronger permissions than expected.
- Regularly take stock of the list of features you've handed over
- Remove unused features from what you hand over
- Each time you add a feature, review how strong a permission it needs

Procura

Ren
This article is translated from the Japanese original. If the two differ, the Japanese version is the one we keep up to date.