Build a complete real estate platform for the Belarusian market that enables property search via natural language (Russian/Belarusian), provides automated property valuations, connects buyers with verified realtors, and runs entirely as a Telegram Mini-App — all without recurring cloud API costs.
Solution Architecture
Platform Overview
A modular monolith deployed via Docker Compose with 22 services covering the full real estate lifecycle: search, valuation, listings, realtor marketplace, and admin operations.
•
Real EstateNLPAVMTelegram Mini-AppLocal LLMZero API Costs
Large Language Models have context window limits and increasing latency with prompt size. When analyzing large codebases, documents, or complex multi-part questions, single-shot prompts either exceed context limits or produce slow, unfocused responses.
Build an agent that:
Intelligently splits large prompts into semantic sub-tasks
Executes sub-tasks in parallel for speed
Synthesizes results into coherent responses
Runs entirely on local Ollama (zero API costs)
Solution Architecture
Workflow
User Prompt (large)
↓
[Analyze] - Count tokens, identify boundaries
↓
[Decide] - Decompose or single call?
├─→ Small (<6K tokens) → Single Ollama call → Return
└─→ Large (>6K tokens) → Decomposition
↓
[Split] - Semantic decomposition (headings, lists, paragraphs)
↓
[Execute] - Parallel sub-task execution (3 concurrent)
↓
[Aggregate] - Result synthesis (auto-strategy selection)
↓
[Return] - Final coherent response