Skip to content
LogiqCube
Menu
AI EngineeringStatus:MVP

LogiqAIAssist

Multi-tenant document Q&A using RAG, pgvector and Microsoft.Extensions.AI, with answers that cite their sources.

Last updated

The Problem

Teams keep their answers in PDFs, policies and internal docs. Keyword search misses questions phrased differently, and a generic chatbot answers confidently even when it has no source. In a multi-tenant SaaS, there is a second risk: one customer’s documents must never appear in another customer’s answers.

I needed document Q&A that cites its sources and keeps every tenant’s data separate.

The Build

LogiqAIAssist is a multi-tenant ASP.NET Core application. Documents are uploaded, split into chunks, embedded, and stored in PostgreSQL with pgvector, scoped to the tenant. A question retrieves the most relevant chunks for that tenant only, and the model writes an answer that cites them. All model calls go through Microsoft.Extensions.AI.

The product is at MVP stage. [PLACEHOLDER: demo access details]

Stack

  • ASP.NET Core
  • Microsoft.Extensions.AI
  • PostgreSQL with pgvector
  • Retrieval-augmented generation (RAG)
  • Multi-tenant data isolation

Architecture

  1. Clients

    • Web app
  2. API

    • ASP.NET Core API
    • Tenant resolution
  3. Application

    • Ingestion: extract, chunk, embed
    • Tenant-filtered retrieval
    • Answers with citations
  4. Infrastructure

    • PostgreSQL with pgvector
    • Microsoft.Extensions.AI
    • Model provider
    • Document storage
LogiqAIAssist: main layers and components.

Key decisions

The choices that shaped LogiqAIAssist, and why I made them.

  • Build RAG inside a real product first, then extract the core

    Why · Real documents and real questions expose chunking and retrieval problems that demos hide. The reusable core I extracted is the one I bring to client builds.

  • pgvector instead of a separate vector database

    Why · Embeddings live next to tenant data in PostgreSQL, so tenant filters run in plain SQL and there is one less system to run and secure.

  • Microsoft.Extensions.AI as the model boundary

    Why · The app talks to one abstraction, so the model provider can change without rewriting application code. Clients keep their choice of provider.

  • Answers must cite sources

    Why · Citations let users check every answer. When retrieval finds nothing relevant, the assistant says so instead of guessing.

Screens

  • Document library
  • Q&A with cited sources

Document library

Placeholder for the document library screenshot

Q&A with cited sources

Placeholder for the question and answer screen with cited sources

What it proves

How this build maps to the AI Engineering modules I offer clients.

RAG systems
A full ingestion, chunking, embedding, retrieval and answer pipeline running in product code.
AI features in existing apps
The RAG core is built as a module that plugs into an existing ASP.NET Core application.
LLM integration architecture
Provider-agnostic model access through Microsoft.Extensions.AI.
Evaluation and guardrails
Source citations and an explicit "not found" path instead of unsupported answers.

Want this kind of engineering in your product? Start with the AI Feature Sprint.

One AI feature, built against your real data and measured on a test set. 2 weeks, starting from [PLACEHOLDER: USD price].