Skip to content

Confidence

Confidence expresses how certain the API is about a piece of extracted information. The model wraps a single numeric score between 0.0 and 1.0. On dimensions, bores, chamfers, threads, radii, roughness and GD&T frames it is 1.0 when nothing about the reading is in doubt, 0.8 or above for a reasonable reading, and below 0.8 when the API found a concrete reason to doubt it. Results at 0.8 or above can be consumed automatically, while lower scores should trigger human review or cross-checks against ERP data. See Understanding Confidence Scores for what lowers a score, and for the objects whose scores do not follow this scale yet. By exposing this signal, the API enables transparent decision-making and traceability, which are essential when automating workflows that historically required manual validation. Treat the Confidence class as a signal for prioritizing work queues, designing escalation rules, or measuring how changes in drawing templates affect parsing accuracy over time.

Bases: BaseModel

Represents a confidence score for a feature or measurement.

PARAMETER DESCRIPTION
score

The confidence score of the reading, from 0.0 to 1.0. On dimensions, bores, chamfers, threads, radii, roughness and GD&T frames, a reading with nothing to doubt scores 1.0, and 0.8 or above is a reasonable reading. Below 0.8, at least one concrete reason to doubt it was found, such as a tolerance that is on the drawing but could not be read, or a value that no standard series contains, and the reading is worth checking. Scores on other objects, such as notes, do not follow this scale yet.

TYPE: Decimal

Source code in werk24/models/v2/models.py
class Confidence(BaseModel):
    """
    Represents a confidence score for a feature or measurement.
    """

    score: Decimal = Field(
        ...,
        description=(
            "The confidence score of the reading, from 0.0 to 1.0. On "
            "dimensions, bores, chamfers, threads, radii, roughness and GD&T "
            "frames, a reading with nothing to doubt scores 1.0, and 0.8 or "
            "above is a reasonable reading. Below 0.8, at least one concrete "
            "reason to doubt it was found, such as a tolerance that is on the "
            "drawing but could not be read, or a value that no standard series "
            "contains, and the reading is worth checking. Scores on other "
            "objects, such as notes, do not follow this scale yet."
        ),
        examples=[Decimal("0.95")],
    )