mlsanityData to 14 Oct 2026

Digging Into the Internal: Causality-Based Analysis of LLM Function Calling

arXiv 2509.16268 ↗First posted 18 Sep 2025cs.SE cs.AIcited by 0

On the map: LLM agents and tool use → Tool learning and function calling

Abstract (arXiv)

Function calling (FC) has emerged as a powerful technique for facilitating large language models (LLMs) to interact with external systems and perform structured tasks. However, the mechanisms through which it influences model behavior remain largely under-explored. Besides, we discover that in addition to the regular usage of FC, this technique can substantially enhance the compliance of LLMs with user instructions. These observations motivate us to leverage causality, a canonical analysis method, to investigate how FC works within LLMs. In particular, we conduct layer-level and token-level causal interventions to dissect FC's impact on the model's internal computational logic when responding to user queries. Our analysis confirms the substantial influence of FC and reveals several in-depth insights into its mechanisms. To further validate our findings, we conduct extensive experiments comparing the effectiveness of FC-based instructions against conventional prompting methods. We focus on enhancing LLM safety robustness, a critical LLM application scenario, and evaluate four mainstream LLMs across two benchmark datasets. The results are striking: FC shows an average performance improvement of around 135% over conventional prompting methods in detecting malicious inputs, demonstrating its promising potential to enhance LLM reliability and capability in practical applications.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Tool learning and function calling, one of 16 directions in LLM agents and tool use. Builds on 17 of its 28 references that are in the map. First posted on arXiv 18 Sep 2025.

Builds on

17 of 28 references.

Closest ancestors · 4

Same direction, newest first

  1. 2024CITI: Enhancing Tool Utilizing Ability in Large Language Models without Sacrificing General Performance20 Sep
  2. 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs31 Jul
  3. 2023Gorilla: Large Language Model Connected with Massive APIs24 May
  4. 2023Toolformer: Language Models Can Teach Themselves to Use Tools9 Feb

Other references · 13

  1. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  2. 2024MMLU-Pro: A More Robust and Challenging Multi-Task Language Understanding Benchmarkcited by 1,848
  3. 2024τ-bench: A Benchmark for Tool-Agent-User Interaction in Real-World Domainscited by 1,402
  4. 2022Mass-Editing Memory in a Transformercited by 1,001
  5. 2024AlphaEdit: Null-Space Constrained Knowledge Editing for Language Modelscited by 236
  6. 2024WildTeaming at Scale: From In-the-Wild Jailbreaks to (Adversarially) Safer Language Modelscited by 223
  7. 2024BadEdit: Backdooring large language models by model editingcited by 96
  8. 2019Neural Network Attributions: A Causal Perspectivecited by 77
  9. 2024SelfDefend: LLMs Can Defend Themselves against Jailbreaking in a Practical Mannercited by 63
  10. 2019Adversarial Defense by Restricting the Hidden Space of Deep Neural Networkscited by 56
  11. 2023You Only Prompt Once: On the Capabilities of Prompt Learning on Large Language Models to Tackle Toxic Contentcited by 39
  12. 2024PARDEN, Can You Repeat That? Defending against Jailbreaks via Repetitioncited by 35
1 more
  1. 2024Equipping Language Models with Tool Use Capability for Tabular Data Analysis in Financecited by 14

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2024The Dark Side of Function Calling: Pathways to Jailbreaking Large Language Models
  2. 2026Benchmarking LLM Tool-Use in the Wild
  3. 2024Mitigating Exaggerated Safety in Large Language Models
  4. 2025SafeSwitch: Steering Unsafe LLM Behavior via Internal Activation Signals
  5. 2024Facilitating Multi-turn Function Calling for LLMs via Compositional Instruction Tuning
  6. 2025LongFuncEval: Measuring the effectiveness of long context models for function calling
  7. 2026The Calls are Coming from Inside the Model: Investigating Probe-based Detection of Tool-Calling Errors in LLMs
  8. 2025Small Models, Big Tasks: An Exploratory Empirical Study on Small Language Models for Function Calling