AI Made Friendly HERE

Zepto’s Spellchecker Fixes Errors With a Little Help from LLMs

Whether it’s a journalist composing an article or a user entering a query to find information, typos are common. And these errors can damage the user experience, sometimes leading users to look elsewhere. It becomes the app’s responsibility to understand and fix these typos to help users get what they need.

Large language models (LLMs) show promise in correcting human errors, but many falter when those mistakes are rooted in regional nuances. For example, when a user types “balekayi cheeps” or “kottimbeer pudina,” it’s not just about spelling—it’s about cultural understanding. And this is where LLMs, despite their scale, often fall short.

That challenge is a daily reality for Zepto, the Indian quick commerce startup. With a large share of sales driven by in-app search, the company had to contend not just with spelling errors but a broader issue of language comprehension.

Kaustabh Datta Choudhury, associate director of data science at Zepto, said that accurately interpreting user queries is critical—not just a nice-to-have. In a blog post, he outlined the company’s recent efforts to correct misspellings across multiple languages using LLMs.

From Broken Queries to a Working Model

Zepto’s solution began with a straightforward idea: train an LLM to act as a spellchecker that understands how Indian users search.

“Users don’t type ‘milk’ or ‘coriander’; they type ‘paal’ or ‘kothimbir’, often in English script,” the company said. Traditional search engines and edit-distance-based models couldn’t keep up.

The team chose Meta’s Llama3–8B model, hosting it on Databricks to maintain scalability and reduce dependence on costly APIs. Instead of retraining the model entirely, they fine-tuned it—not by altering its weights, but by shaping its behaviour.

The approach involved explicit prompts such as “You are a spell corrector that understands multilingual inputs,” along with examples like correcting “skool bag” to “school bag.”

Stepwise prompting introduced structure to the process—first asking the model to detect errors, then correct them, and finally translate if needed. This increased transparency and enabled the model to learn generalisable patterns without overfitting.

The initial results were encouraging. Relevance improved even in routine queries.

“With query correction, relevance skyrocketed—from 1 in 4 results being eggs to 4 out of 4,” the blog noted. But some challenges remained, particularly brand names that were mistakenly “corrected”.

Powering the LLM with RAG

To prevent the model from flagging “kellogs” or “valentaz” as typos, the team first embedded a static list of brand names within the prompt. It worked—but at a cost.

“We included a list of brands in the prompt itself, but this increased the context length and inference time, reducing efficiency,” Choudhury said.

A more scalable solution came in the form of retrieval augmented generation (RAG). Each query is converted into an embedding, which is then compared against a vector database of product titles, brands, and spelling variants. The most relevant results are used to dynamically construct the prompt, giving the model contextual clarity without overwhelming it.

This made the model both faster and more accurate. For instance, the query “balekayi cheeps” successfully retrieved “banana chips” and “Haldiram”, enabling a clean correction. In another case, “valentaz” was retained correctly as “Valentas”, a cardiac medication brand. RAG also improved discovery for new products. After “Sundrop Superlite Advanced Oil” was launched, users typing “sundrap oil” or “sundorp advanced” were still led to the right product.

Prompt size dropped from over 4,500 tokens to around 1,200–1,400, and inference latency decreased by 18 seconds per 1,000-query batch. “This reduced prompt size by 30–40% compared to static dictionary-based prompts,” Choudhury wrote.

Beyond prompt engineering and retrieval logic, Zepto’s system also monitors user behaviour. If someone searches for “banan chips” and immediately refines it to “banana chips,” the model uses this signal to self-learn.

“These reformulation pairs help us: auto-learn new misspelling variants, improve prompt coverage and examples, enrich training datasets for future supervised fine-tuning, and reinforce the spell corrector’s decision-making in production,” Choudhury explained.

This feedback loop requires no manual labelling or data collection—just careful observation of user behaviour.

The Business End of a Better Query

The outcome wasn’t just theoretical. Once the multilingual spell corrector went live, Zepto saw a 7.5% rise in conversions for affected queries. By interpreting and correcting mixed-language searches, the system helped users get to what they were actually looking for.

“This system is now a core enabler of our vernacular query understanding pipeline,” Choudhury wrote. It has also become the base for future features such as voice-to-text query correction and AI-driven product explanations.

The project brought together multiple teams: data science was led by Vignesh Venkataraman, product direction was provided by Sujith Cheedella’s team, and delivery was managed by Vivek Chahar’s engineering group. “Our multilingual spell corrector is just the beginning, and we’re excited about what’s next,” Choudhury added.

A Typo Is an Opportunity

What sets Zepto’s approach apart is its restraint. No massive retraining. No complex, overengineered systems. Just careful prompting, live user feedback, and retrieval-based inputs.

In a space where AI projects often prioritise scale over specificity, Zepto addressed a highly localised yet recurring user problem and transformed it into a measurable business impact. The spelling may be off, but the intent is understood.

Originally Appeared Here

You May Also Like

About the Author:

Early Bird