This is a continuation of my series from the “AI-Enhanced App” talk I gave at Swift Bharat. Previous posts:
✨ Just Add AI ✨
When most of us think of adding AI to our apps, we think of additional API calls we have to make to third-party providers that costs real money and compromise user privacy. While this can be the best solution for your product, in many many cases, AI can be used to instead process some data in a unique way or produce an output only ONE TIME in a way that can significantly enhance your app, and even create a whole new product category that never existed before!
There are two ways to do this:
Batch Processing via a Model Provider API
If you have a finite data set, you can use a Model Provider’s API to batch process the data in truly unique ways that may have never been possible to do before. Batch processing costs less (~50% off! and prompt caching!), and once you get your result, you own it. It’s a one-time up-front investment that brings something unique to your app.
I do this all the time for my app, Sanskrit Lexicon, a Sanskrit-English dictionary. A dictionary has a set list of data, such as words, and definitions. And the original data is really difficult to work with. So I love using Gemini models to batch-process the data in useful ways. I do this so often, I even built a Mac app to manage my Gemini Batch processing requests and a JSONL Beautifier for quickly checking my batch processing files and outputs.
I’ll give an example. The original Sanskrit-English definitions came from British scholars in the 1800s. So a simple definition for a word, such as Yoga, looks like this (but usually much worse!):
I batch-processed the complex scholarly definitions to produce “simplified” versions for non-scholars. This is the simplified result for the same definition:

Nobody has ever done this before, since Sanskrit-English dictionaries are primarily used in academia. So this creates a full new category of opening up the dictionary to a wider audience. And even as an academic, this is super useful for just scrolling quickly to check the basic definition before diving into the scholarly one.
This adds HUGE value to the user without adding any of the AI-risks to my app. I paid the API fees up front and now I own the output data.
This can also be done in combination with a Python script. Many of my data-processing tasks can be done just with code (e.g. stripping HTML tags) up front, with only complicated non-standard entries going through an LLM API for more complex processing, making the up-front costs even cheaper.
Depending on your task, you can test out cheaper models, like Gemini Flash Lite or even run it via open source models to reduce costs further.
Training / Fine-Tuning your Own Model
For some super specialized tasks, the model API providers may not be enough. Or maybe the API provider costs too much or you want your own data kept private. In that case, you can train your own model or fine-tune one to fit exactly the output you need. You run your data through it, get the output, then throw away the model. No need to keep hosting it, making an API for it, or any other overhead.
As an example, I wanted to create an audio pronunciations for each Sanskrit dictionary word. So I found an open source model on Hugging Face that could do most of this, and fine-tuned it to be almost perfect. Unfortunately, I still wasn’t 100% happy with the result, so I’m taking it further and getting my own voice recordings and then fine-tuning the model more to make it sound exactly how I want.
I will then run all my words through it, save the audio files, then serve them to the user in the app. Again, this has never been done before, and brings tremendous value and another unique selling point to my app.
While it’s great that we have generalized LLMs that are “good at everything,” getting them to fit EXACTLY to your one specialized task just feels so satisfying! It also creates a mote for your app, since a user cannot just prompt ChatGPT to get the same high-quality output.
Conclusion
When you think of “adding AI” to your app, don’t just think in real-time. You can process your data in new and unique ways behind the scenes, and actually solve big categorical problems without your users even knowing “it was AI” or dealing with the headaches of “adding AI to your app.”
Have you tried doing this already? Let me know in the comments! I love getting new ideas!


