Configures database INSERT triggers that offload document chunking and embedding to Edge Functions.
94
94%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Risky
Do not use without reviewing
Configures database INSERT triggers that offload document chunking and embedding to Edge Functions.
This tile implements the ingestion half of a RAG system. When a raw document is inserted into the source table, a Postgres trigger fires an asynchronous HTTP request via pg_net to an Edge Function. The Edge Function chunks the document, generates embeddings, and stores the resulting vectors. The pipeline: INSERT raw doc -> trigger fires -> Edge Function chunks -> embeds -> stores vectors.
AFTER INSERT trigger calls pg_net.http_post() targeting the embedding Edge Function.{id, content, metadata}.status to embedded or failed.CREATE EXTENSION IF NOT EXISTS pg_net;
CREATE EXTENSION IF NOT EXISTS vector;pending -> processing -> embedded | failed
supabase-mcp-verification — validates migrations.pgvector-hnsw-index-selection — provides the target vector table and HNSW index configuration.edge-function-background-orchestration — provides the Edge Function runtime pattern for the chunking/embedding worker.Runs after pgvector-hnsw-index-selection creates the vector storage table. Runs before any retrieval tile (hybrid-search-rrf-pattern, retrieval-threshold-guard) that queries the stored vectors.