Subtech
Back to projects

Customer support · 2026

Persian document-grounded assistant

A Persian assistant that answers customers from each business's own documents, shows its sources, and declines when it finds nothing relevant.

Cover
Client
Subtech (in-house)
Sector
Customer support
Year
2026
Duration
3 months
Status
Pilot, in development

The challenge

Businesses want an assistant on their own website that answers in Persian, using only their own catalogues, manuals, policies and FAQs. But a Persian PDF often stores the shaped form of each glyph rather than the letter, so «فهرست» and «ﻓﻬﺮﺳﺖ» do not match and ordinary systems fail without any error. Extractors that fix right-to-left word order also reverse the digits, so 500 is indexed as 005, and no search metric can detect it.

Our approach

We rebuild PDF text from the glyphs themselves: shaped forms are mapped back to letters, and every digit run is checked against where its glyphs sit on the page and repaired if it was reversed. Retrieval is hybrid, combining semantic vectors with keyword search, and when nothing relevant is found the question is declined before any language model is called. The server builds each answer's citations from the passages that were actually retrieved, so the model cannot invent a source. Each business's data is separated from the others at a single point in the code.

The result

The platform is in a pilot, where each business has its own chat page behind access codes. In the Persian manuals we processed, 1,320 reversed numbers were repaired with zero left over. Isolation is proven by CI tests that plant a marker in one business's data and assert it never appears in another's. The chat shows the stages each answer goes through: checking the question, searching, sources found, writing and reviewing.

1,320reversed numbers in Persian manuals repaired, zero left over
74 of 107Persian manuals whose PDF text was stored mostly as shaped glyph forms, not letters

Capabilities used

  • UI/UX Design
  • Web Development
  • AI as a Service
  • Document-Grounded Answers (RAG)
  • Software Architecture
  • UI/UX Design
    A Persian, right-to-left chat interface that shows the stages each answer goes through.
  • Web Development
    A separate chat page for each business and an API that streams each answer and its stages to the browser.
  • AI as a Service
    One shared service for several businesses, each with its own content, access codes and daily message limit.
  • Document-Grounded Answers (RAG)
    Persian text extraction with digit repair, hybrid search behind a relevance gate, and grounded answers with server-built citations.
  • Software Architecture
    Each business's data is kept apart at a single point, proven by CI tests that plant a marker in one business's data and look for it in another's.

Technologies

  • Python
  • Django
  • Django REST Framework
  • PostgreSQL
  • pgvector
  • hazm
  • pypdf
  • pypdfium2
  • Server-Sent Events
  • Kubernetes
  • GitLab CI
  • GitHub Actions

Team on this project

  • Seyed Mehdi MousaviAI and e-commerce lead
  • Sepehr ModirsaneiFounder and product owner
  • Amir ZareBackend developer
  • Ava KazeminejadFrontend and evaluation
Next projectSubFin