## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://docs.typesafe.ai/llms.txt)

Use this file to discover all available pages before exploring further.

```
function score<T>(instructions, criteria): ScoreQuestion<T>;
```

Create a score question using an ordered rubric.

## Type Parameters

### T

`T` _extends_ [`ScoreCriteria`](https://docs.typesafe.ai/sdk/javascript/api/type-aliases/ScoreCriteria)

## Parameters

### instructions

[`EntryType`](https://docs.typesafe.ai/sdk/javascript/api/type-aliases/EntryType) The question as text, a JSON object or array, or `null`.

### criteria

`T` At least two descriptions indexed by score from zero; entries may be `null`.

## Returns

[`ScoreQuestion`](https://docs.typesafe.ai/sdk/javascript/api/interfaces/ScoreQuestion) <`T`>
