Papers › Agentic Cost-Aware Query Planning with Knowledge Distillation for Big Data Analytics

Agentic Cost-Aware Query Planning with Knowledge Distillation for Big Data Analytics

18 May 2026arXiv:2605.17831added by Syntology

Mahdi Naser-Moghadasi

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

Query optimization in big data analytics remains computationally expensive, particularly for resource-constrained environments where traditional optimizers fail to satisfy memory and latency constraints. We present an agentic query planning system that combines a rule-based teacher planner, UCB1 bandit exploration, cost-aware prediction, and knowledge distillation to a lightweight student planner. Our teacher planner generates SQL plans using six key optimization strategies, while UCB1 bandit search efficiently explores the plan space under explicit resource constraints. A Random Forest cost model predicts query latency from plan features, enabling cost-aware decisions. A distilled student planner (Logistic Regression or Gradient Boosting) learns to mimic teacher-bandit decisions for fast inference. Evaluation on NYC Taxi and IMDB datasets demonstrates 23% latency reduction compared to default planners while maintaining 94% constraint satisfaction. The student planner achieves 89% accuracy in replicating optimal plans with 15x faster inference time. Our single-file implementation enables reproducible big-data analytics on resource-limited machines and is publicly available at https://github.com/mahdinaser/agentic-kd-planner.

PaperPDFCode Syntology ran

In Syntology For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2605.17831")

Code

Syntology Ran 13 of 15 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 3 ran · honoured contract; 6 ran · our draft was wrong; 4 ran with no contract checked.

By repository: found in paper text by Syntology: 15 samples from 1 repository, 13 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

mahdinaser/agentic-kd-planner found in paper text by Syntology report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

15 samples harvested; 13 ran; 3 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · honoured contract
6ran · our draft was wrong
4ran
2unverified

Licence: 15 of the 15 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from mahdinaser/agentic-kd-planner. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

PlanFlags mahdinaser/agentic-kd-planner/agentic_kd_planner.py found in paper text by Syntology ran · metamorphic tier: deterministic no licence file found · pointer only · fe0a156c43207c8a · report
QueryResult mahdinaser/agentic-kd-planner/agentic_kd_planner.py found in paper text by Syntology ran · metamorphic tier: deterministic no licence file found · pointer only · bb71795e4eba07e5 · report
SchemaStats mahdinaser/agentic-kd-planner/agentic_kd_planner.py found in paper text by Syntology ran no licence file found · pointer only · ff70f01c792d105b · report
_reorder_joins mahdinaser/agentic-kd-planner/agentic_kd_planner.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · 863506fb9ed605a9 · report
build_sql mahdinaser/agentic-kd-planner/agentic_kd_planner.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · 64538ebc37a35c13 · report
canonical_hash mahdinaser/agentic-kd-planner/agentic_kd_planner.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · 315cab65c954a0fe · report
estimate_memory mahdinaser/agentic-kd-planner/agentic_kd_planner.py found in paper text by Syntology ran · honoured contract fingerprinted no licence file found · pointer only · 075cd244ab2fb22e · report
estimate_query_mem_mb mahdinaser/agentic-kd-planner/agentic_kd_planner.py found in paper text by Syntology ran · honoured contract fingerprinted no licence file found · pointer only · f4aa72cbc5cae3a0 · report
execute_sql mahdinaser/agentic-kd-planner/agentic_kd_planner.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · c7e9ac1f774b6e8b · report
extract_features mahdinaser/agentic-kd-planner/agentic_kd_planner.py found in paper text by Syntology ran · honoured contract no licence file found · pointer only · 5ce5caa7c7ab66fa · report
get_duckdb_conn mahdinaser/agentic-kd-planner/agentic_kd_planner.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · 8eee41b2cf8ace24 · report
get_system_ram_gb mahdinaser/agentic-kd-planner/agentic_kd_planner.py found in paper text by Syntology ran · metamorphic tier: well formed no licence file found · pointer only · e897d047fc2ad726 · report
hash_result mahdinaser/agentic-kd-planner/agentic_kd_planner.py found in paper text by Syntology ran · our draft was wrong no licence file found · pointer only · 8ffe3f3b4e365234 · report
AgenticPlanner mahdinaser/agentic-kd-planner/agentic_kd_planner.py found in paper text by Syntology unverified no licence file found · pointer only · 13c95da34b9df9bf · report
set_global_seeds mahdinaser/agentic-kd-planner/agentic_kd_planner.py found in paper text by Syntology unverified no licence file found · pointer only · f84ae83f0ff0cb30 · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2605.17831, was issued in May 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections