Skip to main content
Loading navigation
Back to prompt library

Build a Bilingual Subcontractor Handover Deficiency Classifier — implementation

Linked challenge: Build a Bilingual Subcontractor Handover Deficiency Classifier

Prompt source

implementation70 lines11 sectionsNo variables1 code block
## Build
Process Arabic and English snagging lists, site photographs, and punch list records across facility MEP systems. Standardize defect classifications, map severity, and output bilateral rectification notices.

## User
Quality Assurance Handover Engineer

## Workflow
1. Ingest MEP inspection punch logs recorded in mixed Arabic and English across architectural and mechanical packages.
2. Normalize colloquial Arabic technical descriptions into standardized CSI MasterFormat MEP defect categories.
3. Assign defect severity levels based on operational impact to HVAC and water containment systems.
4. Compile structured bilingual subcontractor deficiency notices with photo reference tags and closeout deadlines.

## Interface
Snagging management grid displaying parallel Arabic-English descriptions, severity badges, and batch export tools.

## Data
Assemble mock snagging spreadsheets containing mixed Arabic/English punch descriptions across HVAC, plumbing, and electrical trades.
Starter examples below are synthetic. They are not downloaded records.

## Source
[EnergyPlus](https://raw.githubusercontent.com/NREL/EnergyPlus/develop/README.md)
Adopts EnergyPlus MEP system terminology hierarchies to map mechanical equipment and distribution defects into standardized categories.

## Tools
semantic-kernel, pydantic, fastapi.
Semantic Kernel enables structured connector orchestration to process dual-language text pipelines and generate consistent defect schemas.
Hosted Claude API with fluent Arabic dialect comprehension for field construction notes.

## 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
- Correctly classifies bilingual punch entries into HVAC, Plumbing, Electrical, or Fire Protection categories.
- Assigns contractual rectification deadlines based on assigned severity (Critical: 24h, Major: 72h, Minor: 7d).
- Generates bilateral deficiency notices with matched Arabic and English resolution text.

## Starter Examples
```json
[
  {
    "input": {
      "snag_id": "SNAG-HVAC-912",
      "subcontractor": "Delta Mechanical LLC",
      "raw_text_ar": "عازل مجاري الهواء ممزق في الطابق الثالث مما يسبب تكثف ماء",
      "raw_text_en": "Duct insulation torn on 3rd floor causing water condensation",
      "trade": "HVAC",
      "zone": "Level 03 Corridor"
    },
    "expected_output": {
      "category": "Thermal Insulation / Ductwork",
      "severity": "MAJOR",
      "rectification_sla_hours": 72,
      "action_ar": "استبدال العازل التالف وإصلاح تسرب التكثف لمنع تلف السقف المستعار",
      "action_en": "Replace damaged insulation and rectify condensation to prevent ceiling damage",
      "status": "ISSUED_TO_SUBCONTRACTOR"
    }
  },
  {
    "input": {
      "snag_id": "SNAG-PLUMB-104",
      "raw_text_ar": "تسريب مياه تحت مضخة التدوير الرئيسية في غرفة الخدمات",
      "raw_text_en": "",
      "trade": "Plumbing",
      "zone": "Basement Plant Room"
    },
    "expected_output": {
      "category": "Pumping Equipment / Mechanical Seals",
      "severity": "CRITICAL",
      "rectification_sla_hours": 24,
      "action_ar": "فحص مانع التسرب الميكانيكي للمضخة وإيقاف التسريب فوراً",
      "action_en": "Inspect mechanical seal of circulation pump and isolate leak immediately",
      "status": "ISSUED_TO_SUBCONTRACTOR"
    }
  }
]
```

## Safety
Deficiency notices facilitate quality control; physical isolation of energized or pressurized lines requires authorized Lock-Out/Tag-Out procedures.
Use mock external writes. Require human review before any real deployment.