FANTAstic SEquences and Where to Find Them: Faithful and Efficient API Call Generation through State-tracked Constrained Decoding and Reranking
Not on the map. Why?
Abstract (arXiv)
API call generation is the cornerstone of large language models' tool-using ability that provides access to the larger world. However, existing supervised and in-context learning approaches suffer from high training costs, poor data efficiency, and generated API calls that can be unfaithful to the API documentation and the user's request. To address these limitations, we propose an output-side optimization approach called FANTASE. Two of the unique contributions of FANTASE are its State-Tracked Constrained Decoding (SCD) and Reranking components. SCD dynamically incorporates appropriate API constraints in the form of Token Search Trie for efficient and guaranteed generation faithfulness with respect to the API documentation. The Reranking component efficiently brings in the supervised signal by leveraging a lightweight model as the discriminator to rerank the beam-searched candidate generations of the large language model. We demonstrate the superior performance of FANTASE in API call generation accuracy, inference efficiency, and context efficiency with DSTC8 and API Bank datasets.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 21 of its 30 references that are in the map. First posted on arXiv 18 Jul 2024.
Builds on
21 of 30 references.
References · 21
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
- 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIscited by 1,880
- 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 793
- 2022Fine-Tuning can Distort Pretrained Features and Underperform Out-of-Distributioncited by 722
- 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 402
- 2023Augmented Language Models: a Surveycited by 398
- 2020GeDi: Generative Discriminator Guided Sequence Generationcited by 377
9 more
- 2017Lexically Constrained Decoding for Sequence Generation Using Grid Beam Searchcited by 234
- 2023LEVER: Learning to Verify Language-to-Code Generation with Executioncited by 228
- 2020Fast Differentiable Sorting and Rankingcited by 196
- 2023Grammar-Constrained Decoding for Structured NLP Tasks without Finetuningcited by 186
- 2018Fast Lexically Constrained Decoding with Dynamic Beam Allocation for Neural Machine Translationcited by 181
- 2021NeuroLogic A*esque Decoding: Constrained Text Generation with Lookahead Heuristicscited by 153
- 2020NeuroLogic Decoding: (Un)supervised Neural Text Generation with Predicate Logic Constraintscited by 146
- 2019The Eighth Dialog System Technology Challengecited by 25
- 2023Measuring and Mitigating Constraint Violations of In-Context Learning for Utterance-to-API Semantic Parsingcited by 6
Built on by
Citing papers per year: 2025: 1; 2026: 4.
5 papers.
- 2026Lookahead-then-Verify: Reliable Constrained Decoding for Diffusion LLMs under Context-Free Grammarscited by 6
- 2025ToolPRM: Fine-Grained Inference Scaling of Structured Outputs for Function Callingcited by 2
- 2026Modularized Reinforcement Learning on LLMs: From MDP Creation to Exploration and Learningcited by 2
- 2026RAG Strategies for Natural Language-Based SQL Query and REST API Call Generationcited by 0
- 2026Improving Cross-Lingual Transfer for Sequential Sentence Classification in Research Papers via Structural Similaritycited by 0
- 2026Improving Cross-Lingual Transfer for Sequential Sentence Classification in Research Papers via Structural Similarity17 Sep 2026
- 2026Modularized Reinforcement Learning on LLMs: From MDP Creation to Exploration and Learning20 Jun 2026
- 2026RAG Strategies for Natural Language-Based SQL Query and REST API Call Generation6 Feb 2026
- 2026Lookahead-then-Verify: Reliable Constrained Decoding for Diffusion LLMs under Context-Free Grammars31 Jan 2026
- 2025ToolPRM: Fine-Grained Inference Scaling of Structured Outputs for Function Calling16 Oct 2025