Skip to main content

On This Page

Swiggy’s Hermes V3 Achieves 93% SQL Accuracy with GenAI

2 min read
Share

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