- Home
- Solutions
- Case studies
- D2Transform
Guided Labs product · Document processing & data quality
D2Transform
How we are building a document-to-data platform that reads PDFs, photos and Office files, keeps every value exactly as written in English or Nepali, scores it, and sends anything doubtful to a person before it reaches an export or a webhook.

Outcomes
Never translated
originals are kept exactly as written
Converted dates and digits are stored beside the original, never instead of it.
3 layers
Bronze, Silver and Gold
The raw reading is kept unchanged; Gold can be rebuilt without losing a reviewer's corrections.
Every doubtful value
goes to a person before export
Low confidence, a value not found verbatim, a second-reader disagreement or an ambiguous calendar keeps a record out of auto-approval.
The challenge
Organizations in Nepal run on documents: deposit vouchers, bank statements, invoices, citizenship and company certificates. The information in them is needed as data, but getting it out means retyping it, and retyped values go wrong quietly.
Automating it is harder than running OCR. Some PDFs have a usable text layer and some are scans; some use Devanagari digits, Bikram Sambat dates or the legacy Preeti font. A tool that silently “fixes” a value — translating it, transliterating it or converting a date without saying so — produces data that looks clean and is wrong. And no OCR or language model is right every time, so the system has to know when it is unsure.
Our approach
We set three rules before writing the pipeline: never change what the document says, always know where a value came from, and let a person decide whenever the system is unsure.
Read each page the right way
Every PDF page's text layer is assessed on its own. Pages with good text are read directly; pages that are empty, garbled or Preeti-encoded go to OCR. Photos and scans are OCR'd, Word files are parsed (with their images OCR'd), and spreadsheets and text files are read as they are. Pages are processed in chunks, each a separate step, so a long scanned PDF resumes at the chunk that failed instead of starting again.
Bronze, Silver, Gold
- Bronze: the raw reading of each page, stored unchanged.
- Silver: named fields, each with a confidence, the page it came from and the exact words that support it, anchored to their position on the page.
- Gold: the organization's own schema, built through versioned mappings. Gold is derived and can be rebuilt, and a reviewer's corrections survive a rebuild.
Never translate
There is no output-language setting. The extraction instructions forbid translating, transliterating or converting digits and dates, and a verbatim check flags any value that cannot be found in the page text. Where a converted value is useful — a Bikram Sambat date as an AD date, Devanagari digits as Latin ones — it is stored next to the original, never instead of it, and exports carry both.
Score, then route
Each value carries a confidence, and a record takes the lowest confidence of its fields. A record is approved automatically only when it has no validation errors, no review flags and its lowest confidence meets the threshold set for that document type. A value not found verbatim, a disagreement with an optional second reader, or a date whose calendar is ambiguous always sends the record to a person.
The solution
D2Transform is in development and not yet publicly available. Teams upload PDFs, photos and scans, Excel, CSV and TSV, Word and text files, and choose a document type for each upload.
Reviewers work from a queue that shows what the document says first, with each value linked to where it was found. Approved records are exported as CSV, Excel or JSON, or delivered to the organization's systems through signed webhooks — exports and webhooks happen only after approval.
Each organization chooses its OCR and extraction providers, with keys stored encrypted. Organizations have six roles, from Owner to Viewer, with permissions that can be granted or denied per person, and an audit log records who did what.
We do not yet claim an accuracy figure for any language. OCR quality for handwriting and scans depends on the document and on the provider an organization selects; a language will be called supported only after OCR, extraction and export have been tested on verified documents.
Architecture
- Next.js on Vercel: one application for the public site, the organization workspace and the platform admin, in TypeScript strict mode.
- Supabase: Postgres with row-level security on every tenant table, Auth, private Storage for documents, Realtime for live progress and Vault for providers' keys.
- Inngest: the pipeline's steps — reading, building Silver and Gold, delivering webhooks and clean-up — as retryable, idempotent functions; a stage refuses to run twice at once.
- Providers behind one interface: Google Document AI and Cloud Vision for OCR, Google Gemini and Anthropic Claude for extraction; chosen per document type, then per organization, then by a platform default.
- Permissions checked three times: in the interface, on the server and in the database.
- Signed webhooks: an HMAC-SHA256 signature over the timestamp and body, with a signed test ping so receivers can verify their setup.
- Tests: Vitest unit tests, Playwright end-to-end and accessibility tests, and pgTAP tests for the database rules.