Search arXiv⌕ Search

arXiv subjects

Zhaoyan Sun

Publications and source records attributed to Zhaoyan Sun.

8 recordsLinked to original sources

SQL2SQLBench: A Benchmark for Database Dialect Translation

SQL dialect translation refers to converting a SQL query from one dialect to its equivalent in another dialect. Automating this process is crucial for streamlining database migrations and ensuring cross-system compatibility. Although there are many rule-based and LLM-based dialect translators, the field lacks comprehensive benchmarks to evaluate their effectiveness across diverse real-world scenarios. To address this problem, we propose SQL2SQLBench, a comprehensive benchmark for database dialect translation. First, we generate a comprehensive dataset with broad coverage in schemas, data values, and diverse dialects, grounded in real-world sources. Second, we propose Translation Point Definition Language (TPDL) to break down translation behaviors into a sequence of translation points (i.e., atomic translation of individual SQL syntactic segments across dialects). Using TPDL, we generate a comprehensive set of SQL translation pairs with fine-grained coverage of translation points, mimicking real-world queries. Third, to evaluate whether SQL dialect translators can correctly translate a source query from one dialect to a target query in another dialect, we design a progressive translation equivalence verification pipeline that combines execution-based verification with dialect-adapted formal verification. Finally, we evaluate state-of-the-art dialect translators using our open-sourced testbed and provide detailed insights.

cs.DB↗

Recovering Non-Maxwellian Velocity Distribution Functions from Collective Thomson Scattering Spectra Using Generalized Basis Representations

Thomson scattering (TS) is a key diagnostic for inferring plasma parameters from scattered power spectra, but its interpretation depends strongly on assumptions about the underlying velocity distribution functions (VDFs). Conventional analyses typically assume Maxwellian distributions, which can be invalid in high-energy-density and laboratory astrophysics plasmas where collisionless, multi-population dynamics produce non-thermal features. In such cases, Maxwellian models may reproduce observed spectra while yielding inaccurate or misleading plasma parameters. We present a generalized TS analysis framework that represents species-specific VDFs in flexible, physically motivated bases and so reconstructs complex, non-equilibrium distributions. To explore the resulting high-dimensional parameter space, we build the forward model from differentiable operations and optimize the VDF parameters by gradient descent. We apply the method to synthetic TS spectra generated from particle-in-cell simulations of a collisionless shock with interacting hydrogen and carbon populations. Immediately upstream of the shock, where the plasma is most non-thermal, the flexible bases cut the mean normalized ion VDF residual from 38.7% for a Maxwellian model to 20.3% and 20.5%, with correspondingly improved time-resolved plasma parameters. We also introduce a systematic method of uncertainty quantification that reveals degeneracies between ion species, highlighting the importance of both flexible VDF modeling and a statistical mapping of the solution space for this inherently ill-posed inversion problem.

physics.plasm-ph↗

Agentic Transaction: Towards ACID-Compliant Agent Systems

Large language model (LLM) agents are evolving from conversational assistants into autonomous systems that execute long-horizon tasks through reasoning, tool use, code generation, and workspace manipulation. As agents increasingly operate over persistent environments and multi-step workflows, they face challenges analogous to those addressed by transactional database systems: reliable execution, consistent outcomes, safe concurrency, and durable state management. We introduce the concept of an agentic transaction and propose an ACID-compliant agent system framework that reinterprets the classical ACID properties for agent execution through four semantic guarantees: Semantic Atomicity, Semantic Consistency, Semantic Isolation, and Semantic Durability. Together, these properties provide a principled foundation for building reliable agent systems despite model uncertainty and dynamic execution environments. To instantiate this framework, we develop an ACID-compliant data agent that realizes these guarantees through transactional exploration-execution-validation cycles, transactional skill hubs, confidence divergence-based validation, semantic dependency-aware isolation, and transaction-aware semantic state management. Experimental results on widely used benchmarks show that our system achieves a 10.6% improvement over state-of-the-art agents, including Claude Code. This work opens a broader research agenda on extending transactional principles and system architectures toward building trustworthy, scalable, and self-evolving AI agent systems.

cs.DB↗

AgenticDataBench: A Comprehensive Benchmark for Data Agents

Data science aims to derive actionable insights from heterogeneous raw data, unlocking the value of the massive amounts of data generated in modern society. Automating this process is essential to reducing labor-intensive efforts for data scientists and enabling scalable data-driven applications. Recently, large language model (LLM)-based data agents have emerged as a promising solution to automate data science workflows. However, the field lacks comprehensive benchmarks to rigorously evaluate these agents across diverse scenarios with fine-grained granularity. To address this gap, we propose AgenticDataBench, a comprehensive benchmark featuring realistic tasks spanning diverse domains with fine-grained ground-truth labels. This enables evaluations to capture the diversity and complexity of data science workflows and the detailed performance of agents. First, to cover diverse domains, we collect real datasets and tasks from 15 vertical domains, including 5 real-world B2B use cases from a leading fintech company. Second, to remove redundancy in real-world tasks and generate high-quality tasks for domains lacking real data, we introduce data science skills, recurring data-centric operational patterns, and quantify benchmark coverage by the number of skills included. Representative skills are extracted from large-scale task solutions on Stack Overflow using skill-aligned hierarchical clustering. Third, for real-world business tasks, we select task-solution pairs that maximize diversity in skill composition, ensuring broad coverage of practical scenarios. Fourth, to generate realistic tasks for devise domains without real tasks, we propose a systematic LLM-based task generation approach to create workflows and tasks based on these skills. Finally, we evaluate state-of-the-art data agents using our annotated benchmark and open-sourced testbed, providing detailed skill-level insights.

