Supercharge Legacy ML Models with LLMs

Generative AI is amazing, but sometimes legacy machine learning approaches work better. Here’s how you can combine LLMs with traditional techniques to get the best of both.

Kevin Dewalt
Actionable AI
Published in
2 min readApr 1, 2024

--

Welcome to Episode 34 in Prolego’s Generative AI series.

Large-language models have demonstrated amazing ability to process text and reason. Unfortunately, they do have several limitations.

LLMs can struggle with structured data or performing calculations. They are also slow and can’t handle large datasets. While generative AI is getting better very fast, sometimes models trained through supervised learning techniques are better options.

Fortunately, you can get the best of LLMs and other solutions by using them together. Let’s walk through a scenario. Suppose you have a large data warehouse of products and purchasing history, and you’ve built a recommendation engine using collaborative filters. Here’s how you can improve it with LLMs.

Use models as tools for LLMs. You can use LLMs to call your machine learning models and pass specific parameters. For example, you could use the LLMs to extract features from partner invoices, and pass them to your recommendation engines for more targeted results.

Generate training data with LLMs. Getting quality training data is one of the biggest challenges in machine learning, particularly when you are trying to train a model on infrequent scenarios. You could use LLMs to generate examples of infrequent purchasing scenarios and improve your recommendation engine on edge cases.

Extend models with LLMs. Traditionally, extending models requires more data and feature engineering. It may be easier to extend a model by passing its output to an LLM for reasoning. For example, an LLM can take a general recommendation engine and improve the results by supplementing it with real-time information from customer emails or chat.

Increase data scientist efficiency with LLMs. Data scientists can use LLMs for fast feature generation and exploratory data analysis instead of doing all work in notebooks.

Here’s the bottom line:

You are not choosing between traditional techniques and generative AI, but looking for the best opportunities to introduce LLMs to your workflow. Right tool, right job.

--

--

Kevin Dewalt
Actionable AI

Founder of Prolego. Building the next generation of Enterprise AGI.