Swiggy’s Hermes V3 Achieves 93% SQL Accuracy with GenAI
These articles are AI-generated summaries. Please check the original sources for full details.
Swiggy Rolls Out Hermes V3: From Text-to-SQL to Conversational AI
Swiggy launched Hermes V3, a GenAI-powered text-to-SQL assistant enabling employees to query data using natural language within Slack. The system improved SQL generation accuracy to 93%, a significant leap from previous iterations.
Traditional SQL query generation struggles with complex analytical requests, requiring specialized expertise and often resulting in errors or inefficiencies. Swiggy’s Hermes V3 addresses these challenges by combining LLMs with vector databases and conversational memory, offering a more accessible and reliable data querying experience for non-technical users and reducing reliance on data engineering teams.
Key Insights
- Hermes V3 improved SQL generation accuracy from 54% to 93% (Swiggy, 2026).
- Vector databases enable semantic search over historical SQL queries, providing few-shot learning examples.
- ReAct-style agentic orchestration breaks down complex queries into manageable steps.
Working Example
# Example of a simplified ReAct loop (conceptual)
def generate_sql(query, context):
"""
Conceptual function demonstrating a ReAct-style loop for SQL generation.
In reality, this would be implemented with a framework like LangChain.
"""
intent = parse_intent(query)
metadata = lookup_metadata(intent)
examples = retrieve_examples(intent, context)
sql = generate_sql_from_examples(examples, metadata)
return sql
# Placeholder functions - actual implementation would be more complex
def parse_intent(query):
# Analyze the query to determine the user's intent
pass
def lookup_metadata(intent):
# Retrieve relevant schema and table information
pass
def retrieve_examples(intent, context):
# Fetch similar SQL queries from the vector database
pass
def generate_sql_from_examples(examples, metadata):
# Use the LLM to generate SQL based on examples and metadata
pass
Practical Applications
- Use Case: Swiggy uses Hermes V3 to allow business analysts to quickly generate reports on key metrics without needing to write SQL.
- Pitfall: Over-reliance on LLM-generated SQL without validation can lead to incorrect results and flawed decision-making.
References:
Continue reading
Next article
The most dangerous shortcuts in software
Related Content
From 40% to 100% SQL Generation Accuracy: Why Local AI Needs Self-Correction, Not Perfect Prompts
Local AI models improved SQL accuracy from 40% to 100% using self-correction loops and DSPy optimization.
Vector Sync Patterns: Keeping AI Features Fresh When Your Data Changes
Ricardo Ferreira shares 5 essential Vector Sync Patterns designed to solve the complex, multi-dimensional challenges of vector staleness and synchronization in AI-driven microservices. He explains how to leverage event-driven architecture (Kafka/Flink) and CDC to reliably manage data, application, and business-driven changes for architects and senior developers.
LinkedIn Achieves 90% Offline Cost Reduction with Real-Time Recommendation Architecture
LinkedIn reduced offline costs by 90% by migrating from batch-based recommendations to a real-time architecture leveraging dynamic scoring and decoupled pipelines.