Skip to content
All Work
Anonymised client engagement · AI Infrastructure

Private RAG Knowledge System

On-premise retrieval-augmented generation system for a professional services firm handling sensitive client documents.

The problem

A professional services firm needed internal AI search across its client documents but couldn't use cloud AI tools due to data sensitivity and compliance constraints.

The system

Deployed a private RAG stack: Ollama serving a local model, LangChain for document chunking and retrieval, PostgreSQL with pgvector for embeddings, and a React interface for staff queries. All running on the firm's existing server infrastructure.

Architecture

A retrieval pipeline designed so documents, index, and model serving all stay inside the organization's own infrastructure.
Private infrastructure
Every stage below runs inside the client's own deployment boundary.
  1. Private Documents
    Internal client files
  2. Document Processing
    Chunking and ingestion via LangChain
  3. Embedding & Indexing
    Vector embeddings generated locally
  4. Vector Storage
    PostgreSQL + pgvector
  5. Retrieval
    Relevant passages selected for the query
  6. Local Model Serving
    Ollama
  7. Grounded Response
    Answer assembled from retrieved passages
  8. Staff Interface
    React query UI

Designed for private infrastructure: the retrieval and generation path does not depend on an external model provider.

Key technical decisions

Assessed infrastructure constraints. Designed a private architecture using local models and vector storage. Chose Ollama for model serving and pgvector for embeddings storage.

What this demonstrates

Building retrieval-augmented AI under strict data-sensitivity constraints, with model serving, vector storage and the staff interface all inside the client's own infrastructure.

Technology

OllamaLangChainPostgreSQL + pgvectorDockerReact

A similar problem — or a clear requirement?

Facing a similar business problem? Start with Diagnose — technology isn't presumed. Already know what you need? Email the requirement and discuss scope.