Back to all projects

Case study 02 · Document Q&A · RAG

LogiqAssist

Ask your own documents a question and get an answer grounded in them, with every customer's data kept to itself.

ROLE
Architect & principal engineer
PRODUCT
Multi-tenant SaaS
STACK
.NET 8 · Clean Architecture · Next.js · pgvector
TYPE
Document Q&A, RAG
01

The problem

Teams keep what they know in documents, and finding the right answer means searching and reading through all of them.

A chat assistant only helps if its answers come from those documents. And when many companies share one platform, each must see only its own files.

02

What I built

  1. 01

    Document storage

    Uploads go to S3-compatible object storage (RustFS).

  2. 02

    Embeddings & vector search

    Documents are embedded with Gemini and stored in PostgreSQL with pgvector.

  3. 03

    Hybrid search

    Vector similarity combined with keyword search, so exact terms and meaning both match.

  4. 04

    RAG chat assistant

    An AI assistant answers questions using the passages retrieved for that tenant.

  5. 05

    Next.js front end

    A fast web app on a .NET 8 API built with Clean Architecture.

03

Key decisions

Hybrid over vector-only

Keyword matching catches names, codes and exact phrases that embeddings alone can miss.

Multi-tenant from the start

Each customer's documents and answers stay separate by design.

Swappable AI layer

The model sits behind a provider-agnostic layer, so it can change without rewriting business logic.

04

Status

Hybridvector and keyword search