# FLAP: Flow Adhering Planning with Constrained Decoding in LLMs

**Authors:** Shamik Roy, Sailik Sengupta, Daniele Bonadiman, Saab Mansour, Arshit Gupta  
**arXiv:** [2403.05766](https://arxiv.org/abs/2403.05766)  
**Date:** 2024-03-09  
**Summary page:** https://www.summarizepaper.com/en/paper/2403.05766v1/

## Key points

- Authors address planning for agents in task-oriented dialogs (TODs)
- Challenge of ensuring faithful plans with Large Language Models (LLMs) due to bias towards pretraining data
- Introduction of constrained decoding algorithm based on lookahead heuristic for faithful planning in TODs
- Algorithm outperforms other baselines in performance metrics, eliminates need for fine-tuning LLMs using domain-specific data
- Comparable results achieved with smaller LLMs (7B) compared to larger models (30B-40B parameters)

## Summary

, , , , 

In the paper titled "FLAP: Flow Adhering Planning with Constrained Decoding in LLMs," authored by Shamik Roy, Sailik Sengupta, Daniele Bonadiman, Saab Mansour, and Arshit Gupta, the authors address the critical task of planning for agents in task-oriented dialogs (TODs). Human agents typically adhere to predefined workflows and execute actions through APIs in a sequential manner to address user issues. However, this requires reasoning and planning skills. With the advancements in Large Language Models (LLMs), there has been a growing interest in utilizing them for task planning and API execution. One challenge faced with LLMs is ensuring faithful plans that adhere to predefined workflows and API dependencies due to their inherent bias towards pretraining data. Additionally, real-life workflows are often customized and subject to changes, highlighting the importance of quickly adapting agents to these modifications. To effectively address these challenges, the authors introduce a constrained decoding algorithm based on lookahead heuristic for faithful planning in TODs. This algorithm eliminates the need for fine-tuning LLMs using domain-specific data and outperforms other decoding and prompting-based baselines in performance metrics. Moreover, by applying their proposed algorithm on smaller LLMs (7B), comparable results are achieved compared to larger LLM models ranging from 30B-40B parameters. This research contributes valuable insights into enhancing planning accuracy in TOD scenarios while leveraging the capabilities of LLMs effectively.
