Inspiration
None of us come from a construction background, but the more we read about how procurement actually works on real projects, the more it felt broken in a very fixable way. A purchase order gets raised, a contract gets signed, an invoice comes in, materials get delivered — and these four documents basically never talk to each other. Someone has to sit down and manually check if the invoice matches the PO, if the delivery was actually complete, if a penalty clause even applies here.
What got us was learning that a lot of construction disputes aren't complicated — they're just missed. Nobody catches them in time because nobody has the bandwidth to cross-check every order against every contract clause on every project. That felt like exactly the kind of problem AI is actually good at, if you build it properly instead of just wrapping a chatbot around a PDF.
That's where Contra came from.
What it does
Contra is an AI copilot for construction procurement. You give it a project's documents — purchase order, contract, invoice, delivery receipt, and a photo of the delivered materials — and it does what a good analyst would do, except in seconds instead of days:
- It cross-checks the documents against each other: does the invoice match the PO, was the delivery complete, are the contract terms actually being followed
- It looks at the delivery photo itself using a vision-language model, and checks whether what actually showed up matches the spec — right quantity, right condition, no visible damage
- Instead of just saying "mismatch detected," it explains why something is risky — this vendor's been late three times this quarter, the invoice is 10% over the PO, the delivery was partial, here's the estimated financial exposure
- If a delay happens, it doesn't just say "delayed" — it traces back what actually caused it, step by step
- It keeps a running profile on every vendor so patterns show up over time instead of getting lost between projects
- And when it finds something worth acting on, it doesn't just sit there — it drafts a dispute or claim email, already citing the right clause and the right evidence, ready for a human to review and send
How we built it
We didn't want this to be one big prompt pretending to do five things. We built it in layers, where each layer actually does its job:
- Document Intelligence pulls structured information out of the PO, contract, invoice, and delivery receipt — not just OCR text, but actual terms: amounts, quantities, dates, penalty clauses
- A vision-language model looks at the delivery photo and compares it against what the spec says should have arrived
- RAG pulls in the vendor's history and the relevant contract clauses, so the model isn't guessing — it's grounded in what's actually true for this project
- A risk scoring layer combines vendor history, delivery status, and mismatch severity into a single risk estimate with a confidence level, not just a red flag
- An agent layer ties everything together and, when the risk is real, writes the actual email that flags it
For the risk score, we kept the math simple but honest — a delay probability per vendor \( P(\text{delay}) \), estimated from their delivery history, combined with how much money is actually on the line if the penalty clause applies:
$$ \text{Risk Score} = P(\text{delay}) \times \text{Penalty Exposure} + \text{Mismatch Severity} $$
Challenges we ran into
Honestly, most of our time went into stopping the model from doing the wrong kind of "smart."
Early on, the vision model would just describe the photo — "a stack of steel beams" — instead of actually comparing it to the spec. We had to rebuild the prompt around specific comparison criteria pulled from the extracted spec data before it started reasoning instead of narrating.
We also hit a false-positive problem. A system that flags everything is exactly as useless as one that flags nothing — nobody trusts either one. We spent real time tuning what counts as a genuine, actionable risk versus normal variation.
And when the model reasoned across all four documents at once, it would sometimes just make up a number that sounded plausible. Extracting everything into structured data before asking the model to reason fixed most of that — turns out you can't skip the boring step.
Accomplishments that we're proud of
We got the cross-document reasoning actually working end-to-end — not just extracting fields from four separate documents, but having the system connect them: catching a case where the invoice amount, the PO quantity, and the delivery receipt told three slightly different stories, and having Contra explain why that mattered instead of just listing the numbers.
The vision model genuinely compares, not just describes. Getting it to look at a delivery photo and say "this doesn't match the spec — visible damage on multiple units" instead of just narrating what's in the frame took real iteration, and seeing it work reliably was one of our favorite moments.
Contra explains itself in plain language. Every risk it flags comes with a reason a non-technical project manager could actually read and trust — not a score with no context. That was a deliberate choice from day one, and we're glad we held the line on it instead of settling for a simpler "flag: yes/no" system.
It doesn't just report — it acts. Watching Contra take a detected risk and turn it into a fully drafted, evidence-backed dispute email — citing the actual clause, the actual mismatch, the actual photo — was the moment it stopped feeling like a dashboard and started feeling like an assistant.
We kept the system honest. We resisted the temptation to let the model invent numbers or hallucinate confidence. Every claim Contra makes traces back to something it actually extracted or retrieved — even if that meant a less flashy demo in a few places.
We built something a real project manager would actually want, not just a technically impressive prototype — every feature we kept was one we could justify by asking "does this save someone real time on a real project."
What we learned
The interesting part isn't any single AI technique — it's that none of them are impressive alone. A document extractor by itself is just OCR. A vision model by itself just describes a photo. A risk score by itself is just a number. It's only when you chain them — extract, verify, retrieve context, score, then act — that the system starts behaving like an actual analyst instead of a demo trick.
What's next for Contra
- Automatic compliance tracking — expired certificates, missing insurance or licensing documents
- A "what-if" negotiation simulator, so a PM can ask "what happens to the budget if I take a 5% discount instead of pursuing this claim" and get a real answer
- Plugging into procurement platforms teams already use, so Contra sits on top of existing workflows instead of asking anyone to switch tools
Built With
- chromadb
- claude-api-(vlm-+-reasoning)
- fastapi
- langchain
- postgresql
- pytesseract
- python
- rag
- react
- tailwind-css
Log in or sign up for Devpost to join the conversation.