JH← Back to portfolio

AI Automation Project

RAG Knowledge Base

A retrieval-augmented document Q&A system with vector embeddings and semantic search over a custom knowledge base.

n8nHugging FaceSupabaseVector DBRAG

Overview

Production-ready RAG pipeline letting users query a custom document knowledge base in natural language. The system chunks, embeds, and stores documents in a vector database, then uses semantic retrieval to feed context to an LLM for accurate, grounded answers.

The Challenge

LLMs hallucinate when answering about proprietary or recent documents. Fine-tuning is expensive and slow to update. The goal was a low-cost, fast-to-update system that keeps the LLM grounded in source documents.

Solution

n8n orchestrates the ingestion pipeline — documents are chunked, embedded via Hugging Face sentence transformers, and stored in Supabase pgvector. At query time, top-k relevant chunks are retrieved by cosine similarity, passed as context to the LLM, and source citations are returned with the answer.

Tech Stack

n8nHugging Face TransformersSupabase (pgvector)PostgreSQLLLM APIsPythonREST

Outcomes

RAG
grounded answers
Cite
source citations
Fast
document ingestion
Low
cost architecture

Related reading

Blog posts linked to this case study will appear here.


Want results like this?

I'm available for full-time startup roles and select freelance projects.