API docs
Concepts

Facts

How restriction facts are extracted and structured.

What is a fact?

A fact is a single piece of structured data extracted from an HOA document. Facts represent specific restrictions, requirements, or rules that apply to properties within an HOA.

Fact structure

Each fact contains:

{
  "id": "fact_abc123",
  "document_id": "doc_xyz789",
  "fact_type": "rental_restriction",
  "fact_value": {
    "restriction_type": "minimum_lease_term",
    "minimum_months": 12,
    "description": "All leases must be for a minimum term of twelve months"
  },
  "confidence": 0.94,
  "citation": {
    "page": 14,
    "section": "Article VII, Section 3"
  },
  "created_at": "2024-01-15T10:30:00Z"
}

Flexible schema

The fact_type field is plain text and fact_value is JSON, so new restriction types can be added without database migrations. This design allows the platform to grow as new document types and restriction categories are discovered.

Extraction pipeline

Facts are created through a two-stage process:

  1. Analysis — Azure Content Understanding processes the document and extracts raw fields
  2. Normalization — Raw fields are converted to structured restriction facts with proper typing and citations

On this page