Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gorules.io/llms.txt

Use this file to discover all available pages before exploring further.

This guide shows how to build insurance underwriting rules that assess risk, calculate premiums, and determine policy terms.

What you’ll build

An underwriting decision that:
  • Evaluates applicant risk factors
  • Calculates risk-adjusted premiums
  • Determines coverage eligibility
  • Applies regulatory constraints
Want to skip ahead? Download the completed decision and import it directly.

Decision flow

Example: Auto insurance quote

Input data

{
  "applicant": {
    "age": 28,
    "yearsLicensed": 10,
    "accidentsLast5Years": 0,
    "violationsLast3Years": 1,
    "creditTier": "good"
  },
  "vehicle": {
    "year": 2022,
    "make": "Toyota",
    "model": "Camry",
    "value": 28000,
    "safetyRating": 5,
    "antiTheft": true
  },
  "coverage": {
    "type": "full",
    "deductible": 500,
    "state": "CA"
  }
}

Step 1: Driver risk assessment

Score driver risk factors:

Step 2: Driving history

Assess accidents and violations:

Step 3: Vehicle risk

Assess vehicle factors:

Step 4: Calculate base premium

Step 5: Coverage and deductible adjustments

Step 6: Credit-based adjustment

Step 7: Final premium calculation

Step 8: Eligibility decision

Output structure

{
  "decision": "approve",
  "annualPremium": 1247.50,
  "monthlyPremium": 103.96,
  "riskFactors": {
    "driver": 1.0,
    "history": 1.0,
    "vehicle": 0.9,
    "credit": 1.0,
    "combined": 0.9
  },
  "coverage": {
    "type": "full",
    "deductible": 500,
    "liability": 100000
  }
}

Regulatory compliance

State-specific rules

Best practices

Audit all decisions — Log every factor for regulatory review. Version rating tables — Track when rates change for policy renewals. Handle edge cases — New drivers, antique vehicles, rideshare use. Test extensively — Validate against known good quotes.