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