Skip to main content

EvaluationResultsClient

adaline.prompts.evaluations.results returns per-row evaluation results as they become available, with optional grade and score filters. Because rows appear incrementally while an evaluation runs, you can poll this client to surface partial progress. For long-running evaluations, prefer adaline.initEvaluationResults() — it wraps this client in a self-refreshing cache.

Access

import { Adaline } from '@adaline/client';

const adaline = new Adaline();
const results = adaline.prompts.evaluations.results; // EvaluationResultsClient
The class is also exported directly:
import { EvaluationResultsClient } from '@adaline/client';
import type { EvaluationResultsQuery } from '@adaline/client';
Types from @adaline/api:
import type { ListEvaluationResultsResponse } from '@adaline/api';

list()

Fetch a page of evaluation results. Rows are returned as they become available, so you can poll this while an evaluation is still running to surface partial progress.
list(query: EvaluationResultsQuery): Promise<ListEvaluationResultsResponse>

Parameters

NameTypeRequiredDescription
queryEvaluationResultsQueryYesIdentifiers + filters + pagination.
EvaluationResultsQuery fields:
NameTypeDescription
promptIdstringPrompt the evaluation belongs to.
evaluationIdstringEvaluation to inspect.
grade'pass' | 'fail' | 'unknown'Optional filter by grade.
expand'row'Include the underlying dataset row inline.
sort'createdAt:asc' | 'createdAt:desc' | 'score:asc' | 'score:desc'Sort order.
limitnumberPage size.
cursorstringCursor from a previous response.

Returns

Promise<ListEvaluationResultsResponse> with { data: EvaluationResult[]; pagination: Pagination }. Each EvaluationResult has the evaluator’s grade, score, metadata, and — if expand: 'row' was requested — the originating row.

Example

const { data, pagination } = await adaline.prompts.evaluations.results.list({
  promptId: 'prompt_abc123',
  evaluationId: 'eval_abc123',
  grade: 'fail',
  expand: 'row',
  sort: 'score:desc',
  limit: 50,
});

for (const result of data) {
  console.log(`grade=${result.grade} score=${result.score}`);
}
For a self-refreshing cache rather than manual polling, use adaline.initEvaluationResults().

See Also