Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

What I learned building a RAG assistant for scanned Hindi and English university circulars

Описание и применение

Создано решение RAG для сканированных индийских университетских циркулярных документов, использующее OCR, реконструкцию таблиц, гибридный поиск и проверку ответов, обеспечивающее точные цитируемые ответы.

Задача

University staff needed to find answers in a large pile of scanned Hindi and English circulars that were photocopied at an angle, full of ruled tables, and difficult to search.

Результат

The assistant now provides accurate, citation‑rich answers to staff queries about university circulars, with robust OCR, table reconstruction, hybrid retrieval, and verification steps, all deployed in a simple CI/CD pipeline.

Рабочий процесс

  • Detect script per page and run Tesseract with the appropriate language model
  • Rebuild tables cell by cell using ruled line detection
  • Flag low‑confidence words for reviewer visibility
  • Embed each paragraph and table row with location metadata into PostgreSQL with pgvector
  • Rewrite user query into English and Hindi queries
  • Run vector search for similar passages
  • Run exact matching for codes, dates, and rare tokens
  • Merge and re‑rank results with a cross‑encoder model
  • Generate answer from retrieved passages with numbered citations
  • Run a second model to verify answer against sources
  • Stream answers to the user
  • Implement draft‑to‑active approval workflow, role‑based visibility, bulk import, automatic expiry, two‑step lockouts, and an automatic answer‑quality test in CI
  • Deploy via GitHub Actions to an AWS server using Docker and Caddy
  • Expose a single API used by a Next.js web app and a Flutter Android app

Доказательства

If the text coming out of OCR is broken or wrong nothing that follows can be good.

Источник

Each paragraph. Every table row gets embedded and stored in PostgreSQL with pgvector.

Источник

The re‑ranker was the biggest improvement in the whole project.

Источник

  • Дата записи: 2026-10-19T03:41:09.943Z