Habr AI→ original

SQL without analysts: how ecom.tech made local LLMs write queries

Every time a manager needs sales data for last Thursday, somewhere in the world one analyst quietly despairs. At ecom.tech, they decided to put an end to it…

AI-processed from Habr AI; edited by Hamidun News
SQL without analysts: how ecom.tech made local LLMs write queries
Source: Habr AI. Collage: Hamidun News.
◐ Listen to article

Every time a manager needs sales data for last Thursday, somewhere in the world one analyst quietly despairs. At ecom.tech, they decided to put an end to it. Instead of burying the analytics department in identical tickets, the team built a system where SQL queries are written by a local neural network. It's a classic story about how automation saves people from burnout and companies from wasteful time consumption.

Let's be honest: SQL is the Latin of modern business. Everyone knows it exists, but only a handful speak it. Previously, the path from the question "how much did we sell?" to getting an answer could take hours or even days. An analyst had to interrupt deep research and insight generation to write yet another basic query. It's not just inefficient—it kills professional motivation, turning people into living interfaces to databases. The ecom.tech team realized this process was an ideal candidate for optimization using LLM.

Why local models specifically? You might think: just hook up the API from OpenAI or Anthropic and be done. But no reasonable security department at a large retailer would allow sending database structure, table names, and sensitive business metrics to external servers. So ecom.tech took the complex but right path of self-hosted solutions. It requires more computational resources upfront, but the legal department sleeps soundly and data never leaves the company perimeter.

Technically, it looks like an intelligent bridge between human language and the rigid syntax of databases. The model receives a description of the data schema and a user's question, and outputs ready-made code. Of course, it's not magic, and neural networks sometimes make mistakes. However, even if the AI produces correct code in most cases, that's already a massive resource saving. ecom.tech implemented a system that allows queries to be checked and the model fine-tuned on the company's specific scenarios. Other complex cases that require deep understanding of business logic still remain with people, but their quantity has been drastically reduced.

What does this change for the industry as a whole? We're seeing a real trend toward data democratization. If previously, access to numbers was a privilege reserved for those who could code, now the entry barrier is dropping to the level of being able to articulate thoughts clearly. This frees analysts from the role of "data miners" and returns them to the role of strategists. Now they configure systems and monitor data quality instead of spending 80% of their time writing basic selects.

The key point: the analyst as a "translator from human to computer" is gradually becoming obsolete. The future belongs to those who can build such self-service systems. Will local models be able to completely displace manual SQL in the coming couple of years?

ZK
Hamidun News
AI news without noise. Daily editorial selection from 400+ sources. A product by Zhemal Khamidun, Head of AI at Alpina Digital.

Want to stop reading about AI and start using it?

AI News is a curated feed of AI/tech news. Hamidun Academy teaches you to use AI systematically in your work.

What do you think?
Loading comments…