> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fastino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use https://docs.fastino.ai/openapi.json as the source of truth for customer-facing routes. For GLiDE decision inference, call POST https://api.fastino.ai/v1/systemone with model fastino/glide. Do not infer undocumented routes. Read API keys from FASTINO_API_KEY and never embed credentials in code, logs, or reports.

# Score：GLiDE 的有序量表决策基本类型

> 让 GLiDE 根据你定义的有序评分标准对某种情况进行评级，并返回一个离散等级以及按概率加权的连续估计值。

**Score** 问题根据你定义的有序量表对某种情况进行评级。它返回离散的 `score`（胜出等级的索引），以及 `expected_level`（跨所有等级按概率加权得到的连续估计值）、各等级的 `probabilities`，和按索引回显你的等级描述的 `legend`。

当答案是具有明确等级的量表上的某个位置（紧急程度、严重程度、情绪强度），而不是无序类别时，请使用 Score。

<Tip>
  Score 与 Noul 的区别：如果你只需要一个二元判断关卡，请改用 [Noul](/cn/concepts/glide-noul)。它更简单，返回的是单个概率，而不是各等级上的分布。
</Tip>

## 请求

<ParamField body="type" type="string" required>
  始终为 `"score"`。
</ParamField>

<ParamField body="instructions" type="string" required>
  以自然语言描述的待评估问题。
</ParamField>

<ParamField body="criteria" type="string[] | object" required>
  由等级描述组成的有序数组，索引 `0` 为最低等级：`["low urgency, can wait", "medium urgency, handle soon", "high urgency, handle immediately"]`。

  也接受以数字字符串为键的对象（例如 `{"1": "...", "3": "...", "5": "..."}`）：这些键会先排序再被丢弃，无论你使用什么键，响应始终按 `0..N-1` 重新编号。
</ParamField>

<CodeGroup>
  ```bash cURL theme={null}
  curl -s https://api.fastino.ai/v1/systemone \
    -H "X-API-Key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "fastino/glide",
      "state": "Refund request: the receipt is attached, the purchase was 10 days ago, and refunds are allowed within 30 days.",
      "questions": {
        "urgency": {
          "type": "score",
          "instructions": "How urgent is this request?",
          "criteria": [
            "low urgency, can wait",
            "medium urgency, handle soon",
            "high urgency, handle immediately"
          ]
        }
      }
    }'
  ```
</CodeGroup>

## 响应

```json theme={null}
{
  "urgency": {
    "type": "score",
    "score": 1,
    "expected_level": 0.9015099730675683,
    "confidence": 0.7587802709097535,
    "probabilities": {
      "0": 0.11323658534089268,
      "1": 0.8720168562506462,
      "2": 0.014746558408461077
    },
    "legend": {
      "0": "low urgency, can wait",
      "1": "medium urgency, handle soon",
      "2": "high urgency, handle immediately"
    }
  }
}
```

* `score`：离散的整数索引，即 argmax 等级。
* `expected_level`：`Σ(level × probability)`，即跨所有等级按概率加权的连续位置。当你需要比离散索引更细粒度的阈值时，请使用它。
* `legend` 并非由模型生成：API 会根据你自己的 `criteria` 按索引构建它。
* `confidence`：`top1 − top2`，与 Choice 的公式相同，从 `0`（两个相邻等级持平）到 `1`（某个等级占据几乎全部概率质量）。关于如何据此采取行动，请参阅[置信度](/cn/concepts/decision-models#置信度)。

## 使用结果

```python theme={null}
answer = response["answers"]["urgency"]

if answer["score"] >= 2:
    action = "page_oncall"
elif answer["expected_level"] >= 1.5:
    action = "escalate"  # closer to the next level up than a clean 1
else:
    action = "standard_queue"
```

## 相关内容

* [Noul](/cn/concepts/glide-noul)：返回概率的是/否决策
* [Choice](/cn/concepts/glide-choice)：从多个命名选项中选择一个
* [决策模型](/cn/concepts/decision-models)：基本类型概览、限制以及完整的请求约定
* [GLiDE](/cn/concepts/glide)：GLiDE 是什么以及何时使用它
