SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2605.17831 · 2026

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

Mahdi Moghadasi, Faezeh Ghaderi

arXiv · PDF

Code that ran

13 of 15 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 6 failures of our instrument; 2 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2605.17831.json · badge: /api/ran/2605.17831.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
mahdinaser/agentic-kd-planner community
Papers with Code archive
13 ran · 2 no recorded run
FunctionStatusWhere it lives
PlanFlags Ran
ran on a synthesized input · constructed an object; no result was computed
mahdinaser/agentic-kd-planner/agentic_kd_planner.py
pointer only (licence: NONE) · get_code("fe0a156c43207c8a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mahdinaser/agentic-kd-planner when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

QueryResult Ran
ran on a synthesized input · constructed an object; no result was computed
mahdinaser/agentic-kd-planner/agentic_kd_planner.py
pointer only (licence: NONE) · get_code("bb71795e4eba07e5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mahdinaser/agentic-kd-planner when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

SchemaStats Ran
ran on a synthesized input · constructed an object; no result was computed
mahdinaser/agentic-kd-planner/agentic_kd_planner.py
pointer only (licence: NONE) · get_code("ff70f01c792d105b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mahdinaser/agentic-kd-planner when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

_reorder_joins Ran
ran; our contract draft was wrong, not the code
mahdinaser/agentic-kd-planner/agentic_kd_planner.py
pointer only (licence: NONE) · get_code("863506fb9ed605a9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mahdinaser/agentic-kd-planner when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

build_sql Ran
ran; our contract draft was wrong, not the code
mahdinaser/agentic-kd-planner/agentic_kd_planner.py
pointer only (licence: NONE) · get_code("64538ebc37a35c13")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mahdinaser/agentic-kd-planner when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

canonical_hash Ran
ran; our contract draft was wrong, not the code
mahdinaser/agentic-kd-planner/agentic_kd_planner.py
pointer only (licence: NONE) · get_code("315cab65c954a0fe")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mahdinaser/agentic-kd-planner when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

estimate_memory Ran
ran, honoured the contract we drafted
mahdinaser/agentic-kd-planner/agentic_kd_planner.py
pointer only (licence: NONE) · get_code("075cd244ab2fb22e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mahdinaser/agentic-kd-planner when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

estimate_query_mem_mb Ran
ran, honoured the contract we drafted
mahdinaser/agentic-kd-planner/agentic_kd_planner.py
pointer only (licence: NONE) · get_code("f4aa72cbc5cae3a0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mahdinaser/agentic-kd-planner when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

execute_sql Ran
ran; our contract draft was wrong, not the code
mahdinaser/agentic-kd-planner/agentic_kd_planner.py
pointer only (licence: NONE) · get_code("c7e9ac1f774b6e8b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mahdinaser/agentic-kd-planner when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_features Ran
ran, honoured the contract we drafted
mahdinaser/agentic-kd-planner/agentic_kd_planner.py
pointer only (licence: NONE) · get_code("5ce5caa7c7ab66fa")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mahdinaser/agentic-kd-planner when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_duckdb_conn Ran
ran; our contract draft was wrong, not the code
mahdinaser/agentic-kd-planner/agentic_kd_planner.py
pointer only (licence: NONE) · get_code("8eee41b2cf8ace24")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mahdinaser/agentic-kd-planner when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_system_ram_gb Ran
ran on a synthesized input
mahdinaser/agentic-kd-planner/agentic_kd_planner.py
pointer only (licence: NONE) · get_code("e897d047fc2ad726")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mahdinaser/agentic-kd-planner when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

hash_result Ran
ran; our contract draft was wrong, not the code
mahdinaser/agentic-kd-planner/agentic_kd_planner.py
pointer only (licence: NONE) · get_code("8ffe3f3b4e365234")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mahdinaser/agentic-kd-planner when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

AgenticPlanner Not yet run
unverified (harvested, no recorded run)
mahdinaser/agentic-kd-planner/agentic_kd_planner.py
pointer only (licence: NONE) · get_code("13c95da34b9df9bf")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mahdinaser/agentic-kd-planner when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

set_global_seeds Not yet run
unverified (harvested, no recorded run)
mahdinaser/agentic-kd-planner/agentic_kd_planner.py
pointer only (licence: NONE) · get_code("f84ae83f0ff0cb30")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, mahdinaser/agentic-kd-planner when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 15 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

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. Finally, 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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2605.17831")
get_code_for_paper("2605.17831")
have("2605.17831")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2605.17831.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2605.17831.svg)](https://syntology.ai/paper/2605.17831)

Connect an agent — have() is free.