QS-Bot: AI Quantity Surveyor 🏗️

Automating Bill of Quantities (BOQ) creation from messy, unstructured construction scope documents using Google Gemini.

💡 Inspiration

In the construction world, projects don't start with clean spreadsheets; they start with handwritten notes, grainy PDF scans, and informal site descriptions. Quantity Surveyors (QS) spend hours manually extracting data to build a Bill of Quantities (BOQ).

I built QS-Bot to turn that hours-long manual "take-off" process into a few minutes AI-powered workflow, allowing estimators to focus on strategy rather than data entry.

🚀 What it does

QS-Bot is an AI-powered engine that transforms unstructured construction data into professional, priced BOQs.

  • Multi-Modal Input: Upload text descriptions, PDF scopes, or site drawings.
  • Intelligent Extraction: Identifies construction elements and estimates quantities.
  • Instant Pricing: Automatically applies material, labor, and overhead costs.
  • Standards-Aligned: Follows RICS NRM1/NRM2 principles.

🛠️ How we built it

We leveraged the Google Gemini API for its multi-modal capabilities. The system uses a specialized pipeline:

  1. Input Layer: Document parsing via JavaScript.
  2. AI Layer: Multi-modal analysis where Gemini "sees" the context.
  3. Structured Output: Strict JSON enforcement to feed the React frontend.

🧠 Challenges we ran into

The JSON Structure Struggle

The biggest technical hurdle was getting the AI to output reliable, machine-readable data. Initially, the model would return "conversational" JSON, including Markdown backticks or introductory text which caused our parser to fail.

The Solution:

I implemented Native JSON Mode and defined a rigid schema. I learned to treat the AI output like a typed API.

Schema Enforcement Code

Iused a structure similar to this to ensure the response was always valid:

{
  "items": [
    {
      "description": "string",
      "quantity": "number",
      "unit": "string",
      "rate": "number",
      "total": "number"
    }
  ],
  "assumptions": ["string"]
}```

## 🏅 **Accomplishments that I proud of**

*   **Parsing Accuracy:** Extracting a structured  BOQ from a single paragraph of messy notes.
*   **Trust Factor:** Creating a "Transparent Assumptions" feature where the AI explains its logic.
*   **Efficiency:** Reducing task time from  taking hours 

## 📖 **What I learned**

I  learned that **Prompt Engineering is only half the battle**. To build a production-ready tool, you need **Schema Engineering**. Treating the AI's output as a typed API response rather than just "text" was the breakthrough that made QS-Bot a viable tool.
Share this project:

Updates