Revelin7Revelin7
All work
Lab note

Retrieval Without Embeddings, OCR Decided Per Page

A document brain on Postgres full-text search alone. Routing each page to its own parser cut failed conversions from 464 to 70 across 2,035 documents.

464 → 70failed conversions

2,035
documents converted on the development corpus
464 → 70
failed conversions after routing per page
24.0%
of documents with at least one page that needs OCR
31.1%
the same figure for GST notices

Vimtara's brain answers from tax notices, statements and filings. We shipped it with no embeddings and no vector store. Retrieval is Postgres full-text search over sections that the extract service cuts from each document.

Three lanes into sections

  • Text PDFs go through a layout-aware parser.
  • Scanned pages go through Tesseract in English and Hindi, one page at a time.
  • Office files and HTML are converted to markdown.

Routing is decided per page, not per file. A notice is often a typed letter with a scanned annexure stapled to it, and sending the whole file down one lane loses half of it. Of 2,035 documents, 1,510 converted clean, 455 converted with some pages degraded and 70 failed, down from 464 before per-page routing. They produced 7,184 sections, 1,222 of them from OCR.

Two kinds of query

Identifiers such as a tax registration number, a PAN or a section reference are searched as exact phrases, because a near match is a different taxpayer. Everything else is ranked with OR matching and an alias map that knows, for example, that a filing has three names in common use.

Embeddings would have added a second store to keep in step with the first and a recall failure we could not explain to an accountant. Full-text search fails in ways a person can read off the query.

Date

October 2026

Part of

Vimtara

Source

In-house

Topics

Built in-house. Ask us about it.

Related