cs.DB↗

R-Bot: An LLM-based Query Rewrite System

Query rewrite is essential for optimizing SQL queries to improve their execution efficiency without changing their results. Traditionally, this task has been tackled through heuristic and learning-based methods, each with its limitations in terms of inferior quality and low robustness. Recent advancements in LLMs offer a new paradigm by leveraging their superior natural language and code comprehension abilities. Despite their potential, directly applying LLMs like GPT-4 has faced challenges due to problems such as hallucinations, where the model might generate inaccurate or irrelevant results. To address this, we propose R-Bot, an LLM-based query rewrite system with a systematic approach. We first design a multi-source rewrite evidence preparation pipeline to generate query rewrite evidences for guiding LLMs to avoid hallucinations. We then propose a hybrid structure-semantics retrieval method that combines structural and semantic analysis to retrieve the most relevant rewrite evidences for effectively answering an online query. We next propose a step-by-step LLM rewrite method that iteratively leverages the retrieved evidences to select and arrange rewrite rules with self-reflection. We conduct comprehensive experiments on real-world datasets and widely used benchmarks, and demonstrate the superior performance of our system, R-Bot, surpassing state-of-the-art query rewrite methods. The R-Bot system has been deployed at Huawei and with real customers, and the results show that the proposed R-Bot system achieves lower query latency.

cs.DB↗

Data Agent: A Holistic Architecture for Orchestrating Data+AI Ecosystems

Traditional Data+AI systems utilize data-driven techniques to optimize performance, but they rely heavily on human experts to orchestrate system pipelines, enabling them to adapt to changes in data, queries, tasks, and environments. For instance, while there are numerous data science tools available, developing a pipeline planning system to coordinate these tools remains challenging. This difficulty arises because existing Data+AI systems have limited capabilities in semantic understanding, reasoning, and planning. Fortunately, we have witnessed the success of large language models (LLMs) in enhancing semantic understanding, reasoning, and planning abilities. It is crucial to incorporate LLM techniques to revolutionize data systems for orchestrating Data+AI applications effectively. To achieve this, we propose the concept of a 'Data Agent' - a comprehensive architecture designed to orchestrate Data+AI ecosystems, which focuses on tackling data-related tasks by integrating knowledge comprehension, reasoning, and planning capabilities. We delve into the challenges involved in designing data agents, such as understanding data/queries/environments/tools, orchestrating pipelines/workflows, optimizing and executing pipelines, and fostering pipeline self-reflection. Furthermore, we present examples of data agent systems, including a data science agent, data analytics agents (such as unstructured data analytics agent, semantic structured data analytics agent, data lake analytics agent, and multi-modal data analytics agent), and a database administrator (DBA) agent. We also outline several open challenges associated with designing data agent systems.

cs.DB↗

D-Bot: Database Diagnosis System using Large Language Models

Database administrators (DBAs) play an important role in managing, maintaining and optimizing database systems. However, it is hard and tedious for DBAs to manage a large number of databases and give timely response (waiting for hours is intolerable in many online cases). In addition, existing empirical methods only support limited diagnosis scenarios, which are also labor-intensive to update the diagnosis rules for database version updates. Recently large language models (LLMs) have shown great potential in various fields. Thus, we propose D-Bot, an LLM-based database diagnosis system that can automatically acquire knowledge from diagnosis documents, and generate reasonable and well-founded diagnosis report (i.e., identifying the root causes and solutions) within acceptable time (e.g., under 10 minutes compared to hours by a DBA). The techniques in D-Bot include (i) offline knowledge extraction from documents, (ii) automatic prompt generation (e.g., knowledge matching, tool retrieval), (iii) root cause analysis using tree search algorithm, and (iv) collaborative mechanism for complex anomalies with multiple root causes. We verify D-Bot on real benchmarks (including 539 anomalies of six typical applications), and the results show that D-Bot can effectively analyze the root causes of unseen anomalies and significantly outperforms traditional methods and vanilla models like GPT-4.

cs.DB↗

Long-wavelength fluctuations and anomalous dynamics in two-dimensional liquids

Long-wavelength Mermin-Wagner fluctuations prevent the existence of translational long-range order, in two-dimensional systems at finite temperature. Their dynamical signature, which is the divergence of the vibrational amplitude with the system size, also affects disordered solids and washes out the transient solid-like response generally exhibited by liquids cooled below their melting temperature. Through a combined numerical and experimental investigation, here we show that long-wavelength fluctuations are also relevant at high temperature, where the liquid dynamics does not reveal a transient solid-like response. In this regime, they induce an unusual but ubiquitous decoupling between long-time diffusion coefficient $D$ and structural relaxation time $τ$, where $D\propto τ^{-κ}$, with $κ> 1$. Long-wavelength fluctuations have a negligible influence on the relaxation dynamics only at extremely high temperatures, in molecular liquids, or extremely low densities, in colloidal systems.

cond-mat.soft↗