Manuscript Offprint

arXiv:2610.12390

Long Text to Predictive Features: LLM-Guided Blockwise Feature Engineering via Executable Program Search

Ziming Dai, Dabiao Ma, Ziheng Guo, Jack Dong, Zimu Zhou

Ziming Dai ∗^{*}

City University of Hong Kong

Hong Kong, China

phoenix.dai@my.cityu.edu.hk

Dabiao Ma ∗^{*}

Qfin Holdings, Inc.

Beijing, China

madabiao-jk@qifu.com

Ziheng Guo

Tianjin University

Tianjin, China

sygzh6@tju.edu.cn

Jack Dong

Carnegie Mellon University

Pittsburgh, USA

jack.dong@bytedance.com

Abstract

Industrial risk-control systems typically rely on structured-data models for efficient prediction, yet substantial valuable information remains embedded in unstructured long text. Extracting this information through manual feature engineering is labor-intensive, while requiring a large language model (LLM) to process every real-time input may not meet practical deployment requirements. To address this challenge, we propose LLM-BlockFE, an LLM-guided offline feature construction framework that converts long text into executable feature programs, thereby avoiding LLM calls during online inference. LLM-BlockFE constructs feature programs by incrementally appending immutable code blocks and evaluates candidate features using a downstream model. To address the tendency of conventional greedy search to become trapped in suboptimal solutions, our method introduces a block-level rollback mechanism based on depth-calibrated credit allocation and advances multiple independent search trajectories in an interleaved manner, reducing redundant exploration by sharing fixed descriptions of each trajectory's exploration direction. After the search, the resulting programs are frozen and deployed to extract structured features for downstream prediction models. Across two public and two private datasets, LLM-BlockFE achieves absolute AUC improvements of 0.0069 to 0.0358 over the strongest baseline on each dataset in the full-dataset comparison. Post-launch monitoring across five deployed financial risk-control applications shows absolute KS improvements of 0.02 to 1.56 percentage points over the existing manually designed strategy.

Keywords

Automated Feature Engineering, Large Language Models, Unstructured Long Text, Program Synthesis, Interpretability

References (32)