diff --git a/applications/landlord_description_overrides/handler.py b/applications/landlord_description_overrides/handler.py index dd37e461c..bc5fe8ee9 100644 --- a/applications/landlord_description_overrides/handler.py +++ b/applications/landlord_description_overrides/handler.py @@ -22,6 +22,7 @@ from domain.data_transformation.guarded_column_classifier import ( GuardedColumnClassifier, ) from domain.epc.property_overrides.water_heating_type import WaterHeatingType +from domain.epc.property_overrides.water_heating_guard import water_heating_guard from domain.epc.property_overrides.wall_type import WallType from domain.epc.property_overrides.wall_type_construction_dates import ( wall_type_construction_date_prompt_hint, @@ -174,8 +175,16 @@ def _build_columns( "water_heating": lambda src: ClassifiableColumn( name="water_heating", source_column=src, - classifier=ChatGptColumnClassifier( - chat_gpt, WaterHeatingType, WaterHeatingType.UNKNOWN + # A biomass / wood / dual-fuel / biodiesel DHW description has no + # dedicated LLM target and was funnelled into "house coal"; the + # deterministic guard resolves the structured fuels (and the "electric + # immersion assumed" no-system case) and the LLM handles the rest + # (#1376, ADR-0043). + classifier=GuardedColumnClassifier( + guard=water_heating_guard, + fallback=ChatGptColumnClassifier( + chat_gpt, WaterHeatingType, WaterHeatingType.UNKNOWN + ), ), repo=LandlordOverridesRepository[WaterHeatingType]( session, LandlordWaterHeatingOverrideRow