Skip to main content
Back

Lenovo's LeJOT-AutoML Cuts Cloud Feature Engineering From a Month to 30 Minutes

LeJOT-AutoML uses LLM agents and MCP toolchains to cut Databricks feature engineering from weeks to 30 minutes, saving 19% on cloud compute costs

Pro

Paper, Full Access
  • LeJOT-AutoML uses three LLM agents to automate Databricks job execution-time feature engineering, cutting the cycle from ~1 month to 20-30 minutes.
  • The system generates 200+ features from runtime logs, metadata, and job scripts vs. ~40 from manual engineering, using an MCP toolchain for safe, sandboxed data access.
  • Integrated into the LeJOT orchestration pipeline, it achieves 19.01% cloud cost savings in production deployment at Lenovo.
  • Manual engineering still wins on accuracy (R²=0.91 vs. 0.81) and cost savings (27.94% vs. 19.01%) due to better access to configuration-change history and pricing signals.
  • Two safety gates -- a code-completion checker and a data-leakage checker -- prevent invalid or label-leaking features from entering the model.
  • No public code release; the system is deployed internally and uses Qwen-235B for agent reasoning and XGBoost as the final predictor.

Cloud data platforms like Databricks run tens of thousands of jobs per day, and the difference between picking the right compute instance and the wrong one compounds fast. LeJOT-AutoML, a new paper from researchers at the University of Science and Technology of China and Lenovo, tackles this problem head-on: it uses LLM agents to automate the entire feature engineering pipeline for job execution-time prediction, shrinking a process that used to take a month down to 20-30 minutes while delivering 19% cost savings in production.

The cost of getting it wrong

Databricks job orchestration systems reduce cloud costs by selecting low-priced compute configurations while meeting latency and dependency constraints, making accurate execution-time prediction under heterogeneous instance types and non-stationary runtime conditions critical. The existing system, LeJOT, already does cost-aware scheduling -- but it depends on a hand-crafted ML predictor that needs constant maintenance.

The core difficulty is that the most informative signals about how long a job will take only appear after the job starts running. High-impact performance signals only emerge at runtime: scan volume after partition pruning, skew-induced stragglers, shuffle amplification, and executor scheduling effects. Three failure modes make static feature engineering particularly brittle:

  • Partition pruning: A query over a partitioned table may scan only 1% of the data, but static features use the full table size -- overestimating scan volume by orders of magnitude.
  • Join skew: Uneven key distributions concentrate work on a few tasks, creating stragglers that break any linear scaling assumption.
  • Shuffle amplification: Operators like GROUP BY trigger intermediate data shuffles; input table size severely underestimates the real network and compute cost.

Existing pipelines rely on static, manually engineered features that under-capture runtime effects, and predictive signals are scattered across logs, metadata, and job scripts -- lengthening update cycles and increasing engineering overhead. The result: enterprise ML workflows for regression and forecasting still rely on manual feature engineering and brittle glue code, which slows adaptation to workload drift and platform evolution -- and in Databricks job orchestration, a small prediction error can translate into repeated mis-provisioning across thousands of daily runs.

Three agents, one pipeline

LeJOT-AutoML replaces the manual feature engineering cycle with a closed loop of three LLM agents, each with a distinct role. The key infrastructure underneath them is MCP (Model Context Protocol) -- an open protocol developed to standardize the integration between LLMs and external tools, data sources, and prompts, introduced by Anthropic to provide a universal method to replace fragmented integrations with a unified protocol for AI agents. In this context, MCP gives the agents a clean, sandboxed interface to query logs, metadata stores, and run read-only SQL -- without any bespoke connector code.

Architecture diagram of LeJOT-AutoML showing the three-agent training pipeline and inference integration

