- The paper introduces MLAT, a design pattern that lets LLM agents selectively invoke pre-trained models through schema-constrained tool calls and interpret predictions alongside contextual information.
- The PitchCraft case study combines an XGBoost pricing model with LLM agents, achieving a test R² of 0.807, a $3,688 MAE, and proposal creation in under 10 minutes versus more than three hours.
- The framework delivers sub-100ms model inference and flexible model registration, but its broader reliability remains limited by a 70-record dataset, 43% synthetic data, uncalibrated uncertainty, and single-domain validation.
This paper introduces Machine Learning as a Tool (MLAT), a design pattern in which pre-trained statistical ML models are registered as callable tools within LLM agent tool registries, so that the orchestrating LLM decides when to invoke the model, receives the prediction as a tool response, and reasons about it contextually before producing output (2602.14295). The authors argue that although tool-calling is now standard in agentic frameworks such as LangChain, AutoGen, CrewAI, and n8n, the tools exposed to agents are overwhelmingly API-based services (web search, database queries, code execution), and that registering trained statistical models—XGBoost, random forests, logistic regression—as first-class agent tools has not been formalized in the literature or documented in production architectures. They acknowledge this claim carefully: they cannot assert exhaustive coverage of all production systems, only that their review of major framework documentation and agentic AI surveys surfaced no published examples.
MLAT is defined formally: given an agent A with tool registry T and structured context z, a schema-constrained extraction function ϕ maps z to a feature vector x∈Rd, which is passed to a deployed model fθ via a tool call returning y^=fθ(x). Invocation is governed by the agent's own reasoning rather than by pipeline control flow. The paper contrasts this with three conventional patterns: static pipelines (unconditional preprocessing, no contextual reasoning), ensemble/hybrid designs (parallel invocation combined by voting or weighting), and RAG+ML (indirect involvement through retrieval). The distinguishing property is agency—the LLM determines whether, when, and how to call the model.
Five design principles are proposed: schema-bridged inputs using structured output parsing; stateless, sub-100ms endpoints matching other tool latencies; prediction transparency via metadata such as confidence and feature importances; model-agnostic registration allowing upgrades without workflow changes; and agent-controlled invocation. Notably, the PitchCraft implementation does not yet return calibrated uncertainty or prediction intervals—a gap the authors concede explicitly.
Structured output architecture
The framework relies on Gemini's JSON schema-constrained generation as the bridge between LLM reasoning and ML feature vectors. The Research Agent's output schema includes provenance metadata (source, confidence level, year) alongside extracted values such as annual revenue; the Draft Agent uses this metadata to weight the reliability of downstream predictions. Schemas function as inter-agent contracts analogous to API contracts in microservice architectures, guaranteeing field presence and typing across the two-agent boundary. Final proposal generation maps structured JSON fields into a Google Docs template via find-and-replace, completing an automated document pipeline.
PitchCraft case study
PitchCraft transforms discovery call recordings into complete proposals. A Fireflies.ai webhook delivers transcripts; the Gemini-powered Research Agent performs parallel tool calls to Firecrawl (revenue lookup) and Perplexity (background research), plus dedicated LLM calls for pain severity and integration complexity scoring on 1–5 scales. The Draft Agent extracts six features—client revenue, estimated duration, pain severity, integration complexity, project phase, and tech stack—one-hot encoded at inference into x∈R8—and invokes an XGBoost FastAPI endpoint as the MLAT tool call before generating the full proposal JSON.
Small-data ML methodology
The training set comprises N=70: 40 real agency deals spanning 22 industries and 30 synthetic records generated by an LLM conditioned on the real data's distributions, then manually verified by the authors for plausible feature–price relationships. Synthetic records received unique client group IDs to prevent leakage. This 43% synthetic composition is a substantive dependency of the reported results, and the authors flag it as requiring validation against larger real datasets.
Leakage prevention uses GroupShuffleSplit with manually assigned client groups so all phases of multi-phase clients stay within one split (56/14 train/test). Feature engineering was deliberately conservative: industry was excluded despite 22 unique values to avoid dimensionality explosion, yielding a 7:1 sample-to-feature ratio. Hyperparameters favor regularization (50 estimators, max depth 3, learning rate 0.05, subsampling 0.8, min child weight 3). Three-fold GroupKFold respected client boundaries.
Results
| Metric |
Train |
Test |
CV |
| T0 |
0.937 |
0.807 |
0.816 ± 0.060 |
| MAE |
$\mathcal{T}$13,688</td>
<td>$\mathcal{T}$2629</td>
<td></td>
</tr>
<tr>
<td><a href="https://www.emergentmind.com/topics/root-mean-squared-error-rmse" title="" rel="nofollow" data-turbo="false" class="assistant-link" x-data x-tooltip.raw="">RMSE</a></td>
<td>$\mathcal{T}$34,720 |
— |
|
| Relative MAE |
14.3% |
22.6% |
23.9% |
The close agreement between CV and test $\mathcal{T}$4 supports reliable generalization despite the small sample. XGBoost outperformed Ridge regression substantially on CV $\mathcal{T}5(0.816vs.0.565),indicatingnonlinearfeatureinteractionsmatter;ablatingintegrationcomplexitydegradedCV\mathcal{T}$6 from 0.816 to 0.599, identifying it as the dominant feature. The train/test RMSE ratio of 0.61 indicates mild overfitting, which the authors characterize as expected at $\mathcal{T}$7. Predictions show regression-to-the-mean behavior at price extremes—overestimation mid-range, underestimation at high values—consistent with limited tail coverage.</p>
<p>A univariate <a href="https://www.emergentmind.com/topics/sensitivity-analysis" title="" rel="nofollow" data-turbo="false" class="assistant-link" x-data x-tooltip.raw="">sensitivity analysis</a> around a baseline project shows monotonic, economically coherent pricing: pain severity 1→5 yields roughly a 2.6× price increase (~$\mathcal{T}$813,500) and integration complexity 1→5 roughly 3.0× (~$\mathcal{T}$914,800). This is offered as evidence the model learned signal rather than memorized noise, though it remains indirect evidence given the dataset size.
The authors argue a relative MAE of 22.6% is commercially acceptable precisely because of the MLAT structure: the point estimate serves as a statistically grounded anchor while the Draft Agent adjusts for qualitative factors (client relationship, competitive landscape). This division of labor is the central empirical claim supporting the pattern's value.
Deployment impact
In pilot production at Legacy AI LLC, the system reduced proposal creation from 3+ hours to under 10 minutes (18× faster), speed-to-lead from 2–3 days to 2–4 hours, and standardized pricing variance. Inference latency is under 100ms; end-to-end runtime of 2–3 minutes is dominated by LLM reasoning and document generation. The "pilot production" designation is deliberate: with 40 real deals, the authors state generalization claims across industries are not warranted.
Limitations and open questions
The paper concedes several constraints directly. The small dataset limits extrapolation to novel industries or extreme prices. Validation is single-domain (agency pricing); multi-domain evidence is absent. There is no feedback loop incorporating deal outcomes (won/lost, negotiated prices) for retraining. Pain severity and integration complexity are LLM-assessed, introducing potential input variance across runs—an unquantified source of feature noise. Point estimates lack calibrated uncertainty quantification, undermining the stated principle of prediction transparency. Finally, the 43% synthetic share means the reported metrics may not transfer to fully real-world data distributions. Specific open questions include whether LLM-derived ordinal features remain stable across model versions, and whether MLAT's benefits persist when calibrated prediction intervals replace point anchors.
Conclusion
The paper formalizes MLAT as a design pattern, demonstrates it end-to-end in a production pilot, and reports a defensible small-data ML result (z0 test, MAE $3,688) achieved under a 7:1 sample-to-feature ratio with group-aware validation. Its strongest contribution is architectural: showing that schema-constrained structured outputs can reliably bridge LLM reasoning and ML feature vectors, and that agent-mediated interpretation can absorb the error margins inherent in small-data models. Broader empirical validation across domains and larger datasets remains necessary before the pattern's generality can be established.