Inspiration
In the heavy infrastructure and construction industry, procurement is an operational bottleneck. Every single day, project managers are buried under hundreds of pages of legal contracts, purchase orders (POs), goods received notes (GRNs), and incoming vendor invoices. Because comparison is done manually, human error is inevitable—leading to budget leakages of 5% to 12%. We were inspired to build ProcureSage AI to construct an automated "auditing and bidding shield" that protects capital budgets and accelerates site operational timelines.
What it does
ProcureSage AI is an intelligent, autonomous multi-agent platform designed to manage and audit procurement documents with complete precision. The system operates through three primary features:
- Autonomous 3-Way Matching: Automatically parses tabular line items from invoices and validates them against corresponding POs and GRNs to ensure the company only pays for materials actually ordered and received.
- Semantic Risk Radar: Conducts deep, vector-based analyses of dense, 150+ page legal agreements to instantly highlight aggressive liability terms, indemnity traps, and timeline risks.
- Agentic Bidding Engine: Evaluates and ranks competing contractor bids based on a combination of pricing tables and historical database performance parameters (historical delays, quality scores).
How we built it
We engineered a robust, production-ready hybrid architecture to handle both complex unstructured text and strict relational data:
- The Parser: We leverage layout-aware Document AI models (LayoutLM v3) to parse tabular data from messy, non-standard PDFs and image scans while preserving spatial coordinates.
- The Databases: For structured transaction history and vendor performance metrics, we built a highly-optimized SQLite database. For semantic search over dense legal contracts, we used ChromaDB / Qdrant vector storage with bge-large embeddings.
- The Brain: The core multi-agent state machines are built on LangGraph, enabling specialized, autonomous agents (Accountant, Lawyer, and Strategist) to coordinate, access DB tools, and perform task handoffs.
Challenges we ran into
Our biggest challenge was handling the inherent mathematical limitations of Large Language Models. When parsing long, complex pricing tables from scanned PDF invoices, standard LLMs frequently hallucinate or fail at basic row calculations.
Our Solution: We implemented programmatic math guardrails. The database ingestion agent is bound by strict code-level algebraic rules:
$$ \text{Invoice Total} = \sum (\text{Unit Price} \times \text{Quantity}) + \text{Tax} - \text{Discounts} $$
If the parsed values violate this algebraic assertion, a programmatic feedback loop triggers in our LangGraph state machine, forcing the extraction agent to re-read the document, adjust its bounding box context, and self-correct prior to saving any erroneous data into our SQLite ledger.
Accomplishments that we're proud of
- Successfully building and debugging a stateful, multi-agent orchestrator using LangGraph where agents actually collaborate and self-correct using programmatically validated assertions.
- Designing a hybrid memory architecture that successfully merges structured relational queries (SQL) with unstructured semantic queries (Vector Search) for absolute system precision.
- Engineering a clean, high-performance UI dashboard that presents complex database anomalies and risk factors into intuitive visual cues.
What we learned
We learned that handling complex visual layouts (like nested tables on structural invoices) requires layout-aware AI systems; simple text-scraping OCR models lose critical spatial context. We also deeply explored the design patterns of stateful agent architectures—specifically how to manage state transitions and avoid infinite agentic reasoning loops by wrapping model outputs in deterministic validation code.
What's next for ProcureSage AI
Aligned with our forward-looking expansion scope, we aim to scale ProcureSage AI beyond this initial prototype:
- Phase I (Enterprise ERP Sync): Integrate our background agent pipelines directly with widely-used industrial construction management platforms like Procore and SAP.
- Phase II (Predictive Macro Commodity Forecasting): Build forecasting models to advise procurement officers on global cement, steel, and fuel market volatility trends before choosing long-term bids.
- Phase III (Computer Vision Alignment): Connect our 3-Way matching agents with on-site smart camera feeds to physically confirm load deliveries (e.g., matching a concrete truck's size and contents) against digital GRNs and invoices.
Built With
- agentic
- ai
- chromadb
- data
- database
- financial
- generative
- guardrails
- html5
- information
- langgraph
- layoutlm
- legal
- multi-agent
- natural-language-processing
- ocr
- pipeline
- procurement
- python
- qdrant
- rag
- relational
- sqlite
- tailwind
- vector
Log in or sign up for Devpost to join the conversation.