The three agents work in sequence:

  1. Feature Analyzer Agent (FAA): Uses retrieval-augmented generation (RAG) -- a technique where the model looks up relevant documents from a knowledge base before generating a response -- to query a Spark SQL and platform knowledge base. It proposes a structured list of candidate features, each tagged with its source (log, metadata, or job script), extraction plan, and expected compute cost.
  2. Feature Extraction Agent (FExA): Takes the FAA's feature list and materializes it. It generates Python extraction code, runs it through the MCP toolchain (log parsers, metadata queries, sandboxed SQL), and produces a typed feature vector. Independent extractors run in parallel; results are cached by job signature and data snapshot to avoid redundant reads.
  3. Feature Evaluation Agent (FEvA): Runs a multi-level audit -- checking feature coverage (missing rate), stability over time, redundancy via SHAP-style importance scores, and end-to-end model impact through ablations. It then writes a feedback packet back to FAA and FExA to refine the next iteration.

Two safety gates sit between code generation and execution. The code-completion checker blocks any extractor with missing imports, undefined variables, or schema mismatches. The data-leakage checker enforces a hard rule: a feature must be computable from information available before a scheduling decision is made -- it cannot use post-run artifacts that would make the prediction trivially easy but useless in practice.

200 features in 30 minutes vs. 40 features in a month

The numbers tell a clear story. On enterprise Databricks workloads, the automated pipeline generates more than 200 features spanning log profiling, time-series statistics, and driver-node history. Manual engineering produces around 40, mostly derived from node-configuration history. The feature sets also look fundamentally different -- the top AutoML feature, duration_seconds_lag_1 (the previous run's duration), accounts for 28.8% of model importance, while manual engineering's top feature, vcpu_ratio, accounts for 16.2%. AutoML leans heavily on temporal and workload-derived signals; manual engineering leans on static resource ratios.

Here is how the two approaches compare end-to-end:

MetricAutoMLManual
Number of features200+40+
Engineering time20-30 min (3 iterations)~1 month
R²0.810.91
MAPE20.13%19.49%
Cost savings (in LeJOT)19.01%27.94%

The iterative feedback loop matters too. Over three FEvA cycles, the baseline XGBoost model's MAE drops from 247.95 to 145.64 and R² climbs from 0.61 to 0.81 -- all within a single 20-30 minute session. The system uses Qwen-235B for agent reasoning and XGBoost as the final predictor.

Where it falls short

The accuracy gap versus manual engineering is real and worth understanding. Manual features achieve R²=0.91 vs. AutoML's 0.81, and cost savings of 27.94% vs. 19.01%. The root cause is access to configuration-change history. Manual engineers explicitly encode instance family transitions, configuration-price mappings, and cluster sizing trajectories. The current MCP toolset provides configuration snapshots but not the full change trajectory or pricing context, so the FAA under-represents resource-history signals. When instance types are upgraded or Photon acceleration is enabled, the manual model adapts more accurately than the AutoML model.

The system also has non-trivial latency in the training loop. The Feature Analyzer Agent takes 223-298 seconds per run, and the data-leakage checker takes 172-325 seconds -- both dominated by LLM inference costs. The code-completion checker, by contrast, runs in under 10 milliseconds.

What this unlocks in practice

The real breakthrough here is not the accuracy number -- it is the maintenance story. Managing the escalating operational costs associated with job execution remains a critical challenge, and existing solutions rely on static configurations or reactive adjustments which fail to adapt to the dynamic nature of workloads. LeJOT-AutoML addresses this by enabling continuous model updates triggered either on a daily schedule or when prediction residuals exceed a drift threshold -- no human in the loop required.

This is directly useful if you are running large-scale Databricks workloads and need to:

  • Automatically adapt your execution-time predictor as workloads evolve without dedicated ML engineering time
  • Surface runtime-derived features (shuffle volume, partition pruning effectiveness, stage imbalance) that are invisible to static analysis
  • Reduce the feature engineering cycle from weeks to under an hour for new job types or platform upgrades
  • Maintain a traceable, versioned feature specification for compliance and debugging

No code or model weights have been released publicly alongside the paper. The system is described as deployed internally at Lenovo on their LeJOT platform, with the paper serving as the primary reference. The approach is general enough to adapt to other distributed compute platforms beyond Databricks, wherever execution-time prediction drives resource allocation decisions.