When the Database Fails: Prompting LLM Dialogue Agents for Safe Recovery in Task-Oriented Dialogue

Mohammad Alijanpour Shalmani, Alale Rezvani Boroujeni, Jiann Shiun Yuan
6/30/2026
cs.CL

No official code found. Best implementation: mohammad-AJP/llm-db-failure-recovery (0 stars, last commit 2026-04-21).

Abstract

Large language models used in task-oriented dialogue often produce fluent but unsafe responses when backend database calls fail, return empty results, or surface mismatched information, inventing venues, confirmations, or booking details not grounded in the database. We study a lightweight prompting-based recovery approach that improves robustness without retraining or additional model calls. We compare three response strategies, including a guided recovery 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) and four database conditions: empty result, wrong-domain retrieval, API error, and clean retrieval. Using fault-injected benchmarks built on two structurally different datasets, MultiWOZ 2.2 (5 domains) and SGD (20 domains), we find that naive agents hallucinate on 30.5% of failure turns on MultiWOZ and 20.9% on SGD. Our Guided-Retry strategy reduces hallucination by 50% on MultiWOZ (30.5 to 15.3%) and by 42% on SGD (20.9 to 12.2%) without retraining. However, residual hallucination remains substantial (6-37% across models), with wrong-domain failures the hardest case. Results are consistent across both datasets and all six model families, and human annotation shows substantial agreement while supporting the validity of the automatic commitment-safety metric.

View on arXivView PDF

Code Implementations(1)

This is the Official Repository for the paper "When the Database Fails: Prompting LLM Dialogue Agents for Safe Recovery in Task-Oriented Dialogue"

00Apr 21, 20266 months ago

Similar Papers

Cite this paper

@article{shalmani2026when,
  title  = {When the Database Fails: Prompting LLM Dialogue Agents for Safe Recovery in Task-Oriented Dialogue},
  author = {Mohammad Alijanpour Shalmani and Alale Rezvani Boroujeni and Jiann Shiun Yuan},
  year   = {2026},
  eprint = {2606.31307},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.31307v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.31307.svg)](https://codeofpaper.com/paper/2606.31307)

Discussion