continue-custom/docs/customize/model-roles/reranking.mdx
continue[bot] db8bed0357 Consolidate duplicate documentation paths from /customization/ to /customize/
This consolidation addresses CON-4476 by eliminating confusing duplicate documentation paths.

## Changes Made

### Structure Consolidation
- Removed /docs/customization/ directory entirely
- Kept /docs/customize/ as the single canonical path (it contains comprehensive content including deep-dives, model-providers, and model-roles)
- Moved better overview content from /customization/overview.mdx to /customize/overview.mdx
- Added new top-level pages to /customize/: models.mdx, mcp-tools.mdx, rules.mdx, prompts.mdx, settings.mdx

### Navigation Updates
- Removed duplicate "Customization" tab from docs.json navigation
- Updated "Customize" tab to include the new top-level pages
- All customization content now appears in a single, well-organized tab

### Redirects
- Added redirects from all /customization/* paths to /customize/*
- Ensures backward compatibility for bookmarks and external links
- Updated existing redirects that pointed to /customization/overview

### Link Updates
- Updated 16+ internal documentation links from /customization/ to /customize/
- Updated image paths from /images/customization/ to /images/customize/
- Consolidated image directories (removed /docs/images/customization/)

## Reasoning for Content Decisions

### Why Keep /customize/ Over /customization/?
1. More concise - Shorter path is easier to type and remember
2. Complete structure - Already contained extensive subdirectories (deep-dives/, model-providers/, model-roles/)
3. Active development - Model provider docs and deep-dives are actively maintained here
4. Better organization - Clear hierarchy with specialized subdirectories

### Content Consolidation Strategy
- Overview page: Used /customization/overview.mdx as base (clearer introduction and practical examples)
- New pages: Brought over /customization/ files that provided good card-based overviews for models, rules, prompts, MCP, and settings
- Deep-dives: Kept existing comprehensive /customize/deep-dives/ content (no overlap with /customization/)
- Model providers: Kept existing /customize/model-providers/ (no equivalent in /customization/)
- Model roles: Kept existing /customize/model-roles/ (no equivalent in /customization/)

### Deleted Content Justification
All files from /docs/customization/ were either:
1. Duplicates with less comprehensive content than /customize/ equivalents
2. Moved to /customize/ to serve as helpful overview pages
3. No unique information lost - content was either redundant or merged

## Success Metrics Addressed
- Zero duplicate documentation paths
- All internal links functional (verified)
- Clear single source of truth for customization
- Backward compatibility via redirects

Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <noreply@continue.dev>
Co-authored-by: Username <nate@continue.dev>
2025-11-11 15:49:18 -05:00

110 lines
3.4 KiB
Text

---
title: Rerank Role
description: Rerank model role
keywords: [rerank, reranking, model, role]
sidebar_position: 6
---
A "reranking model" is trained to take two pieces of text (often a user question and a document) and return a relevancy score between 0 and 1, estimating how useful the document will be in answering the question. Rerankers are typically much smaller than LLMs, and will be extremely fast and cheap in comparison.
In Continue, rerankers are designated using the `rerank` role and used by [codebase awareness](/guides/codebase-documentation-awareness) in order to select the most relevant code snippets after vector search.
## Recommended reranking models
<Info>
For a comparison of all reranking models including open and closed options, see our [comprehensive model recommendations](/customize/models#recommended-models).
</Info>
If you have the ability to use any model, we recommend `rerank-2` by Voyage AI, which is listed below along with the rest of the options for rerankers.
### Voyage AI
Voyage AI offers the best reranking model for code with their `rerank-2` model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure a reranker as follows:
<Tabs>
<Tab title="Hub">
```yaml title="config.yaml"
models:
- uses: voyageai/rerank-2
```
</Tab>
<Tab title="YAML">
```yaml title="config.yaml"
models:
- name: My Voyage Reranker
provider: voyage
apiKey: <YOUR_VOYAGE_API_KEY>
model: rerank-2
roles:
- rerank
```
</Tab>
</Tabs>
### Cohere
See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rerank-2).
<Tabs>
{/* HUB_TODO block doesn't exist */}
{/* <Tab title="Hub">
[Cohere Reranker English v3](https://hub.continue.dev/)
</Tab> */}
<Tab title="YAML">
```yaml title="config.yaml"
models:
- name: Cohere Reranker
provider: cohere
model: rerank-english-v3.0
apiKey: <YOUR_COHERE_API_KEY>
roles:
- rerank
```
</Tab>
</Tabs>
### LLM
If you only have access to a single LLM, then you can use it as a reranker. This is discouraged unless truly necessary, because it will be much more expensive and still less accurate than any of the above models trained specifically for the task. Note that this will not work if you are using a local model, for example with Ollama, because too many parallel requests need to be made.
<Tabs>
{/* HUB_TODO block doesn't exist */}
{/* <Tab title="Hub">
[GPT-4o LLM Reranker Block](https://hub.continue.dev/)
</Tab> */}
<Tab title="YAML">
```yaml title="config.yaml"
models:
- name: LLM Reranker
provider: openai
model: gpt-4o
roles:
- rerank
```
</Tab>
</Tabs>
### Text Embeddings Inference
[Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own [reranker endpoint](https://huggingface.github.io/text-embeddings-inference/#/Text%20Embeddings%20Inference/rerank). You can configure your reranker as follows:
<Tabs>
{/* HUB_TODO */}
{/* <Tab title="Hub">
[HuggingFace TEI Reranker block](https://hub.continue.dev/)
</Tab> */}
<Tab title="YAML">
```yaml title="config.yaml"
models:
- name: Huggingface-tei Reranker
provider: huggingface-tei
model: tei
apiBase: http://localhost:8080
apiKey: <YOUR_TEI_API_KEY>
roles:
- rerank
```
</Tab>
</Tabs>