When the Database Fails: Prompting LLM Dialogue Agents for Safe Recovery in Task-Oriented Dialogue
Summary
Large language models (LLMs) in task-oriented dialogue often produce fluent but unsafe responses when backend database calls fail, return empty results, or provide mismatched information, leading to hallucinations of details not grounded in the database. A study investigates a lightweight, prompting-based recovery approach to enhance robustness without requiring model retraining. Researchers compared three response strategies, including a "Guided-Retry" prompt conditioned on structured database status, across six open-weight model families: DeepSeek-R1, Gemma-2, Llama-3, Mistral, Phi-3, and Qwen-2.5. They used fault-injected benchmarks on MultiWOZ 2.2 (5 domains) and SGD (20 domains) datasets, evaluating four database conditions. Naive agents hallucinated on 30.5% of failure turns on MultiWOZ and 20.9% on SGD. The Guided-Retry strategy reduced hallucination by 50% on MultiWOZ (from 30.5% to 15.3%) and by 42% on SGD (from 20.9% to 12.2%) without retraining. Residual hallucination remained substantial (6–37% across models), with wrong-domain failures being the most challenging. Results were consistent across all models and datasets, with human annotation validating the automatic commitment-safety metric.
Key takeaway
For NLP Engineers building task-oriented dialogue systems, you should integrate a "Guided-Retry" prompting strategy to mitigate LLM hallucination during database failures. This approach, which conditions responses on structured database status, can reduce hallucination by up to 50% without costly retraining. Be aware that wrong-domain retrieval errors remain challenging, so thoroughly test your agents against these specific failure modes to ensure robust and safe user interactions.
Key insights
Prompting with structured database status significantly reduces LLM hallucination in task-oriented dialogue without retraining.
Principles
- LLMs hallucinate significantly on database failures.
- Prompting can improve robustness without retraining.
- Wrong-domain failures are the hardest to mitigate.
Method
Implement a "Guided-Retry" prompting strategy by conditioning LLM responses on structured database status for recovery.
In practice
- Use Guided-Retry prompts for database-dependent LLMs.
- Test LLM agents against wrong-domain retrieval failures.
- Apply commitment-safety metric for dialogue evaluation.
Topics
- Large Language Models
- Task-Oriented Dialogue
- Prompt Engineering
- Hallucination Mitigation
- Database Failures
- Dialogue Safety
Best for: AI Engineer, Machine Learning Engineer, Research Scientist, AI Scientist, NLP Engineer
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by Paper Index on ACL Anthology.