Introducing the Neural Editor in Yandex Browser, or How We Taught LLMs to Help Users with Texts

Nikita Avdosev20 Sep 2024

Problem

The Yandex Browser team shipped three text actions (fix errors, improve, shorten) as separate fine-tuned models, each trained on 5,000 public texts. Every new model version had to be rated by human editors, which took time. Users also had to find a text field before they could use the feature, and three buttons could not cover free-form requests.

Example from the article: in February 2024 the Browser launched fix, improve and shorten actions in input fields. The team then added English, an offline correction metric and a standalone editor with a custom prompt.

Solution in brief

Remaining errors are counted automatically by comparing model output with editor-corrected references, so experiments no longer wait for editors. Requests from buttons and from a free-form prompt go through one classifier that sends them to one of five specialized models, which are cheaper and faster than a single universal model.

Questions this case answers
  • How to measure the quality of a text-rewriting model automatically when human editors are the only judges
  • How to serve a wide range of free-form text requests with a few small specialized models instead of one large universal model
  • How to find the most frequent user tasks from raw dialogue logs where the instruction and the text are split across messages
  • How to build a text-editing assistant (fix, shorten, rephrase, free-form prompt) on small fine-tuned LLMs instead of one large chat model

Tools and methods

  • YandexGPT Lite / 3 Light — base models for fine-tuning; 3 Pro labeled the dialogue logs
  • LoRA fine-tuning — one adapter per action, chosen because the datasets were small
  • LCS-based diff and Levenshtein distance — offline error metric and difficulty measure
  • Encoder-decoder architecture, pretraining on synthetic errors, curriculum learning — the three changes that improved the correction model
  • Request classifier — routes prompts and buttons to specialized models
Continue reading — it's free

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