Developer API

Designing Decision Models

In ZeroTrain, decision models are defined using structured data. Each row represents a possible outcome, and inputs are evaluated against that structure.

Core Idea

  • Columns define attributes used for evaluation
  • Rows represent possible outcomes
  • The system selects the best matching row

Example 1: Rule-Based Model (Optional Logic in Cells)

In some cases, conditions can be expressed directly within the data.

CreditScore Income Decision
>= 700 >= 50000 APPROVE
>= 600 >= 30000 REVIEW
< 600 Any REJECT

Input

{
  "CreditScore": 720,
  "Income": 55000
}

Result

{
  "decision": "APPROVE"
}

Example 2: Data-Driven Model (No Logic Required)

Decision models do not require logic within the data. Rows can represent known scenarios, and the system evaluates alignment to determine the best outcome.

CreditScore Income EmploymentYears Decision
720 55000 5 APPROVE
680 48000 3 REVIEW
590 25000 1 REJECT
710 52000 4 APPROVE

Input

{
  "CreditScore": 705,
  "Income": 51000,
  "EmploymentYears": 4
}

Result

{
  "decision": "APPROVE"
}

Key Insight

Decision models can be defined using explicit conditions, structured data, or a combination of both. There is no requirement to encode logic within the data.

Model Sources

  • Database tables
  • CSV files
  • Spreadsheets
  • Generated datasets

Design Considerations

  • Use logic when clear thresholds are required
  • Use structured data to represent real-world scenarios
  • Combine both approaches when needed

Summary

ZeroTrain models are built from structured data. Logic can be included, but it is not required. The system evaluates inputs against the data to determine the most appropriate outcome.