- What was wrong
- The context for each request lived in several internal systems, and people assembled it by hand. Every request was slow, and the same recurring decisions came out differently depending on who handled them.
- Constraints
- These systems ran inside live workflows, so retrieval quality, latency, access boundaries and failure handling mattered as much as the model. Some of the data was not allowed to leave the company perimeter, which ruled out external model APIs for those cases.
- My part
- I worked out the use cases with the operations teams and built the systems end to end, from retrieval and agent tools to multimodal prototypes, local model serving and integration with internal services.
- What we did
- We started from the decision each workflow had to support and designed retrieval and tool interfaces around it, not around a model. Where data had to stay inside, models ran locally, and inference was tuned for latency. Quality was checked on real requests. Wherever an action had consequences, model output stayed advisory.
- What happened
- In the main retrieval workflow, time to a usable answer fell from 4 minutes to 5 seconds. On the local Text-to-SQL work, SQL generation went from 2 minutes to 3 seconds (next case).
- What I took from it
- A useful LLM product depends on three things, the quality of the context, failure modes you can observe and a clear point where a person decides. A stronger base model rarely fixes any of them.
Work included
- RAG
- LLM agents
- Multimodal prototypes
- Local model deployment
- Latency optimization
- Production integration
- Evaluation and human control
- What was wrong
- Analysts spent their time on routine ad hoc queries. The proof of concept handled them well enough on synthetic data, but real questions and schemas could not be sent outside the company.
- Constraints
- The data had to stay inside the internal perimeter. The budget was one A100 GPU, and the target was under 10 seconds of SQL generation per question.
- My part
- I worked on the model side with one teammate. I chose and evaluated the models, tuned prompts, optimized inference and prepared the quantized deployment together with the MLOps team.
- What we did
- We split the job between two open-weight models, one writes the SQL and the other writes the answer in Russian. To compare models, we collected about 50 real user questions and checked the result of executing each query rather than the SQL text. On transformers with 8-bit bitsandbytes, generation took about two minutes, so we moved serving to vLLM and switched to static FP8 quantization to fit on one A100.
- What happened
- SQL generation went from 2 minutes to 3 seconds, well inside the 10-second target. Prompt changes closed an 8-point gap to the reference score on our internal set. The models went to production on vLLM behind a Triton wrapper, and the data stayed inside the perimeter.
- What I took from it
- Public benchmarks told us little about one company's schema. A small set of real questions, scored by execution, told us more. The serving stack decided whether the product was usable at all.
- What was wrong
- Inventory questions crossed several operational domains and systems. One general assistant over all of them was hard to control and hard to evaluate.
- Constraints
- Supply, transit and export each needed their own context and tools. Critical operations had to stay under explicit user control.
- My part
- I designed the agent topology, the coordination flow and the boundary where a person confirms an operation.
- What we did
- We split the system into supply, transit and export agents because each domain needed different context and different tools. A coordinator routes each request, hands bounded tasks to the agents and assembles their results into one proposed action. Each agent works only with its own tools and the internal data it needs.
- What happened
- The platform handles more than 5,000 operational actions a month, with an estimated annual business effect above ₽48M. A request that spans several domains gets one proposal built from domain-specific tools, and critical operations run only after the user confirms them.
- What I took from it
- Splitting into specialists helped because the tool scopes and responsibilities really were different. Coordination became reliable only once the agents had a clear contract and a path for escalation.
User request
↓Coordinator agent
↓Supply agent
Transit agent
Export agent
↓Internal systems & tools
↓Proposed action → explicit confirmation