Inspiration Every business runs on documents: invoices, contracts, audit reports, compliance filings. The information that matters most is usually buried inside them. A payment due date sits in clause 7, an auto-renewal hides on page 6, and an invoice total quietly doesn't match its line items.
We saw how much time people spend reading these documents line by line, and how costly one missed deadline or one duplicate invoice can be. We also noticed a bigger problem with existing AI tools: they give answers without proof. An auditor or a lawyer can't act on a number they can't verify.
That gave us our guiding rule: No source, no output. Every value our system extracts must point back to the exact page, clause and sentence it came from.
What it does DocTrace AI* takes invoices, contracts, reports and compliance documents (PDFs, scans, photos or DOCX) and extracts:
- 📅 Deadlines: payment dates, notice periods, renewals, filing dates
- 🤝 Obligations: who must do what, SLAs, penalties
- ⚠️ Anomalies: math errors, duplicates, rate mismatches, risky clauses
- ❓ Missing data: mandatory fields that are absent (PO number, signature, GSTIN)
- ₹ Financial values: totals, taxes, line items
Every result carries a citation (file, page, clause, bounding box and the verbatim quote). Clicking any finding highlights the exact line in the original document, so a reviewer can verify it in one click.
How we built it Our pipeline has six stages:
- Ingest: upload via the web app or API
- Pre-process: OCR with PaddleOCR, de-skewing, and splitting the page into text blocks, each with a unique ID
- Understand: classify the document type and pick the right extraction schema
- Extract: an LLM returns strict JSON and must cite the block IDs it read from
- Verify: every quoted source is fuzzy-matched against the OCR text, and values that fail are discarded
- Deliver: a React dashboard shows findings side by side with the highlighted source
For anomaly detection we combined rule checks with a statistical model. For example, every invoice is checked against:
$$\sum_{i=1}^{n} q_i \times p_i \;+\; \text{tax} \;=\; \text{invoice total}$$
where \( q_i \) and \( p_i \) are the quantity and price of each line item. On top of that we run consistency checks (a due date before the issue date), cross-document checks (duplicate invoice numbers) and an Isolation Forest model that flags unusual price spikes.
Tech stack: React, Tailwind CSS, PDF.js · Python FastAPI · PaddleOCR, LayoutLMv3, Llama 3 / Gemini, spaCy, scikit-learn, RapidFuzz · PostgreSQL, ChromaDB · Docker
Challenges we ran into LLM hallucinations. Early versions sometimes produced confident values that didn't exist in the document. We fixed this by forcing the model to cite block IDs and rejecting any output whose quote couldn't be found in the source.
- Messy real-world scans. Skewed, blurry or low-contrast pages broke OCR. Image pre-processing and confidence scores helped, and low-confidence fields are sent for human review.
- Every document looks different. No two vendors format invoices the same way. We avoided per-vendor templates and relied on layout-aware models plus schemas per document type.
- Mapping text back to exact positions on the page for highlighting took far more work than we expected.
Accomplishments that we're proud of
- Building a traceability layer where every extracted value links back to its exact source line. This is the feature that makes the output trustworthy.
- A verification step that blocks hallucinated values before they ever reach the user.
- Covering all five extraction types from the problem statement in a single pipeline: deadlines, obligations, anomalies, missing data and financial values.
- A clean reviewer dashboard that puts each finding right beside its highlighted proof.
- Designing, building and presenting all of this as a team of four second-year students within the hackathon.
What we learned Extracting information is the easy part. Making it trustworthy is the real challenge.
- Combining rule-based checks with AI works better than either alone.
- How to design an end-to-end ML pipeline: OCR, layout understanding, LLM prompting with structured output, and verification.
- Working as a team under hackathon time pressure: splitting work across AI, backend and frontend, and integrating it all at the end.
What's next for Untitled Pilot with a CA firm or our college accounts office
- Hindi and regional-language OCR, including handwritten fields
- Integrations with Tally, Zoho Books, SAP, Gmail and Google Drive
- Contract risk scoring and cash-flow forecasting from extracted obligations
Team Binary Beasts: Prakhar Porwal · Piyush Kumar · Prince Kumar · Tanay Marudkar
Built With
- chromadb
- docker
- fastapi
- gemini
- javascript
- layoutlmv3
- llama-3
- machine-learning
- natural-language-processing
- ocr
- paddleocr
- pdf.js
- postgresql
- python
- rapidfuzz
- react
- scikit-learn
- spacy
- tailwindcss
Log in or sign up for Devpost to join the conversation.