Vaidehi S. N. K. has released Udhaar, an open-source AI back-office designed for corner shops that rely on handwritten credit notebooks. Submitted for the Hacktoberfest Open-Source AI Challenge, the tool demonstrates that local inference using Gemma 3 and TabPFN can replace cloud-dependent POS systems in low-connectivity environments. The project targets the 'udhaar' system common in Indian kirana stores, as well as similar credit practices in Mexico, the Philippines, and Indonesia.
Solving the Edge Case for Retail Credit
The core problem Udhaar addresses is the friction of existing digital ledgers, which require typing during evening rushes and uploading sensitive debt data to remote servers. Vaidehiβs solution runs entirely on a shopβs local hardware, specifically targeting laptops with modest specs like an Intel i5 and RTX 2050 with 4GB VRAM. By keeping the ledger as a local SQLite file, the system ensures privacy and functionality even when internet connections drop, a common occurrence in the target markets.
Hybrid Architecture: Speed and Accuracy
Udhaar employs a dual-parsing strategy to balance speed and accuracy. Fast, rule-based parsers handle immediate entry logging in under a millisecond, allowing the shopkeeper to move to the next customer without delay. Simultaneously, Gemma 3 4B runs in the background to re-read and correct entries, leveraging the zero marginal cost of local inference. This 'second opinion' mechanism corrected three out of 18 test entries that the rule-based parser missed, specifically in complex item lists, without impacting the counterβs throughput.
TabPFN for Predictive Analytics
For predictive features, the tool utilizes TabPFN-3.5 from Prior Labs, a foundation model for tabular data. TabPFN is used to calculate credit limits, forecast inventory needs for festivals like Diwali, and detect price anomalies. In benchmark tests against gradient boosting and simple averages, TabPFN reduced forecast error (WAPE) by 3-4% during festival build-ups and improved late-payment prediction accuracy (AUC) to 0.82 compared to 0.67 for rule-based heuristics.
Key Takeaways
- Local LLMs like Gemma 3 4B are viable for real-time parsing when paired with rule-based fallbacks to ensure latency compliance.
- TabPFN offers superior performance for small-dataset predictions (e.g., individual customer repayment history) without requiring extensive training.
- The MIT-licensed codebase demonstrates a practical pattern for 'offline-first' AI applications using Ollama, FastAPI, and SQLite.
- Pricing at βΉ149/month is sustainable only because local inference eliminates per-call API costs, which would otherwise erase margins at high transaction volumes.
The Bottom Line
Udhaar proves that the 'cloud-first' mindset is a bug, not a feature, for edge retail. By combining deterministic rules with probabilistic local models, it builds a trustable, offline AI system that actually fits the hardware and workflow of a real shopkeeper.