Back to all blogs

DataClerk: A Pocket Analyst for Business Owners

Dec 26, 20254 min readTechnical
DataClerk: A Pocket Analyst for Business Owners

Business owners shouldn’t need a Computer Science degree to know how much money they made today.

Picture this. You’re at dinner, on the road, or between meetings when a question suddenly pops into your head: What was the revenue last Tuesday? or How much stock is left in the warehouse? In that moment, you have only two frustrating choices. You either call your analyst or IT person—who is probably unavailable—or you try to navigate a dense dashboard on a small phone screen. Neither option feels right for something as simple as getting a number.

 

Data shouldn’t be locked behind a technical skill barrier. That thought is what led to the idea of DataClerk.

 

DataClerk is an Android application that acts like a pocket data analyst for small business owners. You don’t write SQL queries. You don’t open spreadsheets. You don’t dig through dashboards. You simply ask a question in plain English, such as “Show me the top five products by revenue.” Behind the scenes, the app uses Google Gemini 2.5 to translate that sentence into a SQL query, runs it against a PostgreSQL database, and returns the result as a chart or a table within seconds.

 

The prototype works beautifully. The experience feels almost magical. But building something that works is very different from building something that is ready for real businesses at scale.

 

Right now, each question from the app triggers multiple network calls. The app talks to the AI service, waits for a response, sends the generated SQL for execution, fetches the results, and then asks the AI again how to present them. This back-and-forth works in a demo, but it is inefficient and costly in production. The obvious architectural improvement is to introduce a Backend for Frontend (BFF). With this approach, the mobile app makes a single request, and the backend handles the AI interaction, SQL execution, and response formatting before sending one clean result back. Fewer round trips mean better performance and lower cost.

 

Another realization was that not everything needs AI. Once the query results are available, deciding whether to show a bar chart, a table, or a line graph does not require a large language model. Simple deterministic logic written in Kotlin can do this faster, cheaper, and more reliably. AI should be reserved for the part where intelligence is actually required: translating natural language into SQL.

 

The long-term vision goes even further. With Gemini Nano and Android’s AI Core capabilities, SQL generation could happen directly on the device. This would remove cloud latency, eliminate API costs for many queries, and significantly improve privacy since raw schema details and queries wouldn’t have to leave the device.

 

There is also the challenge of database size. Real business databases have large schemas with dozens or even hundreds of tables. Sending the entire schema to a language model for every question is a waste of tokens and money. A better approach is to use Retrieval Augmented Generation (RAG). By storing table metadata in a vector store and retrieving only the relevant parts of the schema for each question, the system can provide better context to the model while keeping token usage under control.

 

This is why DataClerk is not meant to be just another “AI wrapper.” The goal is to design a system that business owners can genuinely use and engineers can confidently scale. It’s about using AI thoughtfully, reducing dependency where possible, and building an architecture that makes sense in the real world.

 

If you are a developer curious about the architecture, or a business owner who sees value in this idea, you can explore the project repository here:

 

GitHub: https://github.com/unnikrishnanNam/DataClerk

Note: The Script Executor (backend component) is not included yet. More details are available in the README.

In the end, data should answer questions without demanding technical skills. A business owner should be able to ask, “How is my business doing?” and get an answer instantly. DataClerk is a step toward making that possible.