Skip to content

Commit cf956f4

Browse files
committed
update changelog, release note and overview
1 parent ff11eea commit cf956f4

5 files changed

Lines changed: 136 additions & 46 deletions

File tree

Lines changed: 47 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,69 @@
11
---
2-
title: AI Search namespace binding
3-
description: Access AI Search instances with the new ai_search_namespaces binding for namespace isolation, dynamic instance management, and file uploads.
2+
title: New AI Search bindings, built-in storage, and cross-instance search
3+
description: Access AI Search from Workers with two new bindings, upload files directly to built-in storage, and search across multiple instances in a single call.
44
products:
55
- ai-search
66
date: 2026-04-16
77
---
88

9-
The new `ai_search_namespaces` [Workers binding](/ai-search/api/search/workers-binding/) provides first-class access to [AI Search](/ai-search/) from your Worker. The binding follows the same pattern as `kv_namespaces` and `r2_buckets`, and supports dynamic instance management at runtime.
9+
[AI Search](/ai-search/) now ships with two new Workers bindings, built-in storage for every new instance, and cross-instance search.
1010

11-
## What is new
11+
## New Workers bindings
1212

13-
- **Namespace isolation**: Group instances into [namespaces](/ai-search/concepts/namespaces/) for environment or tenant separation
14-
- **Dynamic instance management**: Create, update, and delete instances at runtime without redeploying
15-
- **Items API**: Upload and manage individual documents through the [Items API](/ai-search/api/items/workers-binding/)
16-
- **Streaming**: Stream chat completion responses as Server-Sent Events
17-
- **Messages-based API**: Uses a `messages` array format consistent with chat completion APIs
13+
AI Search introduces two new Workers bindings for accessing AI Search from a [Cloudflare Worker](/workers/).
1814

19-
## Example
20-
21-
Add the binding to your Wrangler configuration and start querying:
15+
The `ai_search_namespaces` binding gives your Worker access to all instances within a [namespace](/ai-search/concepts/namespaces/). You can create, update, and delete instances at runtime without redeploying:
2216

2317
```ts
2418
// wrangler.jsonc
2519
// "ai_search_namespaces": [{ "binding": "AI_SEARCH", "namespace": "default" }]
2620

27-
export type Env = {
28-
AI_SEARCH: AiSearchNamespace;
29-
};
21+
// create a new instance at runtime
22+
const instance = await env.AI_SEARCH.create({ id: "my-instance" });
3023

31-
export default {
32-
async fetch(request, env): Promise<Response> {
33-
const results = await env.AI_SEARCH.get("my-instance").search({
34-
messages: [{ role: "user", content: "How do I configure caching?" }],
35-
});
24+
// upload a file to built-in storage
25+
await instance.items.upload("guide.md", content);
3626

37-
return Response.json(results);
38-
},
39-
} satisfies ExportedHandler<Env>;
27+
// search the instance
28+
const results = await env.AI_SEARCH.get("my-instance").search({
29+
messages: [{ role: "user", content: "What is Cloudflare?" }],
30+
});
31+
```
32+
33+
The `ai_search` binding binds directly to a single instance in the default namespace. Use this when you know which instance you need at deploy time:
34+
35+
```ts
36+
// wrangler.jsonc
37+
// "ai_search": [{ "binding": "MY_SEARCH", "instance_name": "my-instance" }]
38+
39+
const results = await env.MY_SEARCH.search({
40+
messages: [{ role: "user", content: "What is Cloudflare?" }],
41+
});
4042
```
4143

42-
## Requirements
44+
Refer to [Namespaces](/ai-search/concepts/namespaces/) for details on the difference between the two bindings.
4345

44-
| Package | Minimum version |
45-
| --------------------------- | --------------- |
46-
| `@cloudflare/workers-types` | `4.20260304.0` |
47-
| `wrangler` | `4.68.1` |
46+
## Built-in storage
4847

