Problem
A mortgage and real estate service ran a text chatbot as first-line support: it matched the client's question to one of 260 intents and followed a fixed scenario. The team had to turn it into an agent that answers free-form questions, calls internal APIs and handles documents. There were no ready-made MCP servers for corporate APIs, the knowledge base was thin, and a cloud model required stripping personal data. Model answers are non-deterministic and Russian-language safety tooling is weak.
Example from the article: a client uploads a mortgage insurance policy; the agent checks the document package and sends it to the bank.
Solution in brief
The chatbot became an orchestrator over two RAG chains (intents, then articles, then a human operator). Around it the team built an agent platform: LLM gateway, MCP tools, memory, RAG, multi-agent layer and guardrails. A coordinator routes requests to specialist agents, one of which verifies uploaded documents with OCR and a vision-language model.
Questions this case answers
- How to evolve a scripted support chatbot into an LLM agent that answers from a knowledge base, calls internal tools and hands over to a human when it cannot answer
- How to build an in-house platform for many LLM agents (gateway, tools, memory, retrieval, guardrails) when off-the-shelf agent builders do not fit corporate APIs, models and quality control
- How to add safety filters to a corporate LLM agent for a non-English language and budget their added latency and token cost
- How to turn a scripted support chatbot into an LLM agent without throwing away its intent classifier and knowledge search?
Tools and methods
- LiteLLM — LLM API gateway: routing, budgets, monitoring, caching
- GigaChat Max, Gemma 2 — answer model; Gemma 2 re-ranks intent candidates
- OpenSearch, E5, LangChain splitter — vector store, embeddings, chunking
- Redis, PostgreSQL — session memory; long-term episodic memory
- MCP, NetworkX, RabbitMQ — agent tools, graph orchestration, RPC for synchronous answers
- Qwen 2.5 Vision 7B on vLLM — document recognition and extraction
- Obfuscator, LLM-as-a-judge, regular expressions — guardrails
Google or a one-time email code. No password.
