Automating Database-Native Function Code Synthesis with LLMs
Not on the map. Why?
Abstract (arXiv)
Database systems incorporate an ever-growing number of functions in their kernels (a.k.a., database native functions) for scenarios like new application support and business migration. This growth causes an urgent demand for automatic database native function synthesis. While recent advances in LLM-based code generation (e.g., Claude Code) show promise, they are too generic for database-specific development. They often hallucinate or overlook critical context because database function synthesis is inherently complex and error-prone, where synthesizing a single function may involve registering multiple function units, linking internal references, and implementing logic correctly. To this end, we propose DBCooker, an LLM-based system for automatically synthesizing database native functions. It consists of three components. First, the function characterization module aggregates multi-source declarations, identifies function units that require specialized coding, and traces cross-unit dependencies. Second, we design operations to address the main synthesis challenges: (1) a pseudo-code-based coding plan generator that constructs structured implementation skeletons by identifying key elements such as reusable referenced functions; (2) a hybrid fill-in-the-blank model guided by probabilistic priors and component awareness to integrate core logic with reusable routines; and (3) three-level progressive validation, including syntax checking, standards compliance, and LLM-guided semantic verification. Finally, an adaptive orchestration strategy unifies these operations with existing tools and dynamically sequences them via the orchestration history of similar functions. Results show that DBCooker outperforms other methods on SQLite, PostgreSQL, and DuckDB (34.55% higher accuracy on average), and can synthesize new functions absent in the latest SQLite (v3.50).
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 21 of its 41 references that are in the map. First posted on arXiv 2 Apr 2026.
Builds on
21 of 41 references.
References · 21
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
- 2024Qwen2.5-Coder Technical Reportcited by 1,203
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2022CodeT: Code Generation with Generated Testscited by 384
- 2025Trae Agent: An LLM-based Agent for Software Engineering with Test-time Scalingcited by 94
- 2025LongCodeBench: Evaluating Coding LLMs at 1M Context Windowscited by 37
- 2025SWE-Dev: Building Software Engineering Agents with Training and Inference Scalingcited by 26
9 more
- 2025Optuna vs Code Llama: Are LLMs a New Paradigm for Hyperparameter Tuning?cited by 21
- 2022Piloting Copilot, Codex, and StarCoder2: Hot Temperature, Cold Prompts, or Black Magic?cited by 14
- 2024LibEvolutionEval: A Benchmark and Study for Version-Specific Code Generationcited by 12
- 2025RustEvo^2: An Evolving Benchmark for API Evolution in LLM-based Rust Code Generationcited by 10
- 2026Can LLMs Clean Up Your Mess? A Survey of Application-Ready Data Preparation with LLMscited by 9
- 2025DBAIOps: A Reasoning LLM-Enhanced Database Operation and Maintenance System using Knowledge Graphscited by 7
- 2017Optimization of Imperative Programs in a Relational Databasecited by 5
- 2025PARROT: A Benchmark for Evaluating LLMs in Cross-System SQL Translationcited by 5
- 2025OpenMLDB: A Real-Time Relational Data Feature Computation System for Online MLcited by 3
Built on by
Citing papers per year: 2026: 2.
2 papers.
- 2026Are We Ready For An Agent-Native Memory System?cited by 15
- 2026AgenticDataBench: A Comprehensive Benchmark for Data Agentscited by 7
- 2026AgenticDataBench: A Comprehensive Benchmark for Data Agents2 Jul 2026
- 2026Are We Ready For An Agent-Native Memory System?23 Jun 2026