The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix: typos in example sql of blog post (#21617)
Nicholas Lyd9dbd66a8204
diff --git a/apps/www/_blog/2024-02-13-matryoshka-embeddings.mdx b/apps/www/_blog/2024-02-13-matryoshka-embeddings.mdxindex 6a052823762..a8aa4ce713b 100644--- a/apps/www/_blog/2024-02-13-matryoshka-embeddings.mdx+++ b/apps/www/_blog/2024-02-13-matryoshka-embeddings.mdx@@ -389,21 +389,19 @@ create or replace function match_documents_adaptive(returns setof documentslanguage sqlas $$-begin- with shortlist as (- select *- from documents,- order by- sub_vector(embedding, 512)::vector(512) <#> (- select sub_vector(query_embedding, 512)::vector(512)- ) asc- limit match_count * 8- )+with shortlist as (select *- from shortlist- order by embedding <#> query_embedding asc- limit least(match_count, 200);-end;+ from documents+ order by+ sub_vector(embedding, 512)::vector(512) <#> (+ select sub_vector(query_embedding, 512)::vector(512)+ ) asc+ limit match_count * 8+)+select *+from shortlist+order by embedding <#> query_embedding asc+limit least(match_count, 200);$$;```