SwiggyYash KhandelwalProblem & solution
Explaining Every Rupee: How We Built Reliable LLM Support Bots for Delivery Partners
Summary
Swiggy faced close to 9 lakh monthly payout- and incentive-related tickets, where delivery executives needed accurate explanations of earnings, deductions, missed incentives, and credited amounts. The system separates financial truth from language generation: deterministic preprocessing and internal APIs resolve incentive eligibility, payout breakdowns, deductions, and conditions before an LLM explains the result. Two multilingual bots—the Daily Incentive Bot and Payout Bot—use a LangGraph StateGraph with LLM, tool, and validator nodes, Redis checkpointing for multi-turn context, and post-processing translation into the executive’s preferred language. Azure Translator preserve-list controls help keep business-critical terminology consistent, while structured escalation sends out-of-scope cases and context to human agents. Moving retrieval from Databricks SQL queries to an aggregated internal API reduced latency from 8–10 seconds to milliseconds; the bots now resolve about 90% end to end, cut resolution from roughly 20 minutes to seconds, and improved CSAT by 40%.
Context
Delivery executives needed fast, accurate explanations for incentive eligibility, payout differences, deductions, taxes, onboarding fees, penalties, and final credited amounts. Resolving these financial-support questions required cross-referencing complex conditions and data distributed across multiple systems, creating long resolution times, low CSAT, high human-support volume, and a trust risk when answers were wrong.
Approach / What changed
The system uses deterministic logic and internal APIs to resolve payout and incentive facts before an LLM generates an explanation. Daily Incentive and Payout bots are implemented with a LangGraph StateGraph containing LLM, tool, and validator nodes, with Redis checkpointing for multi-turn conversations. Translation is applied after generation, business terminology is controlled through Azure Translator preservation mechanisms, and out-of-scope cases escalate with conversation context to human agents.
Takeaways
The validator compares claimed incentive amounts in the generated response with raw tool output and sends mismatches back for regeneration.
Replacing Databricks SQL retrieval and heavy joins with an aggregated internal API reduced data-fetch latency from 8–10 seconds to milliseconds.
The bots resolve about 90% of incentive- and payout-related queries end to end, reduce resolution time from roughly 20 minutes to a few seconds, and improve CSAT by 40%.
Source and freshness
- Source
- medium.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.