Abstract
Task-Oriented Dialog Systems (TODS) traditionally rely on rigid state tracking and manually defined response templates, leading to robotic interactions. Conversely, Large Language Models (LLMs) offer superior fluency but struggle with factual consistency and task adherence. This paper introduces Dynamic Prompting, a hybrid architecture that leverages traditional Natural Language Understanding (NLU) for state tracking while utilizing LLMs for flexible, context-aware response generation. Evaluated on the MultiWOZ 2.2 dataset, the system demonstrates competitive task success rates and robust handling of out-of-scope user requests.
Introduction
The development of effective TODS involves a fundamental trade-off between control and conversationality. Traditional modular pipelines provide high reliability through explicit dialog management but lack the linguistic variety of human speech. While end-to-end LLMs can mimic human conversation, their tendency to hallucinate makes them risky for precision-dependent tasks like restaurant bookings. Dynamic Prompting addresses this by injecting structured database results and dialog states into LLM prompts, ensuring the model remains grounded in facts while retaining its natural conversational abilities.
Methodology: The Hybrid Pipeline
The proposed system replaces the conventional Dialog Manager (DM) and Response Generation (RG) modules with a Prompt Generator and an LLM (specifically, GPT-3.5-Turbo). The process follows a structured flow:
- NLU and State Tracking: A standard NLU module (RASA DIET classifier) extracts user intents and slots, which are then maintained by a Dialog State Tracker (DST).
- Dynamic Prompt Generation: A rule-based engine constructs a prompt containing a general task description, the current dialog state (in JSON format), and the conversation history formatted as a script.
- Contextual Adaptation: The prompt is "dynamic" because its instructions change based on the database output. For instance, the system uses different prompt templates if the database returns zero results versus multiple options.
Experimental Results
The system was evaluated using the restaurant domain of the MultiWOZ 2.2 benchmark, a standard for multi-domain task-oriented dialog. The results indicate that Dynamic Prompting is highly effective, achieving a task success rate comparable to specialized state-of-the-art models.
Key performance metrics include:
- Task Success Rate: The system achieved an 81% success rate. Notably, when provided with "perfect" ground-truth NLU annotations, this rate increased to 94%, suggesting that the LLM's reasoning capabilities are not the primary bottleneck.
- Information Extraction: The LLM demonstrated a near-perfect score of 0.98 in accurately relaying information from the injected JSON data to the user, proving its reliability in factual reporting.
Qualitative Insights
Beyond quantitative metrics, the LLM-based approach showed significant advantages in real-world scenarios:
- Graceful Error Recovery: The LLM could often correct upstream NLU errors by cross-referencing the raw conversation history. If the NLU fetched conflicting results, the LLM could filter them based on the user's actual request.
- Handling Out-of-Scope Requests: Unlike rigid systems that fail on unexpected inputs, the LLM could politely decline unsupported requests (e.g., "send an email") while offering helpful alternatives like taking a screenshot.
- Natural Data Cleaning: The model automatically corrected messy database entries (e.g., inconsistent casing or formatting in UK postcodes) during response generation without requiring explicit regex rules.
Limitations and Future Directions
Despite its strengths, the system faces challenges. Hallucinations still occur if critical data (like booking reference numbers) is omitted from the prompt. Additionally, the model occasionally struggles with basic counting tasks within the JSON arrays, sometimes ignoring the explicit "Count" variable provided to it. Future research will focus on expanding Dynamic Prompting to multi-domain scenarios (hotels, taxis, trains) and improving instruction-following for numerical constraints.
Summary updated