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

# EvaluationResultsQuery

# EvaluationResultsQuery

Shape of the query arguments passed to [`EvaluationResultsClient.list`](https://www.adaline.ai/docs/reference/sdk/v2/python/classes/evaluation-results#list) and [`Adaline.init_evaluation_results`](https://www.adaline.ai/docs/reference/sdk/v2/python/classes/adaline#init_evaluation_results). The Python SDK takes these as keyword arguments rather than a single object — the shape here is documentation for what the polling helper replays on every refresh.

## Shape

```python theme={null}
{
    "prompt_id": str,
    "evaluation_id": str,
    "grade": Optional[str],     # "pass" | "fail" | "unknown"
    "expand": Optional[str],    # "row"
    "sort": Optional[str],      # "createdAt:asc" | "createdAt:desc" | "score:asc" | "score:desc"
    "limit": Optional[int],
    "cursor": Optional[str],
}
```

## Fields

| Field | Type | Description |
| - | - | - |
| `prompt_id` | `str` | Prompt the evaluation belongs to. Required. |
| `evaluation_id` | `str` | Evaluation whose results you want. Required. |
| `grade` | `Optional[str]` | Only return rows with this grade: `"pass"`, `"fail"`, or `"unknown"`. |
| `expand` | `Optional[str]` | If `"row"`, each result includes its underlying dataset row. |
| `sort` | `Optional[str]` | `"createdAt:asc"`, `"createdAt:desc"`, `"score:asc"`, or `"score:desc"`. |
| `limit` | `Optional[int]` | Page size. |
| `cursor` | `Optional[str]` | Opaque cursor returned by the previous response's `pagination.next_cursor`. |

## Usage

```python theme={null}
# One-shot fetch
page = await adaline.prompts.evaluations.results.list(
    prompt_id="prompt_abc123",
    evaluation_id="eval_abc123",
    grade="fail",
    expand="row",
    sort="score:desc",
    limit=50,
)

# Or keep a polling cache refreshed in the background
results = await adaline.init_evaluation_results(
    prompt_id="prompt_abc123",
    evaluation_id="eval_abc123",
    grade="fail",
    expand="row",
    sort="score:desc",
    limit=50,
    refresh_interval=30,
)

page = await results.get()
```

## See Also

* [EvaluationResultsClient](https://www.adaline.ai/docs/reference/sdk/v2/python/classes/evaluation-results.md)
* [PromptEvaluationsClient](https://www.adaline.ai/docs/reference/sdk/v2/python/classes/prompt-evaluations.md)
* [Adaline.init\_evaluation\_results](https://www.adaline.ai/docs/reference/sdk/v2/python/classes/adaline.md#init_evaluation_results)
* [BackgroundStatus](https://www.adaline.ai/docs/reference/sdk/v2/python/types/BackgroundStatus.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.