Back to all work
Tahrirchi Bot background
2022 → PresentServing live users2 min read

Tahrirchi Bot

High-throughput proofreading bot wired into an Uzbek NLP pipeline, orchestrated through gRPC microservices and Redis job queues.

Moderates 40k+ submissions monthly while keeping round-trip latency under 1.5s.

Project Metrics

Daily active editors1.4K+
gRPC microservices4 specialised workers
PythongRPCAiogramPostgreSQLRedisDocker

Mission

Tahrirchi Bot gives Uzbek editorial teams an always-on copy editor inside Telegram. Journalists can forward drafts, receive grammar suggestions, and push approved text straight into their CMS—all without leaving the chat.

System Snapshot

Tahrirchi Bot system diagram

  1. Telegram updates land in the gateway bot (Aiogram) which authenticates editors.
  2. Requests are streamed to a FastAPI edge service for rate limiting and telemetry.
  3. gRPC workers run specialised NLP tasks: morphological analysis, grammar correction, and style scoring.
  4. Results and metadata are persisted in PostgreSQL, while Redis queues decouple long-running jobs.

Feature Highlights

  • Offline resilience: when Telegram throttles webhooks, the bot falls back to polling with exponential backoff.
  • Editor context: Redis stores recent conversation context so suggestions stay relevant to the article at hand.
  • Batch proofing: editors can drop a .docx, and the pipeline fans it out into paragraphs processed in parallel.
  • Quality bar: confidence scores below 0.7 are flagged with “second opinion” messaging to keep humans in control.

Usage Patterns

MetricValueComment
Daily active editors1.4K+peaks before newspaper deadlines
Texts processed / day6,500 – 8,20040% run through batch mode
Average turnaround1.2 send-to-end, including Telegram I/O

Tooling for Editors

Text
Draft drop → Pipeline fan-out
    ├─ Core grammar worker
    ├─ Terminology check (custom newsroom dictionary)
    └─ Style heuristic scorer
Workers stream back to the review hub → formatted message → Telegram reply

The bot posts inline diffs with highlighted replacements. Editors can tap suggested fixes or reply with /reject to feed the learning dataset.

Operational Playbooks

  • Elastic workers scale horizontally via Docker Swarm based on queue depth.
  • Alerting pings Telegram admins when success rates drop below 98% over 5 minutes.
  • Full audit trails allow compliance teams to trace who approved which changes.

Future Iterations

Upcoming releases will introduce per-editor glossaries, multi-language pipelines, and a dashboard that surfaces content quality trends to newsroom leads.

Explore another build

More systems I am growing in the open.