# Score

> **Class** in `langchain_openai`

📖 [View in docs](https://reference.langchain.com/python/langchain-openai/decisions/types/Score)

Rate the input against ordered levels.

Levels are indexed from `0` in the order supplied. The returned score is the
probability-weighted average of those indices, so it may fall between levels.

??? example "Score issue severity"

    ```python
    from langchain_openai.decisions import Level, OpenAIDecisions, Score

    decisions = OpenAIDecisions(model="gpt-6-luna")
    response = decisions.invoke(
        {
            "input": "Export fails in Safari but works in Chrome.",
            "questions": {
                "severity": Score(
                    instructions="How severe is this issue?",
                    levels=[
                        Level(label="Cosmetic", description="No lost function."),
                        Level(label="Workaround", description="Another way works."),
                        Level(label="Blocked", description="No workaround."),
                    ],
                ),
            },
        }
    )
    print(response.scores["severity"].score)  # May be fractional, e.g. 1.1
    ```

## Signature

```python
Score()
```

## Extends

- `BaseModel`

## Properties

- `type`
- `instructions`
- `levels`

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/16a08bda1247010c23fcfa887e421259a5fced5e/libs/partners/openai/langchain_openai/decisions/types.py#L132)