Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: correct typos and improve clarity in AI documentation (#42662)

Yarema Kertytsky6e4dc5df754f
diff --git a/apps/docs/content/guides/ai/going-to-prod.mdx b/apps/docs/content/guides/ai/going-to-prod.mdx
index 0673f11d211..e152ee3232a 100644
--- a/apps/docs/content/guides/ai/going-to-prod.mdx
+++ b/apps/docs/content/guides/ai/going-to-prod.mdx
@@ -6,7 +6,7 @@ subtitle: 'Going to production checklist for AI applications.'
sidebar_label: 'Going to Production'
---
-This guide will help you to prepare your application for production. We'll provide actionable steps to help you scale your application, ensure that it is reliable, can handle the load, and provide optimal accuracy for your use case.
+This guide helps you prepare your application for production. It provides actionable steps to help you scale your application, ensure that it is reliable, can handle the load, and provide optimal accuracy for your use case.
See our [Engineering for Scale](/docs/guides/ai/engineering-for-scale) guide for more information about engineering at scale.
@@ -72,7 +72,7 @@ The values of lists and probes directly affect accuracy and queries per second (
- Higher `probes` means that select queries will be slower, but you can achieve better accuracy.
- `lists` and `probes` are not independent. Higher `lists` means that you will have to use higher `probes` to achieve the same accuracy.
-You can find more examples of how `lists` and `probes` constants affect accuracy and QPS in [pgvector 0.4.0 performance](/blog/pgvector-performance) blogpost.
+You can find more examples of how `lists` and `probes` constants affect accuracy and QPS in [pgvector 0.4.0 performance](/blog/pgvector-performance) blog post.
The chart below shows how the IVFFlat lists count affects accuracy and queries-per-second.
diff --git a/apps/docs/content/guides/ai/google-colab.mdx b/apps/docs/content/guides/ai/google-colab.mdx
index 8c0a22406a5..837e3a53c17 100644
--- a/apps/docs/content/guides/ai/google-colab.mdx
+++ b/apps/docs/content/guides/ai/google-colab.mdx
@@ -27,7 +27,7 @@ Start by visiting [colab.research.google.com](https://colab.research.google.com/
We'll use the Supabase Vector client, [Vecs](/docs/guides/ai/vecs-python-client), to manage our collections.
-At the top of the notebook add the notebook paste the following code and hit the "execute" button (`ctrl+enter`):
+At the top of the notebook, paste the following code and click "Execute" (`ctrl+enter`):
```py
pip install vecs
diff --git a/apps/docs/content/guides/ai/langchain.mdx b/apps/docs/content/guides/ai/langchain.mdx
index 09cf1c570fa..7fbb83ba4ba 100644
--- a/apps/docs/content/guides/ai/langchain.mdx
+++ b/apps/docs/content/guides/ai/langchain.mdx
@@ -9,7 +9,7 @@ sidebar_label: 'LangChain'
## Initializing your database
-Prepare you database with the relevant tables:
+Prepare your database with the relevant tables:
<Tabs
scrollable
@@ -220,7 +220,7 @@ export const run = async () => {
LangChain supports the concept of a hybrid search, which combines Similarity Search with Full Text Search. Read the official docs to get started: [Supabase Hybrid Search](https://js.langchain.com/docs/modules/indexes/retrievers/supabase-hybrid).
-You can install the LangChain Hybrid Search function though our [database.dev package manager](https://database.dev/langchain/hybrid_search).
+You can install the LangChain Hybrid Search function through our [database.dev package manager](https://database.dev/langchain/hybrid_search).
## Resources
diff --git a/apps/docs/content/guides/ai/rag-with-permissions.mdx b/apps/docs/content/guides/ai/rag-with-permissions.mdx
index da34eb5353d..9ecd87c69ae 100644
--- a/apps/docs/content/guides/ai/rag-with-permissions.mdx
+++ b/apps/docs/content/guides/ai/rag-with-permissions.mdx
@@ -1,12 +1,12 @@
---
id: 'ai-rag-with-permissions'
title: 'RAG with Permissions'
-subtitle: 'Fine-grain access control with Retrieval Augmented Generation.'
-description: 'Implement fine-grain access control with retrieval augmented generation'
+subtitle: 'Fine-grained access control with Retrieval Augmented Generation.'
+description: 'Implement fine-grained access control with retrieval augmented generation'
sidebar_label: 'RAG with Permissions'
---
-Since pgvector is built on top of Postgres, you can implement fine-grain access control on your vector database using [Row Level Security (RLS)](/docs/guides/database/postgres/row-level-security). This means you can restrict which documents are returned during a vector similarity search to users that have access to them. Supabase also supports [Foreign Data Wrappers (FDW)](/docs/guides/database/extensions/wrappers/overview) which means you can use an external database or data source to determine these permissions if your user data doesn't exist in Supabase.
+Since pgvector is built on top of Postgres, you can implement fine-grained access control on your vector database using [Row Level Security (RLS)](/docs/guides/database/postgres/row-level-security). This means you can restrict which documents are returned during a vector similarity search to users that have access to them. Supabase also supports [Foreign Data Wrappers (FDW)](/docs/guides/database/extensions/wrappers/overview) which means you can use an external database or data source to determine these permissions if your user data doesn't exist in Supabase.
Use this guide to learn how to restrict access to documents when performing retrieval augmented generation (RAG).
diff --git a/apps/docs/content/guides/ai/semantic-search.mdx b/apps/docs/content/guides/ai/semantic-search.mdx
index 76f77ac3582..6146b6a5edd 100644
--- a/apps/docs/content/guides/ai/semantic-search.mdx
+++ b/apps/docs/content/guides/ai/semantic-search.mdx
@@ -26,7 +26,7 @@ Embeddings are generated using a language model, and embeddings are compared to
## Embedding models
-There are many embedding models available today. Supabase Edge Functions has [built in support](/docs/guides/functions/examples/semantic-search) for the `gte-small` model. Others can be accessed through third-party APIs like [OpenAI](https://platform.openai.com/docs/guides/embeddings), where you send your text in the request and receive an embedding vector in the response. Others can run locally on your own compute, such as through Transformers.js for JavaScript implementations. For more information on local implementation, see [Generate embeddings](/docs/guides/ai/quickstarts/generate-text-embeddings).
+There are many embedding models available today. Supabase Edge Functions has [built-in support](/docs/guides/functions/examples/semantic-search) for the `gte-small` model. Others can be accessed through third-party APIs like [OpenAI](https://platform.openai.com/docs/guides/embeddings), where you send your text in the request and receive an embedding vector in the response. Others can run locally on your own compute, such as through Transformers.js for JavaScript implementations. For more information on local implementation, see [Generate embeddings](/docs/guides/ai/quickstarts/generate-text-embeddings).
It's crucial to remember that when using embedding models with semantic search, you must use the same model for all embedding comparisons. Comparing embeddings created by different models will yield meaningless results.
@@ -65,7 +65,7 @@ For more details on vector columns, including how to generate embeddings and sto
### Similarity metric
-`pgvector` support 3 operators for computing distance between embeddings:
+`pgvector` supports 3 operators for computing distance between embeddings:
| **Operator** | **Description** |
| ------------ | ---------------------- |
@@ -143,7 +143,7 @@ You can also call this method directly from SQL:
select *
from match_documents(
'[...]'::extensions.vector(512), -- pass the query embedding
- 0.78, -- chose an appropriate threshold for your data
+ 0.78, -- choose an appropriate threshold for your data
10 -- choose the number of matches
);
```
diff --git a/apps/docs/content/guides/ai/vector-columns.mdx b/apps/docs/content/guides/ai/vector-columns.mdx
index d9797eed146..d3ab41c3aa9 100644
--- a/apps/docs/content/guides/ai/vector-columns.mdx
+++ b/apps/docs/content/guides/ai/vector-columns.mdx
@@ -5,7 +5,7 @@ description: 'Learn how to use vectors within your own Postgres tables'
sidebar_label: 'Vector columns'
---
-Supabase offers a number of different ways to store and query vectors within Postgres. The SQL included in this guide is applicable for clients in all programming languages. If you are a Python user see your [Python client options](/docs/guides/ai/python-clients) after reading the `Learn` section.
+Supabase offers a number of different ways to store and query vectors within Postgres. The SQL included in this guide is applicable for clients in all programming languages. If you are a Python user, see your [Python client options](/docs/guides/ai/python-clients) after reading the `Learn` section.
Vectors in Supabase are enabled via [pgvector](https://github.com/pgvector/pgvector/), a Postgres extension for storing and querying vectors in Postgres. It can be used to store [embeddings](/docs/guides/ai/concepts#what-are-embeddings).
@@ -48,7 +48,7 @@ To disable an extension, call `drop extension`.
### Create a table to store vectors
-After enabling the `vector` extension, you will get access to a new data type called `vector`. The size of the vector (indicated in parenthesis) represents the number of dimensions stored in that vector.
+After enabling the `vector` extension, you will get access to a new data type called `vector`. The size of the vector (indicated in parentheses) represents the number of dimensions stored in that vector.
```sql
create table documents (
@@ -100,7 +100,7 @@ This example uses the JavaScript Supabase client, but you can modify it to work
### Querying a vector / embedding
-Similarity search is the most common use case for vectors. `pgvector` support 3 new operators for computing distance:
+Similarity search is the most common use case for vectors. `pgvector` supports 3 new operators for computing distance:
| Operator | Description |
| -------- | ---------------------- |