Structured decisions
PI Labs Decision
Provide text and ask a yes-or-no question, pick from a list, or score it against a rubric. See the probability for each possible answer.
Result
Run a decision to see the answer and its probability distribution here.
Successful Decision requests start at 0.02 Energy. PI Detect scans start at 0.05 Energy. If twice the provider cost converts to more Energy, that rate applies.
Use the API
Send a JSON POST to /api/v1/decisions with an Authorization: Bearer header containing your PI Labs token. Use yes_no, choice, or score for the mode.View your account.
{
"model": "pilabs-decision",
"context": "I was charged twice for the same invoice.",
"question": "Which team should handle this?",
"mode": "choice",
"options": [
"Billing",
"Technical support",
"Sales"
]
}To classify multiple items or assess several criteria, send 1 to 20 named questions about a shared text, JSON object or JSON array. Each question can set its own mode and options. The response returns an answers array in request order, with the same IDs and an answered or refused status for each question. A batch with answers is billed once.
{
"model": "pilabs-decision",
"context": [
{
"id": "a",
"text": "I was charged twice."
},
{
"id": "b",
"text": "Export fails every time."
}
],
"questions": [
{
"id": "a_team",
"question": "Which team should handle item a?",
"mode": "choice",
"options": [
"Billing",
"Support"
]
},
{
"id": "b_urgent",
"question": "Does item b describe an urgent problem?",
"mode": "yes_no"
}
]
}