Meta Toolformer Sidesteps AI Language Limits with API Calls

With language models like ChatGPT dominating recent tech news, Meta Platforms has unveiled a new artificial intelligence platform of its own called Toolformer that breaks new ground in that it can teach itself to use external apps and APIs. The result, Meta says, is that Toolformer combines the conversational aptitude and other things large language models are good at while shoring up those areas in which it typically does not excel — like math and fact-checking — by figuring out how to use external tools like  search engines, calculators and calendars.

Toolformer is “a model trained to decide which APIs to call, when to call them, what arguments to pass, and how to best incorporate the results into future token prediction,” Meta researchers write in a scholarly paper, adding that “this is done in a self-supervised way, requiring nothing more than a handful of demonstrations for each API.”

That ability to use application programming interfaces, or APIs, is key to Toolformer’s functionality. APIs “allow different applications to communicate with one another, often in a seamless and automated manner,” writes Ars Technica, explaining that Toolformer was trained using “a small set of human-written examples demonstrating how each API is used and then allowed it to annotate a large language modeling dataset with potential API calls.”

The result is that Toolformer “learned to predict each text-based API call as if they were any other form of text,” Ars Technica says. When in use, Toolformer can determine the appropriate API tool in a given context, inserting the calls as needed to assist with the line of inquiry.

Since large language models (LLM) are known as being subpar at arithmetic tasks, Toolformer can accommodate that limitation by finding and using a calculator app. Or if someone asks an AI assistant powered by an LLM to add an activity to a schedule, Toolformer could call an API enabling a calendar app.

Toolformer was compiled using a 6.7 billion parameter pre-trained GPT-J model. “Experiments conducted by the researchers on various tool-using tasks seem to demonstrate that Toolformer achieves far stronger performance than the much larger GPT-3 model, which contains 175 billion parameters,” Ars Technica reports.

Other companies have attempted to circumvent LLM limitations. Among them, Microsoft, which recently announced its Bing search engine will leverage ChatGPT, and enabled Bing Chat to conduct auxiliary web searches.

Meta researchers say Toolformer is different in that most other efforts rely heavily on human annotations or encompass a limited number of task-specific tools. Toolformer, on the other hand, learns to use tools in a way that does not require specific training, but is general and can be scaled.

“With techniques like those found in Toolformer, we’re looking at a potential future where LLMs augmented with the ability to use external apps will become far more versatile and reliable assistants (ostensibly),” Ars Technica says, cautioning that “the ability to perform API calls also might increase an LLM’s capability to cause harm to user data (in apps) or create trouble in the outside world (through a web browser or communications tools).”

No Comments Yet

You can be the first to comment!

Leave a comment

You must be logged in to post a comment.