Hermes V3: Building Swiggy’s Conversational AI Analyst

Amaresh Marripudi, Meghana Negi, Rutvik Reddy3 Sep 2025

Problem

Swiggy's first text-to-SQL assistant, Hermes, answered plain-English data questions inside Slack. Four weaknesses showed up: it missed niche metrics and derived logic, forced users to repeat context in every prompt, gave no way to judge whether the SQL was right, and returned different outputs for the same metric depending on the prompt. On a 100-query benchmark the old pipeline was fully correct on only 54% of queries and fully wrong on 20%.

Example from the article: a user types "LD orders" and the assistant has to guess that it means lm_distance > 4.

Solution in brief

Hermes V3 adds an orchestrating agent over the old pipeline. Few-shot examples come from a vector index of past warehouse queries, each turned into a question by an LLM. The agent keeps chat context, looks up tables and then columns, and asks for clarification. Every answer comes with its assumptions and a confidence score.

Questions this case answers
  • How to improve the accuracy of a natural-language-to-SQL assistant by reusing a corpus of past queries that has no natural-language descriptions
  • How to let non-technical users verify and iteratively refine machine-generated queries when they cannot read the query language
  • How to raise the accuracy of a text-to-SQL assistant when the warehouse holds many past queries but no questions describing them?
  • How to let users refine a data question over several chat turns without repeating context?

Tools and methods

  • SQL-to-text generation — a Claude model writes the missing question for each past query.
  • Vector similarity search — finds the closest past questions and passes them to the generator as few-shot examples.
  • ReAct-style orchestrator agent — decides whether to clarify, rewrite, fetch metadata or run the query.
  • Two-step metadata lookup — tables first, then their columns.
  • Explanation layer — lists assumptions and steps and gives a confidence score from 1 to 3.
  • Slack — front end with private replies.
Continue reading — it's free

Google or a one-time email code. No password.