Skip to main content

AI Model Strategy

The platform should support multiple AI providers behind a routing layer. The business workflow should not depend directly on one provider API.

Provider comparison

ProviderStrengthsBest use
OpenAI GPTStrong structured extraction, reliable JSON, good reasoning over mixed documents.Rental contracts, complex bills, ambiguous documents.
Anthropic ClaudeStrong long-context reading and careful language understanding.Long contracts, dense legal documents, multi-page schedules.
Google GeminiStrong multimodal handling and broad document understanding.Scanned documents, image-heavy bills, mixed visual layouts.
DeepSeekCost-effective text reasoning for simpler extraction tasks.Invoices, straightforward schedules, second-pass validation.

Routing strategy by document type

Document typePrimary modelFallback
Rental contractsOpenAI GPT or ClaudeGemini for image-heavy scans
Utility contractsOpenAI GPTClaude
Utility billsGemini or OpenAI GPTDeepSeek for normalized text
Bank transaction fallbackOpenAI GPTDeepSeek
InvoicesDeepSeek or OpenAI GPTGemini for scanned invoices
Tax documentsOpenAI GPTClaude
Condominium schedulesClaudeOpenAI GPT
Insurance contractsClaude or OpenAI GPTGemini
Property ownership documentsClaudeOpenAI GPT

Fallback logic

Fallback should be triggered when:

  • JSON is invalid
  • classification confidence is low
  • required fields are missing
  • OCR output is poor
  • model returns unsupported values
  • backend validation fails for format-sensitive fields

Prompt versioning

Prompts should be versioned by document type. A saved extraction job should record:

  • provider
  • model
  • prompt version
  • schema version
  • token usage
  • latency
  • confidence summary

Practical recommendation

Start with one high-accuracy model for the first production workflows. Add routing after enough extraction logs exist to identify which document types are expensive or error-prone.