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

# Reranker Protocol • Rust AI Agent SDK

> RerankerProtocol: Protocol for reranker implementations.

# RerankerProtocol

> Defined in the [**knowledge**](../modules/knowledge) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Protocol for reranker implementations.

## Methods

### `rerank`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async fn rerank(&self, query: &str, items: Vec<SearchResultItem>, limit: usize) -> Result<RerankResult>
```

Rerank search results

**Parameters:**

| Name    | Type                          |
| ------- | ----------------------------- |
| `query` | `&str`                        |
| `items` | `Vec&lt;SearchResultItem&gt;` |
| `limit` | `usize`                       |

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/knowledge/mod.rs">
  `praisonai/src/knowledge/mod.rs` at line 0
</Card>
