Spam Email Classification using Ellmer and Malls

Click here for a video coding vignette using the ellmer and mall packages to classify text messagess into spam or legitimate
Author

George I. Hagstrom

Published

November 13, 2025

In this coding vignette I use the ellmer and mall packages to classify the text messages in the UCI ML database SMS Spam Collection into spam or legitimate. For some reason I thought these were emails which is a bit funny if you look at them closely, so forgive me for any confusion.

To follow along with the vignette you need to have an api-key or use a local model, which is what you will need to do the homework.

Click here to watch the video

The live code that was used for this vignette can be found on github at LLM-vignette-live.R. In that same directory you can find the SMSSpamCollection file and the two prompt markdown files that I used.