Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Vectorize] update docs for Vectorize V2 #15916

Merged
merged 4 commits into from
Aug 15, 2024
Merged

[Vectorize] update docs for Vectorize V2 #15916

merged 4 commits into from
Aug 15, 2024

Conversation

sejoker
Copy link
Contributor

@sejoker sejoker commented Jul 31, 2024

Summary

Vectorize V2 changes:

  • use of Wrangler prerelease version
  • wrangler commands for metadata index operations
  • updated V2 limits
  • added recommendation for vectors bulk upload

@sejoker sejoker requested review from elithrar, vy-ton, pdwittig, kodster28 and a team as code owners July 31, 2024 17:51
@github-actions github-actions bot added the product:vectorize Vectorize: https://developers.cloudflare.com/vectorize/ label Jul 31, 2024
Copy link

cloudflare-workers-and-pages bot commented Jul 31, 2024

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 69d4345
Status: ✅  Deploy successful!
Preview URL: https://c69348b7.cloudflare-docs-7ou.pages.dev
Branch Preview URL: https://vectorize-v2.cloudflare-docs-7ou.pages.dev

View logs

@@ -117,6 +117,11 @@ Refer to [Vectorize API](/vectorize/reference/client-api/) for additional exampl

### wrangler CLI

{{<Aside type="note" header="Cloudflare API rate limit">}}

Please use a maximum of 5000 vectors per embeddings.ndjson file to prevent the global [rate limit](/fundamentals/api/reference/limits/) for the Cloudflare API.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think wrangler can read a bigger file, but will batch lines up to 5K

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be correct. Wrangler can split a large file into batches of 5000 for Vectorize V2 and process each batch as a separate insert request. Each batch however must be less than 5000 vectors and less than 128 MB for the insert request to succeed.

Copy link
Contributor

@kodster28 kodster28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small changes

To continue:
{{<Aside type="note" header="Workers Paid plan required">}}

Hyperdrive is available to all users on the [Workers Paid plan](/workers/platform/pricing/#workers).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Hyperdrive is available to all users on the [Workers Paid plan](/workers/platform/pricing/#workers).
Vectorize is available to all users on the [Workers Paid plan](/workers/platform/pricing/#workers).

Copy link
Contributor Author

@sejoker sejoker Jul 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved.

{{<Aside type="note" header="Enable metadata filtering">}}

Vectorize V2 requires to define metadata properties that will support filtering. Please refer to [Vectorize API](/vectorize/reference/client-api/#create-metadata-index) for details.
[Namespaces](/vectorize/best-practices/insert-vectors/#namespaces) support metadata filtering out of the box.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[Namespaces](/vectorize/best-practices/insert-vectors/#namespaces) support metadata filtering out of the box.
[Namespaces](/vectorize/best-practices/insert-vectors/#namespaces) support metadata filtering by default.

Copy link
Contributor Author

@sejoker sejoker Jul 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved.

@@ -86,6 +86,46 @@ const details = await env.YOUR_INDEX.describe();

Retrieves the configuration of a given index directly, including its configured `dimensions` and distance `metric`.

### Create Metadata Index
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we include the index info command too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we include the index info command too?

added.

content/vectorize/get-started/intro.md Outdated Show resolved Hide resolved
content/vectorize/reference/client-api.md Outdated Show resolved Hide resolved
content/vectorize/reference/client-api.md Outdated Show resolved Hide resolved
content/vectorize/reference/client-api.md Outdated Show resolved Hide resolved
content/vectorize/reference/metadata-filtering.md Outdated Show resolved Hide resolved
@sejoker sejoker changed the title [Vectorize] update docs for CVectorize V2 [Vectorize] update docs for Vectorize V2 Aug 9, 2024
@sejoker sejoker requested a review from a team as a code owner August 15, 2024 12:44
@github-actions github-actions bot added size/xl and removed size/s product:vectorize Vectorize: https://developers.cloudflare.com/vectorize/ labels Aug 15, 2024
@github-actions github-actions bot added the product:vectorize Vectorize: https://developers.cloudflare.com/vectorize/ label Aug 15, 2024
@github-actions github-actions bot added size/m and removed size/xl labels Aug 15, 2024
@sejoker sejoker merged commit 9954f67 into production Aug 15, 2024
8 checks passed
@sejoker sejoker deleted the vectorize-v2 branch August 15, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product:vectorize Vectorize: https://developers.cloudflare.com/vectorize/ size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants