Machine learning (ML) techniques for optimizing data management problems have been extensively studied and widely deployed in recent five years. However traditional ML methods have limitations on generalizability (adapting to different scenarios) and inference ability (understanding the context). Fortunately, large language models (LLMs) have shown high generalizability and human-competitive abilities in understanding context, which are promising for data management tasks (e.g., database diagnosis, database tuning). However, existing LLMs have several limitations: hallucination, high cost, and low accuracy for complicated tasks. To address these challenges, we design LLMDB, an LLM-enhanced data management paradigm which has generalizability and high inference ability while avoiding hallucination, reducing LLM cost, and achieving high accuracy. LLMDB embeds domain-specific knowledge to avoid hallucination by LLM fine-tuning and prompt engineering. LLMDB reduces the high cost of LLMs by vector databases which provide semantic search and caching abilities. LLMDB improves the task accuracy by LLM agent which provides multiple-round inference and pipeline executions. We showcase three real-world scenarios that LLMDB can well support, including query rewrite, database diagnosis and data analytics. We also summarize the open research challenges of LLMDB.
翻译:近年来,利用机器学习(ML)技术优化数据管理问题的方法已被广泛研究并大规模部署。然而,传统ML方法在泛化能力(适应不同场景)和推理能力(理解上下文)方面存在局限性。幸运的是,大语言模型(LLM)展现出强大的泛化能力和与人类媲美的上下文理解能力,有望应用于数据管理任务(如数据库诊断、数据库调优)。但现有LLM仍存在幻觉、高成本以及复杂任务准确率低等缺陷。为应对这些挑战,我们设计了LLMDB——一种兼具泛化能力与高推理能力,同时避免幻觉、降低LLM成本并实现高精度的LLM增强数据管理范式。LLMDB通过LLM微调和提示工程嵌入领域知识以避免幻觉;借助具备语义搜索与缓存能力的向量数据库降低LLM高昂成本;利用支持多轮推理与管道执行的LLM智能体提升任务准确率。我们展示了LLMDB在查询重写、数据库诊断和数据分析三类真实场景中的良好支持能力,并总结了LLMDB面临的开放研究挑战。