> For the complete documentation index, see [llms.txt](https://docs.layerlens.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.layerlens.ai/more-in-this-section-9/results.md).

# Results

After an evaluation completes, retrieve per-prompt results via `client.results`.

## All results (auto-paginated)

```python
all_results = client.results.get_all(evaluation=evaluation)
# Returns List[Result] across all pages

# By ID
all_results = client.results.get_all_by_id(evaluation.id)
```

## One page

```python
response = client.results.get(evaluation=evaluation, page=1, page_size=100)
# By ID
response = client.results.get_by_id(evaluation_id, page=1, page_size=100)

# response is ResultsResponse:
#.results -> List[Result]
#.evaluation_id
#.pagination.total_count,.pagination.page_size,.pagination.total_pages
```

## Result object

```python
for r in all_results:
 print(r.subset) # benchmark subset (e.g., "math/algebra"); optional
 print(r.prompt) # the input prompt
 print(r.result) # model output
 print(r.truth) # expected answer
 print(r.score) # 0.0–1.0 typically
 print(r.duration) # Python timedelta
 print(r.metrics) # Dict[str, float], benchmark-specific
```

## Manual pagination loop

```python
page = 1
while True:
 response = client.results.get_by_id(evaluation_id, page=page, page_size=100)
 if not response or not response.results:
 break
 for r in response.results:
 process(r)
 if page >= response.pagination.total_pages:
 break
 page += 1
```

## Concurrent across many evaluations

```python
import asyncio
from layerlens import AsyncStratix

async def fetch_all(eval_ids):
 client = AsyncStratix()
 return await asyncio.gather(*[
 client.results.get_all_by_id(eid) for eid in eval_ids
 ])
```

## On the Evaluation object

`Evaluation` instances have shortcut methods:

```python
results_page = evaluation.get_results(page=1, page_size=50) # sync
all_results = evaluation.get_all_results() # sync
results_page = await evaluation.get_results_async(page=1) # requires AsyncStratix
all_results = await evaluation.get_all_results_async() # requires AsyncStratix
```

## See also

* [Evaluations](/more-in-this-section-9/evaluations-1.md)
* [SDK examples: retrieving-results](https://github.com/layerlens/stratix-python/blob/main/docs/examples/retrieving-results.md)
* [SDK sample: `paginated_results.py`](https://github.com/layerlens/stratix-python/blob/main/samples/core/paginated_results.py)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.layerlens.ai/more-in-this-section-9/results.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
