NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Panda: Performance Debugging for Databases using LLM Agents

Vikramank Y. Singh, Kapil Vaidya, Vinayshekhar Bannihatti Kumar, Sopan Khosla, Balakrishnan Narayanaswamy, Rashmi Gangadharaiah, Tim KraskaCIDR 2024

Abstract

This paper introduces Panda, a framework designed to transform Large Language Models (LLMs) from generic conversational agents into specialized "co-pilots" for database performance debugging. By grounding LLMs in real-time telemetry and domain-specific documentation, Panda provides actionable, verified advice that significantly outperforms general-purpose models. In evaluations by expert Database Engineers (DBEs), Panda achieved a 94% usefulness rating, compared to just 6% for vanilla GPT-4.

Introduction

Debugging database performance is a notoriously difficult task, requiring experienced engineers to correlate disparate signals such as CPU spikes, wait events, and slow query logs. While state-of-the-art LLMs like GPT-4 possess vast general knowledge about databases, they often fail in production environments due to a lack of context grounding. When asked to diagnose performance issues, these models typically offer generic advice—such as "check your indexes" or "scale up hardware"—which experienced engineers find "technically correct but useless."

Panda addresses this gap by providing a mechanism for LLMs to "see" the specific state of a database and "reason" using the same troubleshooting manuals and historical tickets that human experts utilize.

System Architecture

Panda implements a four-pillar architecture to bridge the gap between general knowledge and specific troubleshooting needs.

The Panda system architecture, illustrating the Feedback, Grounding, Affordance, and Verification mechanisms.

1. Grounding (The Context Pillar)

Panda utilizes a Document Retriever based on Retrieval-Augmented Generation (RAG) to pull relevant sections from troubleshooting guides and resolved support tickets. Crucially, it introduces a Telemetry-2-Text (T2T) module. This component extracts features from raw time-series telemetry (e.g., p95 latency, CPU utilization) and converts them into descriptive text, making numerical trends digestible for the LLM's reasoning engine.

2. Verification (The Trust Pillar)

To ensure reliability, Panda treats answer verification as a Natural Language Inference (NLI) task. The system uses the LLM to judge if its generated answer is supported by retrieved documents and provides inline citations for user verification.

3. Affordance (The Impact Pillar)

This module estimates the potential impact of recommendations, such as the percentage reduction in latency from adding a specific index. It also serves as a safety layer, flagging high-risk actions like DROP or DELETE.

4. Feedback (The Learning Pillar)

A Cache Store Manager (CSM) records user feedback. This data is injected into future prompts as "few-shot" examples, allowing the model to improve its diagnostic accuracy over time.

Experimental Evaluation

The researchers evaluated Panda using a comprehensive dataset including 2.5k documents covering Aurora PostgreSQL and MySQL wait events, and 2.5 million telemetry data points collected over 7 days. The evaluation set consisted of 50 manually designed debugging queries based on real-world scenarios like lock contention and workload spikes.

Results and Key Insights

The evaluation results demonstrate a significant performance gap between Panda and general-purpose models.

Human evaluation results comparing Panda and GPT-4 across different DBE experience levels.

Expert Preference and Trust

One of the most striking findings is the preference of experienced Database Engineers (DBEs). While beginners might find generic advice easier to understand, experts value actionable specificity. Advanced engineers gave Panda a 94% trust and usefulness rating, whereas vanilla GPT-4 scored only 6%.

Specificity Over Model Size

The study found that Panda, even when powered by the smaller GPT-3.5, consistently outperformed the much larger GPT-4 because it operated with the correct context. This underscores the importance of grounding over raw parameter count in specialized domains.

Hallucination Mitigation

GPT-4 frequently suggested incorrect actions, such as adjusting parameters that do not exist in managed environments (e.g., Amazon Aurora). Panda avoided these hallucinations by grounding its answers in actual service documentation.

Conclusion and Future Work

Panda demonstrates that grounding LLMs in telemetry and documentation is essential for specialized tasks like database debugging. Future work will focus on improving embedding models for domain-specific jargon, handling multi-modal data like screenshots, and developing more sophisticated impact estimation models.

Summary updated

BibTeX
@inproceedings{singh2024panda,
  author = {Vikramank Y. Singh and Kapil Vaidya and Vinayshekhar Bannihatti Kumar and Sopan Khosla and Balakrishnan Narayanaswamy and Rashmi Gangadharaiah and Tim Kraska},
  title = {{Panda: Performance Debugging for Databases using LLM Agents}},
  booktitle = {CIDR},
  year = {2024},
  url = {https://openreview.net/forum?id=NXvTSaz4Wn},
}
Figure