Problem
Domclick, a Sber subsidiary, built a chatbot to absorb spikes in chat load. It must recognize which client messages it can answer without an operator, scored by skewed toward recall. The baseline (300-dimensional fastText trained on the company's texts plus gradient boosting) scored only 0.65-0.7 at . Raising recall within one scenario dropped precision to an unacceptable level. Heavier classifiers did not help: labels were imbalanced and some intents were phrased almost identically.
Example from the article: a roBERTa-based vectorizer lifted the metric, but on the usual 1000 mCPU service template its average response time was about 30 seconds.
Solution in brief
Keep gradient boosting, but feed it embeddings from a roBERTa further trained on years of operator chats and wrapped in a Sentence Transformer with a Siamese objective (+0.05 ). Distilling it into a student with fewer encoder blocks cut size almost threefold and sped it up 2-2.5 times, losing a few hundredths of the metric. Quantization and bigger CPU limits did not fix latency.
Questions this case answers
- How to raise the quality of a text intent classifier built on frozen embeddings when architecture changes stop helping and labels are imbalanced and overlapping
- How to serve a transformer encoder online within a latency budget when the compute quota cannot be raised and quantization costs too much quality
- How to improve a support chatbot's intent classification when classic classifiers and fastText embeddings plateau?
- How to adapt a pretrained Russian transformer to chat data so it gives better sentence embeddings for a classifier?
Tools and methods
- RoBERTa (Sber, Russian) — base encoder, further trained on chat dialogues
- Masked language modeling (MLM) — continued pretraining on operator-client dialogues
- Sentence Transformers + Siamese network — turns token embeddings into sentence embeddings
- Gradient boosting — intent classifier on top of the embeddings
- Knowledge distillation — compresses the model to a student with fewer encoder blocks
- TorchServe, Kubernetes — serving and resource limits
Google or a one-time email code. No password.
