insureos-models / data /constants.py
piyushptiwari's picture
Upload folder using huggingface_hub
2cc32a5 verified
"""
InsureOS β€” UK Insurance Synthetic Data: Constants & Templates
All UK-specific: GBP, postcodes, FCA references, Lloyd's market terms
"""
# ── UK Insurance Lines of Business ──
LINES_OF_BUSINESS = [
"Motor Private Car", "Motor Commercial Vehicle", "Motor Fleet",
"Home Buildings", "Home Contents", "Home Combined",
"Commercial Property", "Commercial Combined",
"Employers' Liability", "Public Liability", "Professional Indemnity",
"Directors & Officers", "Cyber Liability",
"Travel Single Trip", "Travel Annual Multi-Trip",
"Pet Insurance", "Life Term Assurance", "Income Protection",
"Marine Cargo", "Marine Hull",
"Aviation", "Engineering Inspection", "Legal Expenses",
"Fidelity Guarantee", "Business Interruption",
]
# ── UK Regions & Postcodes ──
UK_REGIONS = {
"London": ["EC1A", "EC2A", "WC1A", "SW1A", "SE1", "E1", "N1", "W1"],
"South East": ["GU", "RH", "TN", "CT", "ME", "BN", "PO", "SO"],
"South West": ["BS", "BA", "EX", "PL", "TR", "TA", "DT", "GL"],
"East Anglia": ["CB", "IP", "NR", "CO", "CM", "PE"],
"Midlands": ["B", "CV", "WV", "WS", "DY", "NG", "DE", "LE"],
"North West": ["M", "L", "WA", "CH", "PR", "BL", "OL", "SK"],
"North East": ["NE", "SR", "DH", "TS", "DL", "HU"],
"Yorkshire": ["LS", "BD", "HX", "HD", "WF", "S", "DN", "YO"],
"Scotland": ["EH", "G", "AB", "DD", "KY", "FK", "PA", "IV"],
"Wales": ["CF", "SA", "NP", "LL", "SY", "LD"],
"Northern Ireland": ["BT"],
}
# ── UK Insurers (for realistic data) ──
UK_INSURERS = [
"Aviva", "AXA UK", "RSA Insurance", "Zurich UK",
"Allianz UK", "QBE European", "Hiscox",
"Beazley", "Brit Insurance", "MS Amlin",
"Ecclesiastical", "LV= General Insurance",
"NFU Mutual", "Direct Line Group", "Admiral",
"Ageas UK", "CovΓ©a Insurance", "Tokio Marine Kiln",
"Canopius", "Chaucer", "Argenta Syndicate",
]
# ── Lloyd's Syndicates ──
LLOYDS_SYNDICATES = [
"Syndicate 2623 (Beazley)", "Syndicate 2987 (Brit)",
"Syndicate 2001 (MS Amlin)", "Syndicate 1084 (Chaucer)",
"Syndicate 4444 (Canopius)", "Syndicate 1861 (Argo)",
"Syndicate 1200 (Argo)", "Syndicate 5623 (Aon)",
"Syndicate 1729 (Dale)", "Syndicate 1969 (Apollo)",
"Syndicate 2525 (Asta)", "Syndicate 2121 (Argenta)",
]
# ── MGA Names ──
MGA_NAMES = [
"Bravo Networks MGA", "Accelerant Holdings",
"Volante Global", "Three Sixty Underwriting",
"Pen Underwriting", "Plexus MGA",
"Manchester Underwriting", "Alchemy Underwriting",
"Rokstone Underwriting", "Arista Insurance",
"Ennismore MGA", "Flow Underwriting",
]
# ── Claim Types by Line ──
CLAIM_TYPES = {
"Motor Private Car": [
"Accidental damage β€” collision with another vehicle",
"Accidental damage β€” single vehicle (e.g., hit kerb, post)",
"Theft of vehicle", "Theft from vehicle",
"Windscreen damage", "Fire damage",
"Third party bodily injury", "Third party property damage",
"Personal injury β€” whiplash", "Flood damage to vehicle",
],
"Home Buildings": [
"Escape of water β€” burst pipe", "Escape of water β€” leaking roof",
"Storm damage β€” roof tiles", "Storm damage β€” fallen tree",
"Flood damage", "Subsidence", "Heave",
"Fire damage", "Malicious damage",
"Impact damage β€” vehicle into property",
],
"Home Contents": [
"Theft β€” burglary", "Accidental damage β€” spillage on carpet",
"Accidental damage β€” broken TV/laptop",
"Fire damage to contents", "Flood damage to contents",
"Loss of jewellery", "Freezer contents (power failure)",
],
"Employers' Liability": [
"Slip/trip/fall at workplace", "Manual handling injury",
"Repetitive strain injury", "Exposure to hazardous substances",
"Workplace violence", "Work-related stress claim",
"Fall from height", "Machinery accident",
],
"Public Liability": [
"Slip/trip on premises", "Product liability β€” defective goods",
"Property damage during work", "Food poisoning claim",
"Professional negligence", "Advertising injury",
],
"Professional Indemnity": [
"Negligent advice or design", "Breach of duty of care",
"Failure to meet professional standards", "Data breach liability",
"Omission in professional service", "Loss of client documents",
],
"Cyber Liability": [
"Ransomware attack", "Data breach β€” customer PII",
"Business email compromise", "DDoS attack β€” business interruption",
"Social engineering fraud", "Third party data breach claim",
],
"Travel Single Trip": [
"Medical emergency abroad", "Trip cancellation",
"Lost baggage", "Flight delay", "Passport loss",
"Personal belongings theft",
],
}
# ── FCA/Regulatory References ──
FCA_REFERENCES = {
"consumer_duty": "FCA Consumer Duty (PS22/9, effective July 2023)",
"icobs": "ICOBS (Insurance: Conduct of Business sourcebook)",
"fair_treatment": "TCF β€” Treating Customers Fairly principles",
"complaints": "DISP (Dispute Resolution: Complaints sourcebook)",
"claims_handling": "ICOBS 8 β€” Claims handling requirements",
"value_assessment": "FCA PS21/5 General Insurance Value Measures",
"pricing_practices": "FCA PS21/14 General Insurance Pricing Practices",
"solvency_ii": "Solvency II Directive (2009/138/EC) as retained UK law",
"gdpr": "UK GDPR (Data Protection Act 2018)",
"equality_act": "Equality Act 2010 β€” protected characteristics",
"fos": "Financial Ombudsman Service (FOS) referral rights",
}
# ── Policy Wording Sections ──
POLICY_SECTIONS = [
"Definitions", "Operative Clause", "Insuring Clause",
"General Exclusions", "General Conditions", "Claims Conditions",
"Endorsements", "Schedule of Insurance",
"Section 1 β€” Buildings", "Section 2 β€” Contents",
"Section 3 β€” Personal Possessions", "Section 4 β€” Liability",
"Cancellation Clause", "Subrogation Rights",
"Arbitration Clause", "Fraud Clause",
"Sanctions Limitation & Exclusion Clause",
"Several Liability Clause (Lloyd's)",
"Third Party Rights (Contracts) Act 1999 Exclusion",
]
# ── Document Types ──
DOCUMENT_TYPES = [
"Policy Schedule", "Certificate of Insurance",
"Claim Form", "Loss Adjuster Report",
"Bordereaux β€” Premium", "Bordereaux β€” Claims",
"Endorsement", "Renewal Notice",
"Statement of Fact", "FNOL Report",
"Subrogation Notice", "Policy Wording",
]
# ── NER Entity Types ──
NER_ENTITY_TYPES = [
"POLICY_NUMBER", "CLAIM_NUMBER", "INSURED_NAME",
"INSURER_NAME", "BROKER_NAME", "SYNDICATE",
"COVERAGE_TYPE", "CURRENCY_AMOUNT", "DATE",
"POSTCODE", "VEHICLE_REG", "PERIL",
"EXCLUSION", "EXCESS_AMOUNT", "LIMIT_AMOUNT",
]
# ── Insurance Jargon for Training ──
INSURANCE_JARGON = {
"utmost good faith": "Both parties must disclose all material facts honestly.",
"subrogation": "The insurer's right to recover costs from a third party at fault.",
"indemnity": "Restoring the insured to the same financial position as before the loss.",
"proximate cause": "The dominant or effective cause of the loss.",
"excess": "The first amount of any claim that the policyholder must pay themselves.",
"deductible": "Another term for excess β€” the uninsured portion of a claim.",
"aggregate limit": "The maximum total amount an insurer will pay in a policy period.",
"bordereaux": "A detailed listing of premiums or claims, typically sent monthly by an MGA to their capacity provider.",
"coverholder": "A firm authorized by Lloyd's to enter into contracts of insurance on behalf of a syndicate.",
"binding authority": "An agreement allowing a coverholder to underwrite risks on behalf of a syndicate.",
"slip": "The document used in the London Market to place a risk, showing lead and following underwriters.",
"following market": "Underwriters who accept a share of the risk after the lead underwriter has set terms.",
"burning cost": "The ratio of actual claims incurred to premiums received, used to set reinsurance rates.",
"loss ratio": "Claims paid (or incurred) divided by premiums earned, expressed as a percentage.",
"combined ratio": "Loss ratio plus expense ratio β€” below 100% means underwriting profit.",
"IBNR": "Incurred But Not Reported β€” reserves for claims that have occurred but not yet been filed.",
"case reserve": "The estimated cost set aside for a specific known claim.",
"frequency": "The number of claims per unit of exposure.",
"severity": "The average cost per claim.",
"attritional loss": "Expected losses from many small, frequent claims.",
"catastrophe loss": "Large losses from a single event (e.g., storm, flood).",
"FCA Consumer Duty": "FCA regulation requiring firms to act to deliver good outcomes for retail customers.",
"TCF": "Treating Customers Fairly β€” FCA principle predating Consumer Duty.",
"FOS": "Financial Ombudsman Service β€” free dispute resolution for consumers.",
"FSCS": "Financial Services Compensation Scheme β€” protects consumers if an insurer fails.",
}
# ── SFT Task Categories ──
SFT_TASK_CATEGORIES = [
"claims_handling", # Process a claim, assess coverage, set reserves
"policy_analysis", # Explain policy wordings, coverage, exclusions
"fnol", # First Notification of Loss processing
"compliance_check", # FCA Consumer Duty, GDPR, fair pricing checks
"bordereaux_processing", # Parse and validate bordereaux data
"fraud_assessment", # Evaluate fraud indicators
"underwriting_triage", # Assess a submission, recommend terms
"customer_communication", # Draft policyholder letters/emails
"reserve_setting", # Set/review claim reserves with rationale
"renewal_review", # Assess a renewal, flag changes
"jargon_explanation", # Explain insurance terms in plain English
"regulatory_query", # Answer regulatory questions (FCA, PRA, Lloyd's)
]
# ── DPO Preference Dimensions ──
DPO_PREFERENCE_DIMENSIONS = [
"fca_consumer_duty", # Chosen: consumer-fair; Rejected: unfair/opaque
"accuracy", # Chosen: factually correct; Rejected: hallucinated
"regulatory_compliance", # Chosen: compliant; Rejected: non-compliant
"plain_english", # Chosen: clear; Rejected: jargon-heavy
"data_protection", # Chosen: GDPR-safe; Rejected: leaks PII
"fair_pricing", # Chosen: non-discriminatory; Rejected: uses protected characteristics
]
MGAS = MGA_NAMES # alias for backward compat