Work / Knowledge-Base — retrieval in Slack

Knowledge-Base — retrieval in Slack

A Slack retrieval system that indexes webpages and sitemaps, searches with pgvector, and answers from owned source material.

Problem

Teams needed to find answers in their own documentation without leaving Slack.

Constraints

The answer needed context from an index of webpages and sitemaps owned by the team.

What I did

Knowledge-Base was my Supabase Launch Week 8 project: a Slack bot that lets a team query its own documentation without leaving Slack.

System shape

The ingestion path crawls a page or sitemap, normalizes the content, splits it into chunks, embeds them, and stores the chunks and vectors in Postgres with pgvector.

The query path retrieves the relevant chunks by semantic similarity and hands that context to the model along with the Slack question. Slack is the interface; the retrieval index is the product boundary.

page or sitemap
  -> crawl and normalize
  -> chunk with source metadata
  -> embed and store in pgvector
  -> retrieve context for Slack question
  -> generate grounded answer

What it taught me

Without retrieval, “chat with your docs” is a model guessing in a confident tone. Retrieval pins the answer to material the team owns and can update. Postgres and pgvector kept the whole thing small without a separate vector database, while Supabase Edge Functions and Deno gave me the service boundary.

The lasting lesson: an AI product is bounded by its context path. Indexing, chunking, source metadata, freshness, and retrieval quality are what decide whether the answer is any good.

Result

A Slack retrieval system using Postgres and pgvector, built for Supabase Launch Week 8.

Tradeoffs

Keeping vectors in Postgres simplified the infrastructure; retrieval quality still depended on chunking, metadata and freshness.

Stack

Supabase Edge FunctionspgvectorPostgresTypeScriptDeno

Explore more problems I've solved

Bhavin Kamani

A small command line for a curious visitor.