Why I Built Parsa.ai

I built Parsa.ai because I kept running into the same problem: document processing was just too expensive.

There are so many tools that can process PDFs, scans, invoices, handwritten forms, receipts, and other documents. But once I started looking at the cost of using them at scale, it became clear that it could get expensive very quickly.

For a small team or an individual developer, paying for every page, every OCR request, and every LLM call adds up.

So I thought, why not try building it myself?

That's where Parsa.ai started.

What Inspired Me

I wanted to see if I could build a document processing system that was accurate enough for real-world use without being ridiculously expensive.

The idea was simple: give Parsa.ai a messy document and get back structured, reliable data that an application can actually use.

But I didn't want it to be just another OCR tool.

I wanted the system to understand the document, extract the important information, tell me where that information came from, and verify the results whenever possible.

That became the foundation of Parsa.ai.

How I Built It

I built Parsa.ai as a 9-stage document processing pipeline.

The first part handles the basics: securely accepting the document, checking what type of file it is, scanning it, and figuring out whether OCR is even necessary.

For difficult documents, I use an Unlimited-OCR 3B-MoE VLM with dynamic tiling and SGLang RadixAttention-based inference.

After that, the extracted information goes through a three-layer extraction system:

  1. Rules and regex for things that are predictable.
  2. Lightweight NER and machine learning for more contextual information.
  3. Gemini when the previous layers aren't confident enough.

This was one of the most important decisions I made.

I didn't want to send everything to an expensive LLM.

If a simple rule can extract something correctly, there's no reason to spend money on a large model.

Making the Results Trustworthy

One thing I realized while building this was that getting an answer isn't enough.

If the system says an invoice total is $1,450, I want to know why it thinks that's the answer.

So Parsa.ai keeps information about where extracted values came from, including the page, bounding box, confidence score, and extraction method.

I also added a math and trust verification stage.

For example, for an invoice, the system can check:

[ \text{Subtotal} + \text{Tax} = \text{Total} ]

That gives the system another way to catch incorrect results before they are passed downstream.

The final decision stage can then automatically approve high-confidence results, send uncertain ones for human review, or reject invalid results.

What I Learned

The biggest thing I learned is that building an AI product isn't just about picking the best model.

The model is only one piece of the puzzle.

A lot of the work is in everything around it:

  • preprocessing documents
  • deciding which model to use
  • reducing unnecessary LLM calls
  • validating results
  • tracking confidence
  • keeping costs under control
  • handling failures
  • thinking about security

I also learned that the most expensive model isn't necessarily the best solution.

Sometimes a simple rule is better.

Sometimes a smaller model is better.

And sometimes you need a large model.

The interesting part is figuring out when to use each one.

The Challenges

The hardest part was dealing with real documents.

A clean PDF is easy.

Real-world documents are not.

They can have handwriting, broken tables, multiple columns, stamps, checkboxes, skewed scans, low-quality images, and completely different layouts.

Something that works perfectly on one document can fail on another.

Another big challenge was cost.

Every unnecessary model call costs money and adds latency. That's why I designed Parsa.ai to escalate only when the cheaper and faster methods aren't confident enough.

Security was another challenge because documents can contain sensitive information. I had to think about things like file validation, malware scanning, PII redaction, tenant isolation, and secure webhook delivery.

What I Built

The result is Parsa.ai — a document intelligence platform that takes messy documents and turns them into structured, validated, and grounded data.

I also built a workspace around the pipeline where you can upload documents, see the processing stages, inspect extracted JSON, view bounding boxes, generate schemas, and manage API keys.

The project currently includes a benchmark covering 36 data types and 720 test runs, with the implemented test suite reporting a 100% conversion success rate.

Why Parsa.ai?

Honestly, the original motivation was simple:

Everything was getting too expensive.

Instead of continuing to pay for expensive document-processing services, I decided to see how far I could get by building the system myself.

That process taught me a lot about document AI, model routing, inference, validation, and building systems that have to work with messy real-world data.

Parsa.ai is my attempt to make document processing more accessible — without forcing developers and companies to choose between high costs and building everything from scratch.

Built With

Share this project:

Updates