49-
## Backwards compatibility
48+
New AI Search instances come with built-in storage and a built-in vector index, powered by [R2](/r2/) and [Vectorize](/vectorize/). You can upload files directly to an instance and they are indexed automatically. No need to set up an R2 bucket or Vectorize index yourself.
49+
50+
Upload files using the [Items API](/ai-search/api/items/workers-binding/) or the **Items** tab in the dashboard. You can also connect an external data source like a website or R2 bucket alongside built-in storage.
51+
52+
Refer to [Built-in storage](/ai-search/configuration/data-source/built-in-storage/) for details.
53+
54+
## Cross-instance search
55+
56+
You can now search across multiple instances in a single call using the namespace binding. Pass an array of instance IDs and get one ranked list back. Each chunk in the response includes an `instance_id` field identifying which instance it came from.
57+
58+
```ts
59+
const results = await env.AI_SEARCH.search({
60+
messages: [{ role: "user", content: "What is Cloudflare?" }],
61+
ai_search_options: {
62+
instance_ids: ["product-docs", "customer-abc123"],
63+
},
64+
});
65+
```
5066

51-
The previous `env.AI.autorag()` binding is deprecated but will continue to work indefinitely. Existing code does not need to be migrated.
67+
This is useful when you need to search across different data sources. For example, a support agent can search shared product docs and per-customer history in one call.
5268

