This article discusses a methodology employing a causal language model combined with a classification model to invoke functions correctly. It explains a two-stage function selection involving understanding function descriptions and generating correct parameters based on user queries. The training dataset is enhanced by including function descriptions, allowing the model to prioritize the significance of specialized tokens. Moreover, a prompt template is established, supporting parallel and nested function calls, which optimizes performance across various application contexts such as Android, Vehicle, Yelp, and DoorDash.
To successfully invoke a function, it's essential to accurately select the appropriate function from all available options and to generate the correct function parameters.
We can envision the N available functions as a selection pool, transforming the selection challenge into a softmax classification problem.
We decided to incorporate the function descriptions into the training dataset, enabling the model to learn the importance of these specialized tokens.
We designed a prompt template that accommodates three different response styles, facilitating parallel and nested function calls.
#causal-language-model #function-invocation #classification-model #model-training #natural-language-processing
Collection
[
|
...
]