‹ Portfolio

AI Foundations

Knowledge Base (RAG) Database

Your documents and answers become a memory that finds things by meaning, not by keyword, powered by a pgvector index in Postgres.

Get the PDF guide

Knowledge Base (RAG) Database. Enter your email and the download starts right away.

We use your address only to follow up on this guide. No newsletter.

TRIGGER Content changes new or updated sources DATA STEP Collect sources docs, FAQs, tickets DATA STEP Chunk & embed turn text into vectors DATA STEP pgvector index Postgres, search by meaning AI STEP Retrieve & answer with cited sources HUMAN CHECKPOINT Curate gaps approve missing answers RESULT Serve everywhere chat, support, agents TRIGGER Content changes new or updated sources DATA STEP Collect sources docs, FAQs, tickets DATA STEP Chunk & embed turn text into vectors DATA STEP pgvector index Postgres, search by meaning AI STEP Retrieve & answer with cited sources HUMAN CHECKPOINT Curate gaps approve missing answers RESULT Serve everywhere chat, support, agents
TriggerData stepAI stepHuman checkpointResult

Aggregated main logic. Real projects add error handling, retries and logging around every step.

The problem

Company knowledge is scattered across documents, tickets and heads. Keyword search misses anything phrased differently, and AI tools need one trusted place to read from.

  1. A webhook or schedule notices changed content and re-indexes only what moved.
  2. Text is split into meaningful chunks, converted into embeddings (numbers that capture meaning) and stored in Postgres with the pgvector extension, next to metadata such as topic, language and approval state.
  3. A question is embedded the same way, and the closest chunks are found by meaning, not by matching keywords: 'how do I get my money back' finds the refund policy even if the word 'refund' never appears in the question.
  4. The model answers only from the retrieved chunks and cites where it looked. Unanswered questions are collected so a person can write the missing answer once.

FAQ

Knowledge Base (RAG) Database: frequently asked questions

What does pgvector do, and why does it matter for search?

pgvector lets a normal Postgres database search by meaning instead of by exact keywords. If a customer asks how to get their money back, it can still find your article titled Refund Policy, even though the words differ. That is why answers stay relevant when people phrase things in their own way.

What is an embedding, in plain terms?

An embedding is a list of numbers that captures what a piece of text means. Texts with similar meaning get similar numbers, so the system can compare them mathematically. We create embeddings for each chunk of your content and store them in pgvector.

Who decides what the AI is allowed to know?

Your editors do. Only content marked as approved knowledge is indexed and served. When the AI cannot answer something, it reports a gap, and an editor decides whether to write the missing content.

How does fresh content get in, and can it serve other tools?

When content changes, n8n collects the sources, splits them into chunks, creates embeddings and updates the index. The Hermes server then exposes the knowledge to chat, support and other assistants through one shared interface. You maintain it once and use it in many places.

Is our company knowledge sent to a public AI service?

Your content and its index stay in a database we host and operate for you. For answering, only the relevant snippets are passed to the language model, and we agree with you on which provider is used. We explain the details in the discovery call.

Want something like this?

Every build is custom. We start with a discovery call to understand your process and data.