Skip to content
Selected workAnonymized case study

AI integration · multi-tenant SaaS

Answers employees can verify.

A retrieval-augmented HR assistant that turns scattered policies into grounded answers while keeping every company’s documents, retrieval results, and access boundaries separate.

Next.jsNestJSPostgreSQLpgvectorDockerRAG
Scope
Product architecture & full-stack delivery
Interface
Next.js citation-first chat
Backend
NestJS retrieval API
Deployment
Dockerized services

The product problem

Policy search fails when context matters.

Employees ask specific questions, but the answer is often split across a handbook, a regional addendum, and a newer policy revision. Keyword search returns files, not a decision-ready answer.

The assistant retrieves only the requesting tenant’s material, assembles a grounded response, and exposes the supporting passages. When evidence is weak, the product says so instead of improvising.

Read-only product demo

Ask policy questions. Inspect the evidence.

A safe, front-end demonstration using fictional policies and pre-generated responses. No employer systems or data are connected.

Tenant: northstar-eu
knowledge / policies

How many days can I work remotely?

Eligible employees may work remotely up to three days per week. The schedule needs manager approval and should preserve the team’s two shared office days.

[1] Hybrid Work Policy[2] Manager Handbook

Retrieval pipeline

Evidence moves with the answer.

Document identity and section metadata survive every stage, making each response traceable back to its source.

  1. 01

    Ingest

    Parse policy files, retain document metadata, and split text into retrieval-sized chunks.

  2. 02

    Index

    Generate embeddings and store vectors beside tenant, document, section, and version identifiers.

  3. 03

    Retrieve

    Filter by tenant before similarity search, then rerank the strongest policy passages.

  4. 04

    Answer

    Generate from retrieved context only and return citations that resolve to exact source sections.

Tenant isolation

Isolation is enforced below the prompt.

Authenticated tenant context

The API derives tenant identity from verified claims; clients never supply an unrestricted tenant selector.

Database-level boundaries

Every document and chunk carries a tenant key, with PostgreSQL row-level security backing application filters.

Retrieval before generation

Vector search is tenant-scoped before any context reaches the model, preventing cross-tenant passages from entering a prompt.

Auditable citations

Answers retain document version and section identifiers so access checks can be reapplied when a source is opened.

Privacy note

This case study describes a generalized architecture. Names, policies, citations, metrics, and interface content are fictional; no employer code, data, or branding is used.