Spaces:
Sleeping
Sleeping
- Added support for RICS survey levels (1, 2, 3) in document uploads and reports, allowing for better tier management and retrieval filtering.
b76f199 | """Structured artifacts for the agentic RICS inspection pipeline.""" | |
| from __future__ import annotations | |
| from dataclasses import dataclass | |
| from typing import Any | |
| class EvidenceItem: | |
| doc_id: str | |
| chunk_id: str | |
| score: float | |
| text: str | |
| source: str | None = None # filename / label | |
| section_hint: str | None = None | |
| kb: bool = False | |
| class Finding: | |
| element: str # e.g. "E2 Roof coverings" | |
| observation: str | |
| implication: str | |
| recommendation: str | |
| urgency: str # "Immediate" | "Short-term" | "Routine" | "Monitor" | "Verify" | |
| condition_rating: str | None = None # "1"|"2"|"3"|"NI"|None | |
| evidence: tuple[EvidenceItem, ...] = () | |
| class RiskItem: | |
| category: str # e.g. "Fire", "Electrical", "Structural", "Moisture" | |
| risk: str | |
| severity: str # "Low" | "Medium" | "High" | |
| likelihood: str # "Low" | "Medium" | "High" | |
| action: str | |
| evidence: tuple[EvidenceItem, ...] = () | |
| class ComplianceNote: | |
| standard: str # e.g. "RICS Home Survey Standard" | |
| note: str | |
| status: str # "OK" | "Review" | "Missing" | |
| class StructuredReport: | |
| executive_summary: str | |
| property_description: str | |
| condition_assessment: str | |
| defects_and_risks: str | |
| recommendations: str | |
| findings: tuple[Finding, ...] = () | |
| risks: tuple[RiskItem, ...] = () | |
| compliance: tuple[ComplianceNote, ...] = () | |
| evidence_items: tuple[EvidenceItem, ...] = () | |
| tool_trace: tuple[dict[str, object], ...] = () | |
| extraction_audit: dict[str, Any] | None = None | |
| section_plan: dict[str, Any] | None = None | |
| condition_rating_summary: dict[str, Any] | None = None | |