The post has been translated automatically. Original language: Russian
Everyone is adding AI now, but half of the projects end up with an expensive toy that doesn't affect the metrics. We share our practice on how to approach this in an engineering way.
1. First the task, then the technology
Not "let's screw up the AI", but "what specific pain will it cover". AI really pays off where there is routine, volume, and text: support, application processing, content generation, and knowledge base search. If the task is solved by ordinary logic or a simple script, do not complicate it.
2. Don't train your model. Use the API
A common mistake of early teams is to try to "train a neural network." In 99% of cases, this is unnecessary and ruinous. Take ready-made LLMs through the API (Anthropic, OpenAI, Google, etc.), and use according to your specifics: industrial engineering — correctly formulated instructions close most cases; RAG (retrieval-augmented generation) — connecting your knowledge base/documents so that the model responds to your data rather than "hallucinating"; Fine-tuning — only when everything else has already been squeezed out and a stable narrow format is needed.
3. Keep the person in the loop
Especially at the start: the AI prepares a draft/response, and the human confirms it. This protects against errors in client communications and gives you the data on which the system becomes more accurate.
4. Consider the cost and speed from the first day
Two parameters that kill AI features in the product: the price per request and the latency. Practice: cache duplicate answers, choose a model for the task (don't take the top one where the easy one is enough), set limits. The same feature on a "cheap" and "expensive" model may differ significantly in cost with the same result.
5. Set limiters (guardrails)
AI in a product without a framework = risk. Minimum: filtering of unwanted input/output, clear boundaries of "what the assistant doesn't talk about", folback on a live person, logging for error analysis.
6. A quick start in a week, not a quarter
A working approach: take one narrow scenario (for example, AI answers to the 20 most frequent customer questions), assemble a prototype on the API in a few days, test it on real requests, measure the effect, and only then scale. A small working case is more useful than a large "AI-platform" plan in a presentation.
A short checklist before implementation: ✅ there is a specific task with a measurable metric The API + prompt/RAG path has been chosen, rather than learning from scratch , the cost of the request and latency are calculated , there is a man in contour and guardrails You start with one narrow scenario
«Перепишем потом» — фраза, из которой вырастает技 долг. Но полностью избегать его невозможно и не нужно. Вопрос в том, как отличить допустимый компромисс от проблемы, которая скоро остановит разработку.
Что такое техдолг простыми словами
Это когда вы осознанно делаете быстрее и проще, чем правильно, чтобы успеть сейчас. Как заём: берёте скорость сегодня, платите процентами завтра — в виде замедления разработки.
Когда долг оправдан:
🔹 проверяете гипотезу — код может вообще не понадобиться;
🔹 дедлайн, от которого зависит сделка или запуск;
🔹 участок кода редко меняется и никого не тормозит.
Когда пора рефакторить:
🔹 каждая новая задача в этом месте занимает всё больше времени;
🔹 правка в одном месте регулярно ломает другое;
🔹 разработчики боятся трогать этот участок;
🔹 новым людям нужны недели, чтобы разобраться;
🔹 на исправление ошибок уходит больше времени, чем на новые функции.
Как подступиться:
Не переписывайте всё сразу — большие переписывания чаще всего срываются. Работает другой подход: рефакторить те участки, которые вы и так трогаете по текущим задачам, и закладывать на это долю времени в каждом спринте. Так долг снижается постепенно, без остановки разработки.
Как объяснить бизнесу: говорите не «код плохой», а на языке сроков: «сейчас задача занимает 5 дней вместо 2, и разрыв растёт». Техдолг — это не эстетика, а скорость выпуска функций и стоимость разработки.
Главное: цель не в идеальном коде, а в управляемом долге. Знать, где вы срезали и почему, — важнее, чем не срезать никогда.
💬 Как у вас в команде решают, что пора рефакторить? Поделитесь в комментариях 👇