Contract2Tool: Learning Preconditions and Effects for Reliable Tool-Augmented LLM Agents
- company Hugging Face
- lab arXiv
- lab arXivLabs
- product CatalyzeX Code Finder for Papers
- product DagsHub
- product GotitPub
- product ScienceCast
- product alphaXiv
A new framework called Contract2Tool can automatically infer tool contracts — specifying preconditions, effects, risk, and cost — from metadata, schemas, documentation, and execution traces, according to research published on arXiv [1]. The approach aims to make large language model agents more reliable when calling external APIs without requiring manually written contracts. Tool-augmented large language model agents increasingly depend on external APIs, but standard tool schemas describe only how to call a tool, not when it is causally appropriate or what task state it produces [1]. Causal tool filtering addresses this gap by using lightweight contracts, though manually writing and maintaining such contracts does not scale to large or changing tool ecosystems [1]. Contract2Tool converts observable tool evidence into normalized symbolic contracts that can be evaluated intrinsically and deployed inside downstream causal tool filtering [1]. The researchers evaluated learned contracts against gold preconditions, effects, and risk labels and measured their downstream utility on multi-step agent tasks [1]. Hybrid documentation-and-trace evidence produced contracts accurate enough to preserve most of the reliability and efficiency benefits of gold contracts [1]. Learned-contract CMTF achieved 0.980 downstream success, close to 0.990 for gold-contract CMTF, while reducing visible tools from 100 to 1 and cutting average token usage from 26,172 to 2,528 relative to all-tools exposure [1]. Large language models are machine learning models with many parameters, trained with self-supervised learning on vast amounts of text for natural language processing tasks such as language generation [8]. The tool-augmented agent paradigm has drawn investment from companies including DeepSeek, a Chinese AI firm founded in July 2023 that develops LLMs and launched its R1 model in January 2025 [7], and Alibaba Cloud, whose Qwen family of models is distributed under open-source licenses including Apache 2.0 [9]. The Contract2Tool paper appears on arXiv, a preprint server that has integrated with Hugging Face Spaces since November 2022 to make papers more accessible by embedding interactive demos directly alongside abstracts [5]. Hugging Face paper pages allow users to find related models, datasets, and apps, and enable the community to discuss the paper [4]. Authors can link a Space to an arXiv paper by including the paper link in the Space README file or by associating the Space with a model that cites the paper [6].
applicationresearch-papertool-release
Background sources we checked (8)
- arxiv.org ↗ Tool-augmented large language model agents increasingly rely on external APIs, but standard tool schemas describe how to call a tool, not when the tool is causally appropriate or what task state it produces. Causal tool filtering addresses this gap by using lightweight contracts …
- arxiv.org ↗ We review thirteen generative systems and five supporting datasets for quantum circuit and quantum code generation, identified through a structured scoping review of Hugging Face, arXiv, and provenance tracing (January-February 2026). We organize the field along two axes: artifac…
- huggingface.co ↗ # Paper Pages Paper pages allow people to find artifacts related to a paper such as models, datasets and apps/demos (Spaces). Paper pages also enable the community to discuss about the paper. ## Linking a Paper to a model, dataset or Space If the repository card (`README.md`) …
- huggingface.co ↗ Hugging Face Machine Learning Demos on arXiv Back to Articles [...] # Hugging Face Machine Learning Demos on arXiv Published November 17, 2022 Update on GitHub Upvote 1 - - - - - Abubakar Abid abidlabs Follow …
- huggingface.co ↗ # How to Add a Space to ArXiv [...] Demos on Hugging Face Spaces allow a wide audience to try out state-of-the-art machine learning research without writing any code. Hugging Face and ArXiv have collaborated to embed these demos directly along side papers on ArXiv! [...] Thanks t…
- en.wikipedia.org ↗ Hangzhou DeepSeek Artificial Intelligence Basic Technology Research Co., Ltd., doing business as DeepSeek, is a Chinese artificial intelligence (AI) company that develops large language models (LLMs). Based in Hangzhou, Zhejiang, DeepSeek is owned and funded by High-Flyer, a Chin…
- en.wikipedia.org ↗ A large language model (LLM) is a type of machine learning model designed for natural language processing tasks such as language generation. LLMs are language models with many parameters, and are trained with self-supervised learning on a vast amount of text.…
- en.wikipedia.org ↗ Qwen (also known as Tongyi Qianwen, Chinese: 通义千问; pinyin: Tōngyì Qiānwèn) is a family of large language models developed by Alibaba Cloud. Many Qwen models are distributed under the free and open-source Apache 2.0 license, the source-available Qwen License, or the non-commercial…