arXiv:2610.10227cs.LGOct 2026

Manuscript Offprint

arXiv:2610.10227

From Prompts to Trees: Effective LLM-Guided Tree Generation for Few-Shot Tabular Classification

Yue Qiu, Zekang Du, Yiqun Diao, Bingsheng He, Qinbin Li

Abstract

While Large Language Models (LLMs) possess rich world knowledge and impressive generalization capabilities, their direct application to tabular data classification is hindered by high inference costs and limited interpretability. In contrast, decision trees are fast and transparent but often underperform in low-data regimes. In this work, we propose a novel framework that bridges these paradigms by distilling LLM knowledge into interpretable decision trees under a few-shot learning setting. Instead of directly prompting the LLM to generate full trees, which is often unstable and inefficient, we develop a three-stage paradigm that prompts the LLM to generate rules and organize the rules into a tree. Experiments on multiple real-world tabular datasets demonstrate that our method achieves superior accuracy and interpretability with significantly lower prompting overhead compared to existing baselines.

1 Introduction

Large Language Models (LLMs) (OpenAI, 2023; Touvron et al., 2023; DeepSeek-AI et al., 2024; Naveed et al., 2025; Bai et al., 2023) have demonstrated remarkable capabilities in various domains, including code generation, planning, and complex problem-solving tasks. Despite these advancements, their potential remains significantly underexplored in the context of traditional tabular data classification (Shwartz-Ziv and Armon, 2022; Borisov et al., 2024). Tabular data is still the widely used format of data in reality, and is ubiquitous in critical domains such as healthcare diagnostics, financial risk assessment, and customer behavior prediction.

Although LLMs inherently possess extensive knowledge, their direct application to tabular data classification faces two prominent challenges: (1) limited interpretability, making it difficult to provide intuitive justifications for classification decisions, and (2) inefficiency in inference, which restricts their applicability in resource-constrained and real-time scenarios. Decision trees (Loh, 2011; Chen and Guestrin, 2016; Ke et al., 2017; Rokach and Maimon, 2014; Quinlan, 1986, 1993), on the other hand, are widely adopted for tabular data classification due to their inherent interpretability, high computational efficiency, and ability to capture non-linear relationships between features. It has been a dominant model for tabular data classification for a long period. However, traditional tree training requires substantial labeled data to capture non-linear feature interactions. While LLMs can extract prior semantic knowledge from textified features to compensate for this data scarcity, combining them as a knowledge source and an efficient executor remains a challenge in practical few-shot settings.

This raises an important question: can we present the knowledge of LLMs by decision trees for tabular data classification in few-shot settings? If successful, such a tree representation would simultaneously inherit the LLM's rich prior knowledge while retaining the interpretability and fast inference of decision trees, thereby addressing the key limitations of directly applying LLMs to tabular classification. A straightforward approach is to prompt the LLM once to directly generate a tree to represent its knowledge. However, this yields unreliable results due to the inherent complexity and instability of long-context reasoning. Another method is to generate the reasoning process by prompting multiple times. For example, Tree-of-Thought (Yao et al., 2023) approaches involve recursively prompting LLMs to generate the reasoning paths in a tree structure. Nevertheless, such methods suffer from substantial prompting overhead when applied to tabular data classification, rendering them impractical for wide adoption.

  • Equal contribution.

† Corresponding author.

In this work, we propose LLMT, a modular and efficient framework that distills LLM knowledge into decision trees through a three-stage pipeline: (1) Rule Generation, where the LLM produces structured, machine-parseable classification rules; (2) Tree Assembly, where these rules are organized into a tree based on Gini impurity computed from a small labeled dataset; and (3) Leaf Refinement, where the LLM corrects noisy leaf decisions. Unlike prompting-based methods such as Chain-of-Thought (CoT) and Tree-of-Thought (ToT), which construct a reasoning chain or tree in a single pass or through recursive expansion, LLMT breaks the task into distinct stages. Our experiments show that this modular design improves both stability and efficiency.

Our contributions are as follows:

• We introduce a novel three-stage distillation paradigm that bridges the gap between expensive, opaque LLM reasoning and efficient, interpretable tree models.

• We provide a formal generalization analysis of LLMT under explicit structural assumptions, clarifying its statistical properties.

• We conduct extensive experiments on 11 datasets with 17 baselines, reporting accuracy and efficiency across different settings.

• We show that LLMT achieves consistent and significant accuracy improvements, large token-cost savings, and interpretable outputs in the few-shot setting.