53-
For full documentation, refer to the [Workers binding guide](/ai-search/api/search/workers-binding/).
69+
Refer to [Namespace-level search](/ai-search/api/search/workers-binding/#namespace-level) for details.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Hybrid search and relevance boosting
3+
description: Combine vector and keyword search in a single query, and boost results by metadata fields like timestamp or priority.
4+
products:
5+
- ai-search
6+
date: 2026-04-16
7+
---
8+
9+
[AI Search](/ai-search/) now supports hybrid search and relevance boosting, giving you more control over how results are found and ranked.
10+
11+
## Hybrid search
12+
13+
Hybrid search combines vector (semantic) search with BM25 keyword search in a single query. Vector search understands intent, but it can miss queries that depend on a specific term appearing exactly. For example, a query for "Go errors help" might return Java or Python docs because the embedding model prioritizes the broad context of "error handling" over the word "Go." Keyword search fills that gap by matching the exact terms in your query.
14+
15+
When you enable hybrid search, both run in parallel and the results are fused into a single ranked list. You can configure the tokenizer (`porter` for natural language, `trigram` for code), keyword match mode (`and` for precision, `or` for recall), and fusion method (`rrf` or `max`) per instance:
16+
17+
```ts
18+
const instance = await env.AI_SEARCH.create({
19+
id: "my-instance",
20+
index_method: { vector: true, keyword: true },
21+
fusion_method: "rrf",
22+
indexing_options: { keyword_tokenizer: "porter" },
23+
retrieval_options: { keyword_match_mode: "and" },
24+
});
25+
```
26+
27+
Refer to [Search modes](/ai-search/concepts/search-modes/) for an overview and [Hybrid search](/ai-search/configuration/indexing/hybrid-search/) for configuration details.
28+
29+
## Relevance boosting
30+
31+
Relevance boosting lets you nudge search rankings based on document metadata. For example, you can prioritize recent documents by boosting on `timestamp`, or surface high-priority content by boosting on a custom metadata field like `priority`.
32+
33+
Configure up to 3 boost fields per instance or override them per request:
34+
35+
```ts
36+
const results = await env.AI_SEARCH.get("my-instance").search({
37+
messages: [{ role: "user", content: "deployment guide" }],
38+
ai_search_options: {
39+
retrieval: {
40+
boost_by: [
41+
{ field: "timestamp", direction: "desc" },
42+
{ field: "priority", direction: "desc" },
43+
],
44+
},
45+
},
46+
});
47+
```
48+
49+
Refer to [Relevance boosting](/ai-search/configuration/retrieval/boosting/) for configuration details.

src/content/docs/ai-search/how-to/nlweb.mdx

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ sidebar:
55
order: 6
66
---
77

8+
import { YouTube } from "~/components";
9+
810
Enable conversational search on your website with NLWeb and Cloudflare AI Search. This template crawls your site, indexes the content, and deploys NLWeb-standard endpoints to serve both people and AI agents.
911

12+
<YouTube id="Az6NKLjSZMM" />
13+
1014
:::note
1115
This is a public preview ideal for experimentation. If you're interested in running this in production workflows, please contact us at nlweb@cloudflare.com.
1216
:::
@@ -26,9 +30,9 @@ You can deploy NLWeb on your website directly through the AI Search dashboard:
2630
2. Go to **Compute & AI** > **AI Search**.
2731
3. Select **Create**.
2832
4. Select **Website** as a data source.
29-
4. Follow the instructions to create an AI Search instance.
30-
5. Go to the **Settings** for the instance
31-
6. Find **NLWeb Worker** and select "Enable AI Search for your website".
33+
5. Follow the instructions to create an AI Search instance.
34+
6. Go to the **Settings** for the instance
35+
7. Find **NLWeb Worker** and select "Enable AI Search for your website".
3236

3337
Once complete, AI Search will deploy an NLWeb Worker for you that enables you to use the NLWeb API Endpoints.
3438

@@ -37,16 +41,16 @@ Once complete, AI Search will deploy an NLWeb Worker for you that enables you to
3741
Choosing the NLWeb Website option extends a normal AI Search by tailoring it for content‑heavy websites and giving you everything that is required to adopt NLWeb as the standard for conversational search on your site. Specifically, the template provides:
3842

3943
- **Website as a data source:** Uses [Website](/ai-search/configuration/data-source/website/) as data source option to crawl and ingest pages with the Rendered Sites option.
40-
- **Defaults for content-heavy websites:** Applies tuned embedding and retrieval configurations ideal for publishing and content‑rich websites.
44+
- **Defaults for content-heavy websites:** Applies tuned embedding and retrieval configurations ideal for publishing and content‑rich websites.
4145
- **NLWeb Worker deployment:** Automatically spins up a Cloudflare Worker from the [NLWeb Worker template](https://github.com/cloudflare/templates).
4246

4347
## What the Worker includes
4448

4549
Your deployed Worker provides two endpoints:
4650

4751
- `/ask` — NLWeb’s standard conversational endpoint
48-
- Powers the conversational UI at the root (`/`)
49-
- Powers the embeddable preview widget (`/snippet.html`)
52+
- Powers the conversational UI at the root (`/`)
53+
- Powers the embeddable preview widget (`/snippet.html`)
5054
- `/mcp` — NLWeb’s MCP server endpoint for trusted AI agents
5155

5256
These endpoints give both people and agents structured access to your content.
@@ -56,9 +60,11 @@ These endpoints give both people and agents structured access to your content.
5660
To integrate NLWeb search directly into your site you can:
5761

5862
1. Find your deployed Worker in the [Cloudflare dashboard](https://dash.cloudflare.com/):
59-
- Go to **Compute & AI** > **AI Search**.
60-
- Select **Connect**, then go to the **NLWeb** tab.
61-
- Select **Go to Worker**.
63+
64+
- Go to **Compute & AI** > **AI Search**.
65+
- Select **Connect**, then go to the **NLWeb** tab.
66+
- Select **Go to Worker**.
67+
6268
2. Add a [custom domain](/workers/configuration/routing/custom-domains/) to your Worker (for example, ask.example.com)
6369
3. Use the `/ask` endpoint on your custom domain to power the search (for example, ask.example.com/ask)
6470

@@ -87,7 +93,6 @@ You can also use the embeddable snippet to add a search UI directly into your we
8793

8894
This lets you serve conversational AI search directly from your own domain, with control over how people and agents access your content.
8995

90-
9196
## Modifying or updating the Worker
9297

9398
You may want to customize your Worker, for example, to adjust the UI for the embeddable snippet. In those cases, we recommend calling the `/ask` endpoint for queries and building your own UI on top of it, however, you may also choose to modify the Worker's code for the embeddable UI.
@@ -104,7 +109,7 @@ To do so:
104109
2. Enter the name of your AI Search in the `RAG_ID` environment variable field.
105110
3. Click **Deploy**.
106111
4. Select the **GitHub/GitLab** icon on the Workers Dashboard.
107-
4. Clone the repository that is created for your Worker.
108-
5. Make your modifications, then commit and push changes to the repository to update your Worker.
112+
5. Clone the repository that is created for your Worker.
113+
6. Make your modifications, then commit and push changes to the repository to update your Worker.
109114

110-
Now you can use this Worker as the new NLWeb endpoint for your website.
115+
Now you can use this Worker as the new NLWeb endpoint for your website.

src/content/docs/ai-search/index.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ You can use AI Search for:
4848
</LinkButton>
4949
</div>
5050

51+
:::note[Latest update]
52+
New AI Search instances created after April 16, 2026 include [managed storage](/ai-search/configuration/data-source/built-in-storage/), vector index, and web crawling at no additional cost during the open beta. [View limits and pricing](/ai-search/platform/limits-pricing/).
53+
:::
54+
5155
---
5256

5357
## Features

src/content/release-notes/ai-search.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,25 @@ productName: AI Search
44
productLink: "/ai-search/"
55
entries:
66
- publish_date: "2026-04-16"
7-
title: AI Search namespace binding
7+
title: Hybrid search
88
description: |-
9-
The new `ai_search_namespaces` [Workers binding](/ai-search/api/search/workers-binding/) provides first-class access to AI Search from your Worker. Group instances into [namespaces](/ai-search/concepts/namespaces/) for isolation, create and manage instances at runtime, and upload documents through the [Items API](/ai-search/api/items/workers-binding/). The previous `env.AI.autorag()` binding continues to work.
9+
AI Search now supports [hybrid search](/ai-search/configuration/indexing/hybrid-search/), combining vector and BM25 keyword search in a single query. Configure the tokenizer, keyword match mode, and fusion method per instance. Refer to [Search modes](/ai-search/concepts/search-modes/) for an overview.
10+
- publish_date: "2026-04-16"
11+
title: Built-in storage
12+
description: |-
13+
New AI Search instances come with [built-in storage](/ai-search/configuration/data-source/built-in-storage/) and a vector index. Upload files directly to an instance using the Items API or the dashboard without setting up external infrastructure.
14+
- publish_date: "2026-04-16"
15+
title: Relevance boosting
16+
description: |-
17+
Boost search results by metadata fields like timestamp or priority using [relevance boosting](/ai-search/configuration/retrieval/boosting/). Configure up to 3 boost fields per instance or per request.
18+
- publish_date: "2026-04-16"
19+
title: Cross-instance search
20+
description: |-
21+
Search across multiple AI Search instances in a single call using [namespace-level search](/ai-search/api/search/workers-binding/#namespace-level). Results are merged and ranked, with each chunk identifying which instance it came from.
22+
- publish_date: "2026-04-16"
23+
title: New AI Search Workers bindings
24+
description: |-
25+
Two new [Workers bindings](/ai-search/api/search/workers-binding/) for AI Search. The `ai_search_namespaces` binding gives access to all instances within a [namespace](/ai-search/concepts/namespaces/) and supports dynamic instance management at runtime. The `ai_search` binding binds directly to a single instance for simpler use cases.
1026
- publish_date: "2026-04-01"
1127
title: Wrangler CLI support for AI Search
1228
description: |-

0 commit comments

Comments
 (0)