Skip to main content
Back to Prompt Library
implementation

Build the application

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: Build an IFC 5D Construction Procurement Bill of Quantities Generator

Format
Code-aware
Lines
87
Sections
11
Linked challenge
Build an IFC 5D Construction Procurement Bill of Quantities Generator

Prompt source

Original prompt text with formatting preserved for inspection.

87 lines
11 sections
No variables
1 code block
## Build
Extract material schedules and dimensional takeoffs from Industry Foundation Classes models using ifc5d and ifccsv conventions. Generate structured bills of quantities aligned with procurement packages and flag unassigned unit rates.

## User
Procurement Estimator

## Workflow
1. Ingest structural and architectural IFC models and extract quantity takeoffs via ifc5d rules.
2. Map element schedule quantities to procurement line items using ifccsv classification keys.
3. Detect elements missing cost codes, unit dimensions, or material supplier rate bindings.
4. Publish formatted procurement bill of quantities with flags for cost estimation review.

## Interface
Browser dashboard showing procurement items table, missing rate warnings, and CSV export action.

## Data
Generate synthetic IFC JSON element snapshots representing concrete slabs and structural steel beams with quantity attributes.
Starter examples below are synthetic. They are not downloaded records.

## Source
[IfcOpenShell](https://raw.githubusercontent.com/IfcOpenShell/IfcOpenShell/v0.8.0/README.md)
Applies ifc5d and ifccsv tool utilities from IfcOpenShell contents table for reporting cost and schedule quantities.

## Tools
pydantic-ai, fastapi, uvicorn.
Pydantic AI enforces type-safe schemas across parsed IFC elements and procurement bill item structures.
Requires an instruction-following model with JSON mode accessed through standard API.

## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.

## Acceptance
- Bill of quantities calculates total cost per line item when unit price is provided.
- Missing cost codes or unit prices are flagged as pending human input without failure.
- Output JSON conforms to standardized line-item schema with unit and total quantities.

## Starter Examples
```json
[
  {
    "input": {
      "project_id": "PRJ-901",
      "elements": [
        {
          "id": "BEAM-01",
          "type": "IfcBeam",
          "material": "Structural Steel S355",
          "quantity": 12.5,
          "unit": "m",
          "unit_cost": 45
        },
        {
          "id": "SLAB-01",
          "type": "IfcSlab",
          "material": "Reinforced Concrete C30",
          "quantity": 80,
          "unit": "m2",
          "unit_cost": 65
        }
      ]
    },
    "expected_output": {
      "project_id": "PRJ-901",
      "line_items_count": 2,
      "total_estimated_cost": 5762.5,
      "unassigned_rates_count": 0,
      "review_status": "READY_FOR_PURCHASE"
    }
  },
  {
    "input": {
      "project_id": "PRJ-902",
      "elements": [
        {
          "id": "COL-04",
          "type": "IfcColumn",
          "material": "Cast-in-place Concrete",
          "quantity": 4,
          "unit": "m3",
          "unit_cost": null
        }
      ]
    },
    "expected_output": {
      "project_id": "PRJ-902",
      "line_items_count": 1,
      "total_estimated_cost": 0,
      "unassigned_rates_count": 1,
      "review_status": "ACTION_REQUIRED"
    }
  }
]
```

## Safety
Estimates are strictly simulated drafts for procurement planning and require estimator sign-off before contract award.
Use mock external writes. Require human review before any real deployment.

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Hold the task contract and output shape stable so generated implementations remain comparable.

Tune next

Update libraries, interfaces, and environment assumptions to match the stack you actually run.

Verify after

Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.