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.
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.
- A webhook or schedule notices changed content and re-indexes only what moved.
- 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.
- 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.
- 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.
More from the portfolio
Newsletter Studio
From topic to scheduled send: AI drafts the sections, a rubric scores them, you approve.
See the workflowE-commerceAbandoned Cart Recovery
When a shopper leaves without buying, a small piece of custom code on your webshop reports the cart, n8n decides what to do, and a well-timed email brings them back.
See the workflowSales & MarketingSocial Media Drafting & Scheduling
Content requests become channel-ready posts, pass guard checks and publish on schedule after approval.
See the workflow