[01]AI / RAG / SaaS

RAGIQ

Document-based AI knowledge assistant that allows users to upload documents and interact with their knowledge through an intelligent chat interface.

Year
2025

Stack

  • Next.js
  • NestJS
  • PostgreSQL
  • pgvector
  • LLMs
  • RAG
RAGIQ — AI / RAG / SaaS project screenshot

01

Overview

RAGIQ turns a pile of documents into something you can actually ask questions to. Upload contracts, research, product docs or internal wikis, and query them through a chat interface that answers with citations instead of confident guesses.

02

Problem

Teams keep their real knowledge in files nobody reads. Search returns filenames, not answers. Generic chatbots hallucinate because they have no grounding in the actual source material.

03

Idea

Make retrieval the product, not the LLM. If the retrieval layer surfaces the right five paragraphs, almost any competent model can write a trustworthy answer — and the citation trail is what makes people believe it.

04

Architecture

A Next.js client talks to a NestJS API. Uploads land in object storage, then a queue-backed worker parses, chunks and embeds them into PostgreSQL with pgvector. Query time runs a hybrid search, re-ranks candidates, then streams a grounded answer.

05

Design

The interface is deliberately quiet: a document rail, a conversation column, and a citation drawer. Every answer can be expanded into the exact chunk it came from, so the UI teaches users to trust — and to verify.

06

Development

Ingestion is fully asynchronous with resumable jobs, so a 400-page PDF never blocks a request. Chunking is layout-aware rather than fixed-size, which measurably improved answer quality on tables and headings.

07

AI / Technical Challenges

Naive top-k retrieval failed on comparison questions spanning multiple documents. Fixing it meant query rewriting, a wider candidate set and a re-ranking pass before generation, plus strict prompt contracts so the model refuses when context is thin.

08

Results

Answer quality became predictable enough to demo live on unseen document sets, and ingestion scaled to large files without timeouts.

09

What I learned

RAG quality is an engineering problem long before it is a model problem. Chunking, evaluation and refusal behaviour matter more than swapping providers.

10

Next steps

Structured extraction into typed schemas, evaluation dashboards per workspace, and agentic multi-step research over the same index.