supabase
Installation
SKILL.md
Supabase & PostgreSQL Expert Skill
This skill provides patterns for implementing RAG logic with Supabase and the pgvector extension.
đź“‚ Storage Pattern (Postgres)
- Tables:
documents: Stores source document text and global metadata.chunks: Stores text fragments,embedding(vector), and a foreign keydocument_id(UUID).
- Relationships: Ensure a foreign key relationship with
ON DELETE CASCADEfromchunkstodocumentsfor clean deletions.
🔍 Search Patterns
-
Semantic Search (pgvector):
- Assumes a stored procedure
match_chunksexists in the database. - Parameters:
query_embedding(vector),match_threshold(float),match_count(int). - Use
self.client.rpc("match_chunks", rpc_params).execute().
- Assumes a stored procedure