Skip to content

Commit e20acf7

Browse files
authored
Apply suggestions from code review
1 parent 8f45454 commit e20acf7

File tree

3 files changed

+29
-12
lines changed

3 files changed

+29
-12
lines changed

src/content/changelog/ai-search/2025-10-27-ai-search-reranking-system-prompt.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ date: 2025-10-28
88

99
[AI Search](/ai-search/) now supports reranking for improved retrieval quality and allows you to set the system prompt directly in your API requests.
1010

11-
## Reranking for more relevant results
11+
## Rerank for more relevant results
1212

1313
You can now enable [reranking](/ai-search/configuration/reranking/) to reorder retrieved documents based on their semantic relevance to the user’s query. Reranking helps improve accuracy, especially for large or noisy datasets where vector similarity alone may not produce the optimal ordering.
1414

src/content/docs/ai-search/configuration/reranking.mdx

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ sidebar:
55
order: 4
66
---
77

8+
import { DashButton } from "~/components";
9+
810
Reranking can help improve the quality of AI Search results by reordering retrieved documents based on semantic relevance to the user’s query. It applies a secondary model after retrieval to "rerank" the top results before they are outputted.
911

1012
## How it works
@@ -14,7 +16,7 @@ By default, reranking is **disabled** for all AI Search instances. You can enabl
1416
When enabled, AI Search will:
1517

1618
1. Retrieve a set of relevant results from your index, constrained by your `max_num_of_results` and `score_threshold` parameters.
17-
2. Pass those results through a [reranking model](/ai-search/configuration/models/supported-models/)
19+
2. Pass those results through a [reranking model](/ai-search/configuration/models/supported-models/).
1820
3. Return the reranked results, which the text generation model can use for answer generation.
1921

2022
Reranking helps improve accuracy, especially for large or noisy datasets where vector similarity alone may not produce the optimal ordering.
@@ -47,15 +49,26 @@ const answer = await env.AI.autorag("my-autorag").aiSearch({
4749

4850
When creating a new RAG in the dashboard:
4951

50-
1. In the Retrieval configuration step, open the Reranking dropdown
51-
2. Toggle Reranking on
52-
3. Select the reranking model
52+
1. Go to **AI Search** in the Cloudflare dashboard.
53+
54+
<DashButton url="/?to=/:account/ai/ai-search" />
55+
56+
2. Select **Create** > **Get started**.
57+
3. In the **Retrieval configuration** step, open the **Reranking** dropdown.
58+
4. Toggle **Reranking** on.
59+
5. Select the reranking model.
60+
6. Complete your setup.
5361

5462
### Configure in dashboard for existing AI Search
5563

5664
To update reranking for an existing instance:
5765

58-
1. Go to your AI Search instance
59-
2. Open the Settings tab
60-
3. Enable or disable reranking, and select the reranking model
66+
1. Go to **AI Search** in the Cloudflare dashboard.
67+
68+
<DashButton url="/?to=/:account/ai/ai-search" />
69+
70+
2. Select an existing AI Search instance.
71+
3. Go to the **Settings** tab.
72+
4. Under **Reranking**, toggle reranking on.
73+
5. Select the reranking model.
6174

src/content/docs/ai-search/configuration/system-prompt.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,16 @@ const answer = await env.AI.autorag("my-autorag").aiSearch({
4747
});
4848
```
4949

50+
import { DashButton } from "~/components";
51+
5052
### Configure via Dashboard
51-
The system prompt for your AI Search can be set after it has been created by:
53+
The system prompt for your AI Search can be set after it has been created:
5254

53-
1. Navigating to the [Cloudflare dashboard](https://dash.cloudflare.com/?to=/:account/ai/autorag), and go to AI > AI Search
54-
2. Select your AI Search
55-
3. Go to Settings page and find the System prompt setting for either Query rewrite or Generation
55+
1. Go to **AI Search** in the Cloudflare dashboard.
56+
<DashButton url="/?to=/:account/ai/ai-search" />
57+
2. Select an existing AI Search instance.
58+
3. Go to the **Settings** tab.
59+
4. Go to **Query rewrite** or **Generation**, and edit the **System prompt**.
5660

5761
## Query rewriting system prompt
5862

0 commit comments

Comments
 (0)