Contextual Dynamic Prompting for Response Generation in Task-oriented Dialog Systems

Sandesh Swamy, Narges Tabari, Chacha Chen, Rashmi Gangadharaiah · DOI

Abstract

Adapting Large Language Models (LLMs) for Task-Oriented Dialog (TOD) systems often involves a trade-off between computational efficiency and model performance. While prefix-tuning offers a parameter-efficient alternative to full fine-tuning, standard implementations rely on static prompts that fail to capture the evolving context of a conversation. This paper explores Contextual Dynamic Prompting (CDP), a method developed by researchers at AWS AI Labs that generates input-dependent soft prompts. By distilling dialog history and system states into dynamic prefixes, the proposed method achieves significant performance gains on the MultiWOZ 2.2 benchmark, demonstrating that context-aware prompt generation is key to building more effective conversational agents.

1. Introduction

Task-oriented dialog (TOD) systems are designed to assist users in completing specific goals, such as booking a hotel or checking flight status. Modern TOD systems increasingly leverage the generative power of Large Language Models (LLMs). However, the deployment of these models presents a challenge: fine-tuning a massive model for every specific task is computationally prohibitive and storage-intensive.

Prefix-tuning has emerged as a popular solution. In this paradigm, the LLM remains frozen, and only a small set of continuous vectors (prefix tokens) are trained. However, traditional prefix-tuning uses "static" prompts—the same set of tokens is applied regardless of the user's input or the conversation's progress. This lack of flexibility limits the model's ability to adapt to shifting domains and specific user requests within a single session.

2. Contextual Dynamic Prompting

To address the limitations of static prompts, the authors introduce Contextual Dynamic Prompting (CDP). This approach replaces fixed prefixes with dynamic ones generated on-the-fly based on the current dialog context.

2.1 Architecture

The system utilizes a T5 model as the primary backbone. The core innovation lies in the addition of a lightweight Prompt Encoder, typically a feedforward neural network. Instead of learning a fixed set of weights for the prefix, the system learns to generate these weights based on the input.

2.2 Context Distillation and Dialog States

The generation process involves two primary components:

  1. Context Distillation: The dialog history is processed through a frozen T5 encoder to produce a latent representation. This representation is then passed to the Prompt Encoder to create a unique prefix for the current turn.
  2. Dialog State Integration: The most advanced iteration of the model incorporates the Dialog State (DS)—a structured representation of the user's requirements (e.g., "area: centre", "price: cheap"). Feeding this state into the prompt encoder provides a strong signal that guides the LLM toward the correct response.

This architecture maintains parameter efficiency because the primary LLM and the T5 encoder remain frozen; only the Prompt Encoder requires training.

3. Experimental Evaluation

The researchers evaluated the CDP approach using the MultiWOZ 2.2 dataset, a comprehensive benchmark for multi-domain TOD systems containing over 8,000 dialogs across domains like hotels, restaurants, and transportation.

3.1 Performance Metrics

Performance was measured using a "Combined Score," calculated as:
Combined Score = BLEU + 0.5 * (Inform Rate + Success Rate)

The results demonstrated a clear hierarchy of performance:

  • Static Prefix-Tuning (Baseline): 70.54
  • Contextual Dynamic Prompting: 73.46
  • Contextual Dynamic Prompting + Dialog State: 90.94

The inclusion of Dialog States resulted in a massive 20-point improvement over the static baseline, highlighting the importance of structured context in prompt generation.

3.2 Human Evaluation

While automated metrics like BLEU showed a slight decrease in the dynamic models—likely due to the models generating more natural, varied language rather than mimicking training data verbatim—human evaluators preferred the dynamic agents. In a blind test of 100 conversations, the dynamic agent was preferred 53% of the time, compared to only 10% for the static baseline.

4. Discussion and Limitations

The study reveals that dialog history is more than just additional input; it is a signal that should shape the model's attention mechanism via the prefix. However, several limitations remain:

  • Language Scope: The current research is limited to English-language datasets.
  • Oracle Dependency: The highest performance gains were achieved using "ground truth" (oracle) dialog states. In practical applications, these states must be predicted by a Dialog State Tracker (DST), which may introduce errors.

5. Conclusion

Contextual Dynamic Prompting represents a significant step forward in making LLM-based TOD systems more adaptable and efficient. By moving from static to dynamic, context-aware prefixes, the system achieves state-of-the-art performance while maintaining the benefits of parameter-efficient tuning. Future work will focus on testing the robustness of this method against noisy, predicted dialog states and expanding its application to multi-lingual contexts.

Summary updated

BibTeX
@inproceedings{swamy2023contextual,
  author = {Sandesh Swamy and Narges Tabari and Chacha Chen and Rashmi Gangadharaiah},
  title = {{Contextual Dynamic Prompting for Response Generation in Task-oriented Dialog Systems}},
  booktitle = {EACL},
  year = {2023},
  doi = {10.18653/v1/2023.eacl-main.226},
}
Figure