Evaluations
Mutations
Section titled “Mutations”| Operation | Returns | Description |
|---|---|---|
claimEvaluation staffql onlyinput: EvaluationClaimInput! |
EvaluationClaimPayload |
Leases the oldest waiting work of these types (every type the token holds by default) to this worker; null when there is none. requires evaluations:write:* |
completeEvaluation staffql onlyinput: EvaluationCompleteInput! |
EvaluationCompletePayload |
Answers work this worker holds the lease on: a probability per option, the options it can’t rule out, and what it found. What it was unsure of, or that nothing decides on its own, goes to a person. requires evaluations:write:* |
failEvaluation staffql onlyinput: EvaluationFailInput! |
EvaluationFailPayload |
Gives back work this worker can’t answer: it is tried again until it runs out of attempts, and then a person decides it unanswered. requires evaluations:write:* |
renewEvaluationLease staffql onlyinput: EvaluationLeaseRenewInput! |
EvaluationLeaseRenewPayload |
Keeps the lease on work this worker is still on for another ten minutes. requires evaluations:write:* |
Subscriptions
Section titled “Subscriptions”| Operation | Returns | Description |
|---|---|---|
evaluationQueue staffql onlyevaluationTypes: [String!] |
EvaluationsAvailable! |
Tells a worker device that work of the types it follows is waiting on the evaluation queue: once on subscribing when any is, then as work is queued, and each minute while it waits. requires evaluations:write:* |
Objects
Section titled “Objects”DecisionOption
Section titled “DecisionOption”Object · staffql only
One answer a decision offers, with the worker’s probability for it once it has answered.
| Field | Type | Description |
|---|---|---|
description staffql only |
String |
What choosing it means. |
inConformalSet staffql only |
Boolean! |
Whether the worker couldn’t rule it out. More than one option in the set reads as unsure. |
key staffql only |
String! |
Its key, as workers answer with it. |
label staffql only |
String! |
Its name, for people. |
score staffql only |
Float |
The worker’s probability for it, 0 to 1; null before it answered. |
EvaluationsAvailable
Section titled “EvaluationsAvailable”Object · staffql only
Work is waiting on the evaluation queue: claim it with claimEvaluation until it answers null.
| Field | Type | Description |
|---|---|---|
evaluationTypes staffql only |
[String!]! |
The types with work waiting, of those followed. |
pending staffql only |
Int! |
How many are waiting, of the types followed. |
EvaluationWork
Section titled “EvaluationWork”Object · staffql only
Work a worker device claimed from the evaluation queue: the decision to make, what to look at, and the lease to answer with before it runs out.
| Field | Type | Description |
|---|---|---|
attempt staffql only |
Int! |
Which attempt this is, from 1. |
decisionKind staffql only |
DecisionKind! |
How to answer. |
evaluationType staffql only |
String! |
What kind of work, e.g. submission_research. |
id staffql only |
ID! |
Its ID. |
input staffql only |
JSON! |
What to look at. It names nobody. |
lease staffql only |
String! |
The lease to answer with. |
leaseExpiresAt staffql only |
ISO8601DateTime! |
When the lease runs out; renew it before then for longer work. |
options staffql only |
[DecisionOption!]! |
The answers to choose from; score each one. |
question staffql only |
String |
What the decision asks. |
EvaluationWorkResult
Section titled “EvaluationWorkResult”Object · staffql only
Work a worker answered or gave back, as the queue now has it.
| Field | Type | Description |
|---|---|---|
id staffql only |
ID! |
Its ID. |
needsPerson staffql only |
Boolean! |
Whether it now waits for a person. |
state staffql only |
String! |
pending (to try again), completed or failed. |
unsure staffql only |
Boolean! |
Whether the worker’s answer read as unsure. |
Mutation payloads
Section titled “Mutation payloads”EvaluationClaimPayload
Section titled “EvaluationClaimPayload”Object · staffql only
Autogenerated return type of EvaluationClaim.
| Field | Type | Description |
|---|---|---|
clientMutationId staffql only |
String |
A unique identifier for the client performing the mutation. |
work staffql only |
EvaluationWork |
The work, or null when none is waiting. |
EvaluationCompletePayload
Section titled “EvaluationCompletePayload”Object · staffql only
Autogenerated return type of EvaluationComplete.
| Field | Type | Description |
|---|---|---|
clientMutationId staffql only |
String |
A unique identifier for the client performing the mutation. |
decision staffql only |
EvaluationWorkResult! |
The work, answered. |
EvaluationFailPayload
Section titled “EvaluationFailPayload”Object · staffql only
Autogenerated return type of EvaluationFail.
| Field | Type | Description |
|---|---|---|
clientMutationId staffql only |
String |
A unique identifier for the client performing the mutation. |
decision staffql only |
EvaluationWorkResult! |
The work, given back. |
EvaluationLeaseRenewPayload
Section titled “EvaluationLeaseRenewPayload”Object · staffql only
Autogenerated return type of EvaluationLeaseRenew.
| Field | Type | Description |
|---|---|---|
clientMutationId staffql only |
String |
A unique identifier for the client performing the mutation. |
leaseExpiresAt staffql only |
ISO8601DateTime! |
When it runs out now. |
Inputs
Section titled “Inputs”EvaluationClaimInput
Section titled “EvaluationClaimInput”Input · staffql only
Autogenerated input type of EvaluationClaim
| Field | Type | Description |
|---|---|---|
clientMutationId staffql only |
String |
A unique identifier for the client performing the mutation. |
evaluationTypes staffql only |
[String!] |
Only these types, of those the token holds. |
EvaluationCompleteInput
Section titled “EvaluationCompleteInput”Input · staffql only
Autogenerated input type of EvaluationComplete
| Field | Type | Description |
|---|---|---|
choice staffql only |
String |
Its answer, when not the highest scored option. |
clientMutationId staffql only |
String |
A unique identifier for the client performing the mutation. |
confidence staffql only |
Float |
How sure it is of its choice, 0 to 1; by default the choice’s score. |
conformalSet staffql only |
[String!] |
The options it couldn’t rule out; more than one reads as unsure. By default the choice alone when it is confident. |
id staffql only |
ID! |
The work. |
lease staffql only |
String! |
The lease it was claimed with. |
result staffql only |
JSON |
What it found, in its type’s shape. |
scores staffql only |
JSON |
Its probability per option key: {key: 0.8}. |
EvaluationFailInput
Section titled “EvaluationFailInput”Input · staffql only
Autogenerated input type of EvaluationFail
| Field | Type | Description |
|---|---|---|
clientMutationId staffql only |
String |
A unique identifier for the client performing the mutation. |
error staffql only |
String |
What went wrong, for the people who decide it. |
id staffql only |
ID! |
The work. |
lease staffql only |
String! |
The lease it was claimed with. |
EvaluationLeaseRenewInput
Section titled “EvaluationLeaseRenewInput”Input · staffql only
Autogenerated input type of EvaluationLeaseRenew
| Field | Type | Description |
|---|---|---|
clientMutationId staffql only |
String |
A unique identifier for the client performing the mutation. |
id staffql only |
ID! |
The work. |
lease staffql only |
String! |
The lease it was claimed with. |
DecisionKind
Section titled “DecisionKind”Enum · staffql only
How a decision is answered.
CHOICEOne of several options.SCOREA score: the options are the points on its scale.YES_NOYes or no: two options, yes and no.