Measuring and Mitigating Constraint Violations of In-Context Learning for Utterance-to-API Semantic Parsing
Not on the map. Why?
Abstract (arXiv)
In executable task-oriented semantic parsing, the system aims to translate users' utterances in natural language to machine-interpretable programs (API calls) that can be executed according to pre-defined API specifications. With the popularity of Large Language Models (LLMs), in-context learning offers a strong baseline for such scenarios, especially in data-limited regimes. However, LLMs are known to hallucinate and therefore pose a formidable challenge in constraining generated content. Thus, it remains uncertain if LLMs can effectively perform task-oriented utterance-to-API generation where respecting API's structural and task-specific constraints is crucial. In this work, we seek to measure, analyze and mitigate such constraints violations. First, we identify the categories of various constraints in obtaining API-semantics from task-oriented utterances, and define fine-grained metrics that complement traditional ones. Second, we leverage these metrics to conduct a detailed error analysis of constraints violations seen in state-of-the-art LLMs, which motivates us to investigate two mitigation strategies: Semantic-Retrieval of Demonstrations (SRD) and API-aware Constrained Decoding (API-CD). Our experiments show that these strategies are effective at reducing constraints violations and improving the quality of the generated API calls, but require careful consideration given their implementation complexity and latency.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 32 of its 50 references that are in the map. First posted on arXiv 24 May 2023.
Builds on
32 of 50 references.
References · 32
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,182
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
- 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 713
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 648
- 2020ToTTo: A Controlled Table-To-Text Generation Datasetcited by 268
- 2018Fast Lexically Constrained Decoding with Dynamic Beam Allocation for Neural Machine Translationcited by 182
- 2020GraPPa: Grammar-Augmented Pre-Training for Table Semantic Parsingcited by 171
- 2021Constrained Language Models Yield Few-Shot Semantic Parserscited by 163
- 2021The Curious Case of Hallucinations in Neural Machine Translationcited by 161
20 more
- 2020Task-Oriented Dialogue as Dataflow Synthesiscited by 122
- 2018Coarse-to-Fine Decoding for Neural Semantic Parsingcited by 110
- 2016Guided Open Vocabulary Image Captioning with Constrained Beam Searchcited by 105
- 2018Semantic Parsing for Task Oriented Dialog using Hierarchical Representationscited by 101
- 2019Editing-Based SQL Query Generation for Cross-Domain Context-Dependent Questionscited by 80
- 2020Grounded Adaptation for Zero-shot Executable Semantic Parsingcited by 76
- 2021Increasing Faithfulness in Knowledge-Grounded Dialogue with Controllable Featurescited by 74
- 2020Low-Resource Domain Adaptation for Compositional Task-Oriented Semantic Parsingcited by 72
- 2020RYANSQL: Recursively Applying Sketch-based Slot Fillings for Complex Text-to-SQL in Cross-Domain Databasescited by 63
- 2020Don't Parse, Generate! A Sequence to Sequence Architecture for Task-Oriented Semantic Parsingcited by 59
- 2021Few-Shot Semantic Parsing with Language Models Trained On Codecited by 50
- 2020Conversational Semantic Parsingcited by 39
- 2021Few-shot Intent Classification and Slot Filling with Retrieved Examplescited by 35
- 2021Controllable Semantic Parsing via Retrieval Augmentationcited by 35
- 2021Guided Generation of Cause and Effectcited by 33
- 2019Learning Semantic Parsers from Denotations with Latent Structured Alignments and Abstract Programscited by 26
- 2016Learning Executable Semantic Parsers for Natural Language Understandingcited by 21
- 2021RETRONLU: Retrieval Augmented Task-Oriented Semantic Parsingcited by 15
- 2022Dialog2API: Task-Oriented Dialogue with API Description and Example Programscited by 9
- 2021Semantic Parsing in Task-Oriented Dialog with Recursive Insertion-based Encodercited by 8
Built on by
Citing papers per year: 2023: 1; 2024: 4; 2025: 0; 2026: 1.
6 papers.
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
- 2024DeAL: Decoding-time Alignment for Large Language Modelscited by 55
- 2024FLAP: Flow-Adhering Planning with Constrained Decoding in LLMscited by 11
- 2024FANTAstic SEquences and Where to Find Them: Faithful and Efficient API Call Generation through State-tracked Constrained Decoding and Rerankingcited by 5
- 2024Are Human Rules Necessary? Generating Reusable APIs with CoT Reasoning and In-Context Learningcited by 2
- 2026Selective Regenerative Decoding: Trajectory-Level Intervention for Inference-Time Reasoningcited by 1
- 2026Selective Regenerative Decoding: Trajectory-Level Intervention for Inference-Time Reasoning25 Aug 2026
- 2024FANTAstic SEquences and Where to Find Them: Faithful and Efficient API Call Generation through State-tracked Constrained Decoding and Reranking18 Jul 2024
- 2024Are Human Rules Necessary? Generating Reusable APIs with CoT Reasoning and In-Context Learning6 May 2024
- 2024FLAP: Flow-Adhering Planning with Constrained Decoding in LLMs9 Mar 2024
- 2024DeAL: Decoding-time Alignment for Large Language Models5 Feb 2024
- 2023Large Language Models for Software Engineering: A Systematic Literature Review21 Aug 2023