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 a Bilingual Subcontractor Handover Deficiency Classifier

Format
Code-aware
Lines
70
Sections
11
Linked challenge
Build a Bilingual Subcontractor Handover Deficiency Classifier

Prompt source

Original prompt text with formatting preserved for inspection.

70 lines
11 sections
No variables
1 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.

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.