Language Model Function Calling via External Tool Mediation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing language models are limited by high training costs, outdated training data, and inability to perform complex function calls with external tools without additional training or user intervention.
Innovation Solution
Language models are enhanced to determine necessary function calls and execute them with external tools or applications based on user input, without requiring additional training data or user involvement, by accessing and utilizing available documentation or online information to understand available functions and generate appropriate function calls.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If language models are trained on specialized datasets to improve domain-specific performance, then accuracy for specific tasks improves, but training cost and complexity increase significantly
Solution Approach 1:
The system segments the language model into a base model and a specialized tool-calling model. The base model handles general language tasks, while the specialized model handles tool-calling functions. This segmentation allows the specialized model to be trained on smaller, domain-specific datasets without retraining the entire large base model, thereby reducing training complexity and cost while maintaining task-specific accuracy.
Solution Approach 2:
The system introduces a tool-calling model as an intermediary between the base language model and external tools/APIs. This intermediary layer translates natural language queries into function calls without requiring retraining the base model. The intermediary handles the specialized task of tool invocation, allowing the base model to remain unchanged while still achieving domain-specific accuracy through the intermediary's specialized training.
2Quantity of substance
If language models are trained on comprehensive datasets to improve general knowledge, then knowledge base expands, but training data becomes outdated and requires continuous updates
Solution Approach 1:
The system performs preliminary action by training the tool-calling model on current and relevant datasets before deployment. This pre-trained specialized model incorporates up-to-date information and function knowledge, allowing the system to access current data without requiring continuous retraining of the base model. The preliminary training ensures the model starts with fresh knowledge while maintaining the ability to adapt to future updates.
Solution Approach 2:
The system implements dynamics by allowing the tool-calling model to be updated independently of the base model. When new tools, APIs, or functions are introduced, only the tool-calling model needs to be retrained or fine-tuned, while the base model remains unchanged. This dynamic update capability maintains data freshness without the complexity of continuously retraining the entire language model.
3Extent of automation
If language models are enhanced to call external functions autonomously, then functionality and automation improve, but the model complexity and processing requirements increase
Solution Approach 1:
The system segments the autonomous function-calling capability into a separate tool-calling model that works in conjunction with the base language model. This segmentation allows the autonomous function-calling logic to be isolated in the specialized model, which can be trained specifically on function-calling tasks. The base model remains simpler and handles only general language understanding, while the complexity of autonomous tool invocation is contained in the specialized model.
Solution Approach 2:
The tool-calling model serves as an intermediary layer that handles all autonomous function-calling operations. It receives natural language inputs from the base model, determines which tools or APIs need to be called, generates appropriate function calls, and manages the execution. This intermediary approach allows the base model to remain relatively simple while still achieving high automation through the specialized intermediary layer.
4Adaptability or versatility
If language models integrate with multiple external tools and APIs, then versatility and adaptability improve, but integration complexity and maintenance requirements increase
Solution Approach 1:
The tool-calling model is designed with universality to handle multiple types of tools, APIs, and functions through a single unified architecture. It can interpret and call various external services without requiring separate integration logic for each tool. This multi-functional design allows the model to adapt to new tools and APIs by learning their patterns, thereby improving versatility while keeping integration complexity manageable through a universal approach.
Solution Approach 2:
The tool-calling model acts as a universal intermediary between the base language model and diverse external tools. It provides a standardized interface for tool invocation, handling different types of APIs and services through consistent processing logic. This intermediary approach abstracts the complexity of various tool integrations behind a unified layer, allowing the base model to interact with multiple tools without directly managing each integration's complexity.
Data Source
AI summary
The methods, systems, and computer networking apparatuses described herein enable language models to receive input (e.g., a query or a request) from a user or application, and without any additional training data or instructions, determine to generate a function call based on the received input from the user and generate the function call based on the determination. In some embodiments, a language model may further access an external tool or application to request an output as a response to the generated function call. The disclosed methods, systems, and networking apparatuses improve the technical field by incorporating language model capabilities within the function calling process, and allowing for function-related information to be provided to a language model via input received in any number of formats or types, including structured or unstructured input, language or non-language input, or any combination thereof.


