TM

PrompText

Author

Tushar Maurya

Date Published

Why AI in SMS?

The default "Messages" app on Android is a minimal affair. It does what it intends to do perfectly.

The problem I face is that SMS texts (like phone calls) have become a free-for-all for spammers, while at the same time delivering critical information. I don't want to put a generalized spam filter and miss that one text that gently informs me of a scammer who just used my credit card to buy himself an Amazon gift card.

The solution is straightforward: LLMs. There are a number of apps floating around that probably use an OpenAI API to filter texts and are probably great at it. The problem lies in the implicit trust you have to place in these apps and APIs managing sensitive information. Especially in India, SMS is a gateway to OTP—a key that opens many locks, from online shopping to government issued identification.

A basic solution to this is to use an open source model like gemma on-device and design a prompt that allows filtering—there are probably good prompts out there already.

What I decided I need to add are two things:

Customizable basic regex filters that manage some keywords with minimal compute and latency. This will let keywords like "OTP" or "Transaction" through, bypassing other filtering.

Customizable LLM prompt that will be used as a secondary filter to categorize the texts—mainly for notifications (sounds, banner, etc.) and automatic sorting.

Essentially, once I am done building the baseline app, I don't want to tweak it to adjust my filters—it should be configurable within the app.