Open History to see the last commit
1---
2id: RerankAdapterResult
3title: RerankAdapterResult
4---
5
6Defined in: [packages/ai/src/types.ts:1904](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1904)
7
8Provider-level rerank result. Adapters return scored indices into the
9(serialized) `documents` array plus usage — never the documents themselves.
10The activity attaches the original documents.
11
12## Properties
13
14### id
15
16```ts
17id: string;
18```
19
20Defined in: [packages/ai/src/types.ts:1905](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1905)
21
22***
23
24### ranking
25
26```ts
27ranking: object[];
28```
29
30Defined in: [packages/ai/src/types.ts:1907](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1907)
31
32Scored results, highest relevance first, as indices into `documents`.
33
34#### index
35
36```ts
37index: number;
38```
39
40#### score
41
42```ts
43score: number;
44```
45
46***
47
48### usage
49
50```ts
51usage: TokenUsage;
52```
53
54Defined in: [packages/ai/src/types.ts:1908](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1908)