Revolutionizing Data Querying for Efficient Merchant Performance Insights

Client Overview
A leading global online food ordering and delivery platform with operations spanning over 6,000 cities worldwide. The company offers diverse delivery methods and serves millions of customers through its highly scalable digital platform. Headquartered in the USA, the organization has become a household name, connecting restaurants and consumers with a seamless, efficient, and fast service. As a major player in the food delivery industry, the company’s operations involve complex, high-volume data across various metrics, including merchant performance, order details, promotional spends, and more. The company is committed to providing a superior user experience and improving the efficiency of its internal processes through advanced technological solutions.
Tackling Repetitive, Time-Consuming Data Queries from Account Managers
A global online food delivery leader faced growing challenges with repetitive, manual queries from account managers tasked with tracking and analyzing restaurant performance
Their traditional methods involved inefficient, error-prone processes for generating SQL queries, causing delays and a heavy reliance on skilled data analysts. The company needed an intelligent, scalable solution to streamline data access and empower account managers to make faster, data-driven decisions. The client is committed to improving operational efficiency while delivering exceptional value to its restaurant partners and end customers. To maintain its competitive edge and scale efficiently, the client sought to automate and optimize its data querying processes.
Client Requirements
Automate SQL Query Generation
Develop a solution to automatically
generate accurate SQL queries based on
dynamic, real-time requests from account
managers across multiple regions
Reduce Manual Efforts and Errors
Eliminate the need for skilled analysts
to craft complex SQL queries
manually, reducing time and
minimizing errors.
Enhance Reporting Efficiency
Build a system that speeds up the
reporting process for merchant
performance, promotional spends, and order data.
Support Scalability
Create an intelligent solution that can scale to handle increasing numbers of
account managers and query requests, without additional resource strain.
Improve Data Accuracy and Consistency:
Ensure that automatically generated queries return accurate, consistent
data that adheres to business logic and performance metrics.
LLM-Powered SQL Query Generation for Automated and Accurate Reporting
Indium developed a sophisticated, LLM-based solution to meet these requirements, integrating large language models (LLMs) for automatic SQL query generation. Here’s how the solution worked:
Prompt Engineering with Few-Shot Learning
Indium created a custom prompt engineering model leveraging few-shot learning techniques on the client’s database schema. This allowed the LLM to quickly adapt to the database's structure and understand the various
tables, column names, and data relationships.
Supervised Fine-Tuning
The model was further fine-tuned using supervised learning to reduce errors, such as hallucinations, and to ensure the generated SQL queries
adhered to business logic. This ensured the model could generate queries based on real business needs, making it reliable for handling complex,
dynamic data requests.
Semantic Understanding of Business Logic
The LLM was designed to understand various business requirements
semantically, like identifying which tables and columns needed to be queried
based on the request. It could also interpret conditions and aggregations and
apply key business rules (e.g., filtering orders by merchant, calculating
promotional spend efficiency, etc.) without manual intervention.
Automated SQL Query Generation
Once trained, the LLM automatically generated SQL queries tailored to each
account manager’s specific request. Whether it was retrieving merchant
performance metrics, sales data over a given time period, or detailed
promotional spend reports, the system generated queries across multiple tables, saving significant time and effort.
Dynamic Query Handling for Multiple Data Sources
The LLM was also capable of handling dynamic requests such as retrieving
order information, mapping restaurant data to parent chains, and aggregating performance data across different time periods, all in real-time.
Indium achieved 75% Time Reduction, 4X Cost Savings, 85% Accuracy, and 200+ Queries Generated Daily
~75% Reduction in Time
The time taken to generate SQL queries for account managers was reduced by 75%, compared to the manual process. What previously took hours of skilled labor was now completed in seconds, allowing account managers to focus on higher-value tasks like strategic decision-making and relationship management.
4X Reduction in Costs
By automating the SQL query generation process, the client saw a 4x reduction in the costs associated with data analysts' time spent on query writing and data retrieval. The system significantly lowered the dependency on manual labor and made the process more efficient.
85% Accuracy Achieved
The LLM-generated SQL queries achieved an impressive 85% accuracy rate. This high level of precision in query generation ensured that account managers received the right data with minimal errors, further streamlining decision-making processes.
200+ Queries Generated Per Day
On average, the system successfully generated over 200 unique queries per day, catering to the needs of account managers across the region. This massive increase in query throughput translated to faster decision-making and significantly improved operational efficiency.
Improved Decision-Making
With access to accurate, real-time data through automatically generated queries, account managers could make more informed decisions about their relationships with restaurants, promotional campaigns, and pricing strategies.
About Indium
Indium is an Al-driven digital engineering company that helps enterprises build, scale, and innovate with cutting-edge technology. We specialize in custom solutions, ensuring every engagement is tailored to business needs with a relentless customer-first approach. Our expertise spans Generative Al, Product Engineering, Intelligent Automation, Data & Al, Quality Engineering, and Gaming, delivering high-impact solutions that drive real business impact.
With 5,000+ associates globally, we partner with Fortune 500, Global 2000, and leading technology firms across Financial Services, Healthcare, Manufacturing, Retail, and Technology-driving impact in North America, India, the UK, Singapore, Australia, and Japan to keep businesses ahead in an Al-first world.
