Outcomes
The one figure that needs your own system: what happened after a call, reported against its passport. Optional.
What an outcome is#
A passport records that a call happened. Whether the answer was used, the ticket was resolved or the customer was satisfied exists only in your own systems. An outcome is such a value, reported later against the passport: a score, a count.
Outcomes are optional. Without them a passport is complete, and the figures still show cost, speed and errors. With them, the Platform and the Model Arena can also show what each model achieved.
Metrics#
Every node takes two metrics without setup, score and count. Both take whole numbers. They are created on the node's first outcome. You can define your own metrics per node on the Platform.
Three ways to report#
- The outcome address. Every answer carries an outcome URL for that call: the
X-OSPP-Outcome-URLheader andospp.outcome_urlin the body, with the path/v1/o/<run_id>/<token>.POSTJSON such as{"values": {"score": 1}}to it; a flat object of whole numbers such as{"score": 1}works too. No API key is needed, so treat the URL as a secret. It works for that one passport only. - The outcome API.
POST /v1/outcomeswith your API key and{"passport_id": "...", "values": {...}}. - The node's signed webhook. One address per node, switched on in the node's outcome settings, for a system that reports for many calls. Each delivery is signed with the node's own secret, so that system needs neither your API key nor an outcome address per call.
All take an optional observed_at (when it happened) and an optional idempotency_key (so a repeated report is not recorded twice).
An outcome is reported against a passport, so the passport has to exist. Until it is issued the outcome address answers 409 PASSPORT_PENDING; send the outcome again a moment later. For a call that failed it answers 409 NO_PASSPORT. One passport takes at most 30 updates per minute through its address.
All three are described in outcomes on the endpoint.
What is recorded#
Every outcome is appended to the passport's history as a witnessed event, labelled with how it arrived: address for the outcome address, api for the outcome API, webhook for the node's webhook. The original passport does not change. A passport can take several updates; the latest value of each metric is the one the figures use. OSPP records outcomes; it does not claim they are true.
Where outcomes show#
- On the Platform, in the figures of the node and of each model; see calls.
- In a Model Arena comparison, beside cost, speed and reliability.
- In the Finance statement, which divides model cost by a metric's total to give cost per outcome.
