Multi-tenant data isolation
Каждый tenant получает строгий ClientId partition key, применяемый на каждом storage слое. SQL Server таблицы (SLAtech.Db) и Qdrant коллекции (vector store) — keyed по ClientId с row-level и collection-level фильтрами, enforced на query layer. Repository pattern отклоняет любой запрос без ClientId на compile time через static analyzer rule (SLATECH001). Sentry projects, audit logs и blob containers — все сохраняют ту же partition discipline. Cross-tenant data — структурная невозможность, не runtime check.
RAG retrieval pipeline
Ingest → chunk → embed → upsert: документы (PDF, DOCX, scraped HTML, FAQ pairs) chunked на 200-500 tokens с 50-token overlap. Chunks embedded через OpenAI text-embedding-3-small (1536 dimensions) и upserted в Qdrant с metadata (ClientId, sourceUrl, chunkIndex). Query path: вопрос embedded, top-K cosine-similarity search filtered по ClientId, ScoreThreshold default 0.5. Retrieved chunks передаются в LLM со structured citation metadata так что response несёт Snippet per source. Reconciliation работает nightly как Worker BackgroundService.
LLM provider abstraction
Все LLM calls идут через ILlmProvider — тонкую абстракцию, реализованную OpenAiQueryService, AnthropicQueryService (Enterprise tier), CohereRerankerService (опциональный re-ranking). Provider selection per tenant через configuration; failover routes автоматически на rate-limit или 5xx. Token usage и cost репортятся per-call в response payload — tenants могут мониторить spend в real time. Provider switching не требует customer-side migration — абстракция изолирует application code.
Channel adapter pattern
Каждый канал (web widget, Telegram, WhatsApp Business, Instagram DM, email) реализует IChannelAdapter — общий контракт, транслирующий channel-native message envelopes в unified Conversation domain model. Adapter pattern позволяет core query pipeline работать channel-agnostic; per-channel formatting (Telegram inline keyboards, WhatsApp template messages) живёт внутри adapter'а. Добавление канала не трогает query pipeline.
Streaming response pipeline
SSE-based streaming через /v1/query/ask-stream endpoint. Первый event — sources-early — emits citation metadata до старта LLM streaming (виджеты рендерят "according to" hover-cards пока ответ ещё стримится). Subsequent events — token chunks; final event — done с aggregate metadata (total tokens, total cost, conversation log ID). Сокращает perceived latency на ~70% vs synchronous response.
Sub-processor data flow
Customer query → Kestrel ingress (Azure West Europe) → SLAtech.Api → embedding call к OpenAI (США, SCC 2021/914) → vector search в Qdrant (Azure West Europe) → LLM call к OpenAI или Anthropic с retrieved chunks → response к Kestrel → SSE назад к widget. Sentry получает sanitised error envelopes (PII scrubbed pre-emission). SendGrid handles transactional email (США, SCC 2021/914). Cloudflare WAF и CDN глобально на edge. Полный sub-processor list на /ru/sub-processors/.
Deployment topology
Azure App Service (Linux) для SLAtech.Api, SLAtech.Web, SLAtech.AdminUI, SLAtech.Business + 8 vertical hubs. Azure SQL Database для relational store с daily backup и 24-hour point-in-time recovery. Qdrant на Azure VM с per-tenant collections. Azure Cache for Redis для session + rate-limit token bucket. Azure Storage для document blobs. Cloudflare впереди для WAF / DDoS mitigation / CDN. GitHub Actions workflows триггерят production deploys на push в production branch.
Disaster recovery posture
RTO 4 часа, RPO 1 час. Daily Azure SQL backups с 35-day retention; point-in-time recovery в течение последних 24 часов. Qdrant snapshotted nightly в Azure Storage. Multi-region failover внутри EU (West Europe primary, North Europe failover). DR runbook тестируется quarterly с simulated region failure. Status page на status.slatech.ai surfaces real-time uptime + last 90-day incident log.
Eval pipeline
Per-vertical eval harness работает nightly против sealed 200-question test set (held out of training/tuning loops). LLM-as-Judge scores factuality, hallucination и confidence per response. Aggregate per-vertical scores выводятся на публичный scoreboard на /ru/eval/. Score regressions ≥3 points триггерят manual triage alert. Eval harness сам — open-source и downloadable как repro template — buyers могут запустить его против своего SLAtech tenant'а.
Observability stack
Sentry на каждом backend сервисе с PII scrubbing pre-emission. Synthetic transaction monitoring c 5-минутной cadence — 12 critical user journeys. OpenTelemetry-instrumented spans для query pipeline timings. Per-tenant audit log exportable на Enterprise tier. Real-time uptime dashboard на status.slatech.ai surfaces 12 metric groups включая p95 query latency, retrieval recall и channel-specific error rates.