AI & RAG

Freeze and Index a Compliance Policy Corpus into pgvector

Snapshots approved policy pages from Notion, chunks and embeds them, and writes a versioned, frozen index to Supabase pgvector that downstream answer bots retrieve from.

CategoryAI & RAG
Enginesim
Difficultyintermediate
Triggerschedule
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerScheduled re-index on policy review cadence
  • ActionFetch approved policy pages from Notion databaseNotionNotion
  • LogicChunk pages on heading boundaries for citable spans
  • ActionGenerate chunk embeddings with OpenAIOpenAI
  • OutputWrite version-tagged chunks and vectors to Supabase pgvectorSupabaseSupabase

What it does

Builds the searchable foundation every grounded answer bot needs. It pulls a defined set of approved policy pages from Notion, splits them into citable chunks, generates embeddings, and writes them to a version-stamped table in Supabase. The result is a frozen corpus snapshot you can point answer bots at without drift.

When to use it

Run this once per policy review cycle — after Compliance signs off on a new revision — so all answer bots share one immutable source of truth. Use it instead of live-querying Notion so answers can't change mid-cycle.

How it works

  1. 1A scheduled run kicks off the re-index on your review cadence.
  2. 2Approved policy pages are fetched from a designated Notion database.
  3. 3Each page is chunked with heading-aware boundaries so citations map to real sections.
  4. 4OpenAI generates embeddings for every chunk.
  5. 5Chunks, embeddings, and a corpus version tag are written to Supabase pgvector, leaving the prior version intact for rollback.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect NotionPages, databases, comments.
  2. 2
    Connect OpenAIModels, embeddings, files.
  3. 3
    Connect SupabaseTables, auth, storage, edge functions.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.