MENTOR: Procedural Shielding of Tool-Using LLM Agents
Ashwani Anand, Ivi Chatzi, Ritam Raha, Anne-Kathrin Schmuck
Abstract
Tool-using LLM agents are increasingly used to automate workflows governed by procedural manuals, such as company rules for booking travel or procuring hardware. These manuals are written in natural language for humans and describe general requirements over such complex workflows. Ensuring compliance of LLM agents with these manuals is difficult, and state-of-the-art techniques use either LLM judges or manually written rules to forbid problematic tool-calls locally at runtime. This is insufficient because (i) only blocking tool calls keeps the agent clueless about how to make correct progress towards fulfilling its task, and (ii) can lead to overly conservative behavior of the agent, as tool calls might only be problematic in certain contexts. To overcome these challenges, we introduce MENTOR, which (i) additionally provides guidance for the agent to make procedural-compliant progress on the task, and (ii) ensures that this compliance is context-aware. We achieve these goals by building a novel history-dependent runtime shield that is obtained from the procedural manual via a multi-step autoformalization pipeline. At its core, MENTOR utilizes a game-based technique to ensure robustness against runtime uncertainty without over-resticting agents' behavior. This yields a formally assisted framework for procedural shielding of LLM agents that improves compliance well beyond existing methods. In particular, MENTOR lifts the compliance of shielded light-weight open-source LLMs above that of non-shielded proprietary models. Since a shield is synthesized once per manual and then serves every task, a MENTOR-shielded agent becomes a viable choice for repeatedly executed workflows, potentially reducing deployment costs when the offline construction cost is amortized over repeated tasks.
Create a lesson
Related papers
AD4EDU: Benchmarking University Lecture Audio Description across Accessibility Standards, Metrics, and Learner Preferences
Psychias Stylianos, Gao Yingqiang
Beyond Model Bias: Cross-Entropy Based Rankings in Literary and Academic Texts Remain Stable across Small Language Models
Ankit Bhattacharjee, Indrasabarna Hari, Krityapriya Bhaumik et al.
Predicting Mental Health Help-Seeking Behaviour on Reddit: A Survival Analysis of Linguistic and Behavioural Signals
Nisar Ahmed, Ammara Kazmi, Irtaza Bashir Raja et al.
Event Memory and Narrative Dynamics: A Large Language Model Framework for Multidimensional State Spaces
Joshua Sariñana
SarcasTraps: Effect of Sarcasm on Turkish Hate Speech Detection
Niyazi Ahmet Metin, Dilara Keküllüoğlu
Lexical Redefinition Reveals Context-Sensitive Instruction Following
Roksana Goworek, Haim Dubossarsky