AI part 3: Putting it all together

AI
Modelling
Marketing
Author

RiskCede

Published

March 1, 2025

The final part of this series describes how we can combine Machine Learning (ML) models with Large Language Models (LLM) to create an automated workflow.

What follows is a basic process where a machine learning model creates a classification result for a list of users stored in a database. The data contains various parameters that are used to classify each user on how likely they are to invest in a certain product in the next three months.

Once the classification is completed a large language model is used to create email content for a marketing campaign to these users. The model uses dynamic prompting to generate a unique email to each user. This means that the LLM uses the parameters stored in the database to draft a message specific to the user. It also uses the ML model’s classification output to include only the product the user will most likely be interested in.

This process flow can be further improved by scraping web data, eg social media, to make the message even more personal and targeted to each user.

It can also be processed in real-time, eg based on a trigger like the purchase of a new vehicle etc.

Demonstration

Step 1: Train ML model and deploy as API

The ML model was trained on a 100 000 users’ data and is deployed locally on a server in our network and exposed through an API to make real-time calls to it.

View the model here.

Step 2: Results to LLM

All AI models, both ML and LLM are hosted internally. This means that the data sent to the model does not leave the network, it stays confidential and secure.

Sensitive or proprietary information never leaves our local environment, minimizing exposure to third-party data breaches. It ensures better regulatory adherence and the possibility to increase security protocols.

Step 3: Use LLM to classify free text as a categorical value and use as input in the ML model

This can be seen as a type of feature engineering, a way of creating variables to use in our ML model. In this case were using free text to generate a categorical value, something similar could be to deduct user sentiment based on a product review.

Real life application

In a production application this process would run automatically without user intervention. It would be triggered by an event or based on a schedule.

The process gets logged and is monitored through a dashboard or regular report. The data could also be compared with upstream sales or transactions to measure its effectiveness.

Below is a visual demonstration of each step.


Read AI part 1←

Read AI part 2←


Subscribe to our blog


RiskCede DSaaS

Harness the power of advanced AI modeling with RiskCede’s DSaaS, delivering cutting-edge analytics to drive growth and efficiency without the complexity or cost of in-house solutions.

To learn more, contact us today→