Modeling with 30 Data Points: Hierarchical Collaboration Between Reasoning Models and Surrogate Models

    When only a few dozen experimental records are available, conventional models often struggle with overfitting, unreliable confidence ranges, and limited interpretability. This article describes a two-layer workflow that uses a surrogate model for broad candidate screening and an LLM reasoning model for focused review of boundary cases. It also compares two chain-of-thought construction methods, provides a structured prompt template, and discusses local deployment requirements and evaluation considerations.

    Why Conventional Models Are Not Enough with Only Tens of Data Points

    In chemical R&D, a research group often has only about 30 complete experimental records but needs to predict the properties of hundreds of candidate molecules. Such data is small, high-dimensional, and nonlinear. Random forests and gradient boosting can easily overfit when samples are few, and their numerical outputs usually do not come with reliable confidence ranges. Gaussian processes can provide predictive variance, but they are computationally expensive in high-dimensional molecular descriptor spaces and are sensitive to assumptions about the kernel function and data distribution.

    Most of these models are black boxes and cannot answer questions such as “why does this structure raise the flash point?” For teams that need mechanistic understanding to improve processes or design molecules, this is a significant limitation.

    What LLM Reasoning Models Can and Cannot Do

    General large language models are good at generating fluent text, but their answers may be vague or even inconsistent on questions involving the combined effects of multiple functional groups. Reasoning models trained with chain-of-thought can decompose a problem step by step, examine interactions between molecular fragments, and produce testable hypotheses. With very little data, for example, a model might propose that “a combination of a nitro-containing aromatic ring and a long alkyl chain may reduce water solubility” for human experimental validation. Such conclusions are hypotheses to be tested, not confirmed rules.

    Traditional tree models, or manually added interaction terms, can also capture some interaction relationships, but the interpretation cost is higher. The advantage of reasoning models is that they write the reasoning process in text, making each step easier for humans to review.

    Directly using reasoning models also has three issues. First, when prompts are incomplete, the model relies on prior knowledge from pretraining to make guesses. Second, the model’s own chemical knowledge may be outdated or incorrect and needs to be calibrated with experimental data. Third, local deployment must consider load time, VRAM usage, and inference latency. Fine-tuning on only 30 records can easily lead to overfitting or forgetting of existing capabilities. Typically, only after data accumulates to hundreds of records is it worth considering low-rank adaptation (LoRA).

    Designing a Hierarchical Workflow

    The hierarchical architecture divides work between two types of models. The surrogate model handles broad screening, and the reasoning model only processes a small number of samples that need closer review.

    The input to layer 1 is existing experimental data and descriptors of candidate molecules to be screened. The output is the predicted mean, standard deviation, and an uncertainty-ranked list for each candidate. Training and scoring of the surrogate model usually complete in seconds to minutes, so it can cover thousands of candidates.

    The input to layer 2 is the boundary samples selected by layer 1. Selection rules should be written as configurable parameters:

    • Select candidates whose predicted standard deviation is in the top 10% of the validation-set distribution, with at most 10 sent to the reasoning model per round;
    • If a candidate’s predicted mean is already clearly outside the target range, do not send it to the reasoning model even if its standard deviation is large;
    • Write each round’s results to a log, recording sample ID, model version, quantization method, and random seed.

    The output of layer 2 is structured JSON, including the predicted value, confidence judgment, referenced training sample IDs, and suggested additional experiments.

    A fallback strategy must be defined in advance. If the reasoning model times out, fails to load, or its output fails JSON validation, retry once. If it still fails, keep the surrogate model’s ranking and mark the sample as “needs manual review.” In this way, a single component failure does not interrupt the workflow.

    Applicability boundaries should also be stated. With fewer than about 10 samples, the surrogate model’s uncertainty estimates are usually unreliable, and this workflow is not recommended. When the number of descriptors far exceeds the number of samples, features should first be selected based on chemical meaning; otherwise Gaussian processes and random forests are both prone to failure. If candidate molecules differ greatly in structure from the training set, the surrogate model may underestimate uncertainty, and such cases should be additionally labeled as “outside the applicability domain.”

    Choosing Between Two Chain-of-Thought Construction Methods

    Method 1 is pure language-guided LLM-CoT. The prompt directly contains experimental data and reasoning steps, for example requiring the model to list descriptors, analyze correlations, consider interaction effects, and finally give a prediction with justification. It requires no training, deploys quickly, and is suitable for prototype validation. The downside is that small changes in prompt wording can change results, and the model may generate explanations without empirical support. The prompt should include a constraint to “state uncertainty when evidence is insufficient” and require citations of specific sample IDs.

    Method 2 is data-driven ML-LLM-CoT. Outputs from the surrogate model, such as predicted mean, standard deviation, and feature importance ranking, are fed as additional context to the reasoning model. The reasoning model must explain why the surrogate model is uncertain about a sample and propose chemical hypotheses that could reduce that uncertainty. Because the input includes numerical evidence, results are usually less affected by prompt wording, but this must be verified on your own data. Implementation is more complex and requires a well-designed data interface.

    Comparison item Method 1: Pure language LLM-CoT Method 2: ML-LLM-CoT
    Deployment cost Low, only prompts are needed Medium, requires a surrogate model and data interface
    Stability Sensitive to prompt wording Has numerical evidence and is less affected by wording
    Interpretability Depends on textual reasoning and may hallucinate Can be cross-checked against surrogate model outputs
    Suitable scenarios Rapid validation, exploratory analysis Production workflows that need repeated use
    Main risk Explanations without empirical support Errors from the upstream surrogate model propagate to reasoning results

    Prompt templates can be standardized into a structured format for easier version management. The placeholders below need to be replaced with actual values at runtime:

    1. {
    2. "task": "Predict organic molecule boiling point",
    3. "target": "boiling_point_C",
    4. "n_train": 30,
    5. "descriptors": ["MW", "TPSA", "rotatable_bonds", "HBA"],
    6. "surrogate": {"model": "RandomForest", "mean": "<mean>", "std": "<std>", "seed": "<seed>"},
    7. "candidate_id": "<candidate_id>",
    8. "instruction": "Analyze step by step. State uncertainty when evidence is insufficient, cite training sample IDs, and output in the agreed JSON format."
    9. }

    Local Deployment Requirements

    The following are rough empirical magnitudes. Results vary widely across quantization formats and inference frameworks, and measurements on the target machine should be treated as the source of truth.

    • 7B parameters, INT4 quantization: weights require about 4 GB of VRAM. After adding context cache, an 8 GB GPU may be tight.
    • 14B parameters, INT4 quantization: weights require about 8 to 9 GB of VRAM. A GPU with 12 GB or more is recommended to leave headroom.
    • Without a GPU, CPU execution speed depends on memory bandwidth and core count and must be measured.
    • Reasoning model outputs are long, and generation length directly determines single-call latency. Set a maximum generation token count, for example 1024 to 2048, and record the time of each call.
    • The surrogate model is implemented with scikit-learn, and training usually completes in seconds. Always fix the random seed to ensure reproducibility.
    • Prompt templates, model versions, and quantization parameters should be under version control to trace the source of a given prediction.

    How to Evaluate the Method and Avoid Misreading Results

    When evaluating the approach, both workflows must be compared under consistent conditions so that the results are not misread.