feat: AI docs update (#40183)

* feat: AI docs update

* Update Rule003Spelling.toml
This commit is contained in:
Rodrigo Mansueli authored and GitHub committed 2025-11-06 17:57:30 +01:00
1 parent 7490ca9e88
commit 6a142b7752
3 files changed
+34 -2

No files matched your search

@@ -26,7 +26,15 @@ Indexes can be used to improve performance of nearest neighbor search using vari
| `<#>` | negative inner product | `vector_ip_ops` |
| `<=>` | cosine distance | `vector_cosine_ops` |
Currently vectors with up to 2,000 dimensions can be indexed.
For pgvector versions 0.7.0 and above, it's possible to create indexes on vectors with the following maximum dimensions:
- vector: up to 2,000 dimensions
- halfvec: up to 4,000 dimensions
- bit: up to 64,000 dimensions
You can check your current pgvector version by running: `SELECT * FROM pg_extension WHERE extname = 'vector';` or by navigating to the [Extensions](/dashboard/project/_/database/extensions) tab in your Supabase project dashboard.
If you are on an earlier version of pgvector, you should [upgrade your project here](/dashboard/project/_/settings/infrastructure).
## Resources
@@ -37,7 +37,30 @@ create index on items using hnsw (column_name vector_ip_ops);
create index on items using hnsw (column_name vector_cosine_ops);
```
Currently vectors with up to 2,000 dimensions can be indexed.
For pgvector versions 0.7.0 and above, it's possible to create indexes on vectors with the following maximum dimensions:
- vector: up to 2,000 dimensions
- halfvec: up to 4,000 dimensions
- bit: up to 64,000 dimensions
You can check your current pgvector version by running: `SELECT * FROM pg_extension WHERE extname = 'vector';` or by navigating to the [Extensions](/dashboard/project/_/database/extensions) tab in your Supabase project dashboard.
If you are on an earlier version of pgvector, you should [upgrade your project here](/dashboard/project/_/settings/infrastructure).
## Example with high-dimensional vectors
For vectors with more than 2,000 dimensions, you can use the `halfvec` type to create indexes. Here's an example with 3,072 dimensions:
```sql
CREATE TABLE documents (
id bigint GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
content text,
embedding vector(3072)
);
CREATE INDEX ON documents
USING hnsw ((embedding::halfvec(3072)) halfvec_cosine_ops);
```
## How does HNSW work?
+1
View File
@@ -336,6 +336,7 @@ allow_list = [
"dotenv",
"e.g.",
"gte-small",
"halfvec",
"hCaptcha",
"https?:\\/\\/\\S+",
"i.e.",