Back
ClaudeSupabase + pgvectorRAGAgency
Case Study

AI Company Brain for a Media Agency

Media marketing agency
Knowledge base + proposal generator
Media marketing agencyAdvertising · Media

A media marketing agency of around 20 people that builds proposals and media plans for its clients. The commercial knowledge (what was proposed to each client, media-mix criteria, inventory and rates) lived scattered across Drive folders and in the team's heads.

We had already built their proposal and media plan generator. The next step was giving the system memory: a central knowledge base where everything the company knows lives, queryable in natural language.

The Challenge
  • Commercial knowledge lived in Drive folders and in each salesperson's head, with no single source

  • No way to query the proposal history: what was proposed to each client and with which media mix

  • Every new proposal started from scratch instead of building on previous ones

  • Rates and media inventory changed with no versioning: outdated and current documents coexisted with no distinction

  • A traditional search engine is not enough: it matches exact words, it does not understand the question

The Solution

Central company brain

A knowledge base where everything the company knows lives: approved proposals, media inventory and internal documents, all indexed and versioned (what is current and what was superseded).

Automatic ingestion

Every proposal approved in the generator is added to the base on its own. The system learns from the team's daily work, with no manual loading.

Hybrid search

Combines semantic search (by meaning) with keyword search, to find the right answer even when the question does not use the document's exact terms.

Answers that cite their source

You query in natural language and every answer cites the document it comes from. If the information is not in the base, the system says it does not have it instead of making things up.

Connected to the proposal generator

The base feeds the generator with the best previous examples, and the generator feeds the base with every new proposal. A loop that improves with use.

Technologies Used
Claude (Anthropic)Supabase (Postgres + pgvector)Semantic embeddingsNext.jsFly.io
Project Timeline
1

Phase 1

Data model: documents, versions and query log

2

Phase 2

Ingestion pipeline: chunking by document type + embeddings

3

Phase 3

Query engine: hybrid search, cited answers and an anti-hallucination guard

4

Phase 4

Integration with the sales team's proposal generator

What Was Built
1

single source for everything the company knows

Hybrid

semantic + keyword search on every query

100%

of answers with the source document cited

0

made-up answers: if it is not in the base, it says so

Auto

every approved proposal feeds the base on its own

Owned

the system and the data belong to the company from day one

Does your company's knowledge live in folders and in people's heads?

We build you an AI company brain: a knowledge base your team queries in natural language and that learns from daily work.